Bug 1720356 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We have support for profiling local test runs (Mochitest, xpcshell) and performance test runs (Raptor etc.) with the Gecko profiler. We record a profile to a temporary file during execution, and when the test run is finished, we try to symbolicate the profile, and then open it in the browser.
The symbolication is currently achieved with some Python scripts which substitute addresses with function names in the profile JSON.

We should replace these Python scripts with uses of [`profiler-symbol-server`](https://github.com/mstange/profiler-symbol-server/). This is a rust binary which will open the profile and then run a local server to allow asynchronous symbolication.

To make this binary available, we should download and install it to `~/.mozbuild` during `mach bootstrap`, similar to what we do for `dump_syms` and `fix-stacks`.

The current way of symbolicating has a number of problems, all of which will be fixed by the switch to `profiler-symbol-server`:

 - Symbolication has to complete before the profile is opened. This delays feedback to the user, who might only be interested in marker data, which is valid before symbolication completes.
 - Symbolication is rather slow.
 - The python scripts perform symbolication on the Gecko profile format, rather than the processed profile format. The result is subtly different from what the Firefox profiler does for profiles captured with the regular profiler UI.
 - If the profile format changes, the scripts need to be updated.

Furthermore, using `profiler-symbol-server` will allow the addition of the following features:

 - File and line information from symbolication
 - Inline callstacks from symbolication
 - (In the future:) Showing inline C++ source code in the profiler UI
 - (In the future:) Showing inline assembly in the profiler UI
We have support for profiling local test runs (Mochitest, xpcshell) and performance test runs (Raptor etc.) with the Gecko profiler. We record a profile to a temporary file during execution, and when the test run is finished, we try to symbolicate the profile, and then open it in the browser.
The symbolication is currently achieved with some Python scripts which substitute addresses with function names in the profile JSON.

We should replace these Python scripts with uses of [`profiler-symbol-server`](https://github.com/mstange/profiler-symbol-server/). This is a rust binary which will open the profile and then run a local server to allow asynchronous symbolication.

To make this binary available, we should download and install it to `~/.mozbuild` during `mach bootstrap`, similar to what we do for `dump_syms` and `fix-stacks`.

The current way of symbolicating has a number of problems, all of which will be fixed by the switch to `profiler-symbol-server`:

 - Symbolication has to complete before the profile is opened. This delays feedback to the user, who might only be interested in marker data, which is valid before symbolication completes.
 - Symbolication is rather slow.
 - The python scripts perform symbolication on the Gecko profile format, rather than the processed profile format. The result is subtly different from what the Firefox profiler does for profiles captured with the regular profiler UI.
 - If the profile format changes, the scripts need to be updated.

Furthermore, using `profiler-symbol-server` will immediately give access to the following features:

 - File and line information from symbolication
 - Inline callstacks from symbolication
 - Showing inline C++ source code in the profiler UI
 - (In the future:) Showing inline assembly in the profiler UI

Back to Bug 1720356 Comment 0