From 031fd20a5a9e86f96f7fea1598a18f76875d828d Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 30 Jun 2022 13:50:18 -0600 Subject: [PATCH] [perf] Update README --- perf/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/perf/README.md b/perf/README.md index c1b5f77ff..91f493514 100644 --- a/perf/README.md +++ b/perf/README.md @@ -6,14 +6,22 @@ To build the benchmarks in this directory you need to set the benchmark option while configuring the build with meson: ``` -meson configure build -Dbenchmark=enabled --buildtype=release +meson build -Dbenchmark=enabled --buildtype=release +``` +or: +``` +meson build -Dbenchmark=enabled --buildtype=debugoptimized ``` -Then build the benchmark binaries with ninja: +Then build a specific benchmark binaries with ninja: ``` ninja -Cbuild perf/benchmark-set ``` +or just build the whole project: +``` +ninja -Cbuild +``` Finally, to run one of the benchmarks: @@ -37,10 +45,10 @@ ninja -Cbuild Then run the benchmark with perf: ``` -perf record -g -o ~/tmp/profiles/subset.prof ./build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5 +perf record -g build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5 ``` You probably want to filter to a specific benchmark of interest and set the number of repititions high enough to get a good sampling of profile data. Finally view the profile with: -perf report -i ~/tmp/profiles/subset.prof +perf report