wiki:WebKitFlatpakSDK/PerfTools

Perf profiling with perf

perf

Using perf with the SDK

The Flatpak SDK already provides perf. You don't need to install it on your host machine. To record a trace, use this command:

$ WEBKIT_MINI_BROWSER_PREFIX="perf record -g -F 999" Tools/Scripts/run-minibrowser --gtk ...

You don't necessarily need a debug build, but it's better to have one, or a release build configured as:

$ Tools/Scripts/build-webkit --gtk --cmakeargs='-DCMAKE_BUILD_TYPE=RelWithDebInfo' --cmakeargs='-DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer"'

To display the report:

$ Tools/Scripts/webkit-flatpak -c perf report -g

To load the report in Firefox profiler Web UI:

$ Tools/Scripts/webkit-flatpak -c perf script -F +pid > test.perf

Then load test.perf in the Web UI

Last modified 4 years ago Last modified on Sep 16, 2020, 3:26:27 AM
Note: See TracWiki for help on using the wiki.