Quick how to explaining how to profile Blink tests on Linux and analyze the results using flame graphs. ![]() Interactive Example Prerequisites
Instructions
To get profiling data one needs to build chromium and/or content_shell with The basic strategy is to do the following:
Profiling a Performance Test
For example, to profile and generate a visualization for the Blink GYP_DEFINES+="profiling=1" gclient runhooks ninja -C out/Release blink_tests perf record -F 500 -g -q -- ./out/Release/content_shell \ --dump-render-tree `pwd`/third_party/WebKit/PerformanceTests/Layout/line-layout.html perf script | stackcollapse-perf.pl | flamegraph.pl > /tmp/flamegraph.svg Analyzing the ResultsThe generated SVG file is an interactive document that can be opened in Chrome (or any other browser). Clicking a stack frame will "zoom in" to that frame. See the Flame Graphs home page for further information and other use cases. Further Reading |
For Developers >