Open Bug 1720356 Opened 5 years ago Updated 3 months ago

Use samply for opening and symbolicating profiles from local mochitest / xpcshell / Talos / raptor / browsertime runs

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mstange, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fp])

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 samply load. Running samply load profile.json will open the profile and then run a local server to allow asynchronous symbolication.

As a first step, we could do this only if we detect that the user already has samply installed.

As a second step, we may want to consider installing samply with 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 samply:

  • 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 samply 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
  • Showing inline assembly in the profiler UI
Keywords: meta
Severity: -- → N/A
Priority: -- → P3

The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:gerald, maybe it's time to close this bug?

Flags: needinfo?(gsquelart)

Markus, please? 👆

Flags: needinfo?(gsquelart) → needinfo?(mstange.moz)

I think this is still worth doing. Removing the meta keyword for now until we file bugs for the more concrete pieces of this.

Flags: needinfo?(mstange.moz)
Keywords: meta
Summary: [meta] Use profiler-symbol-server for opening and symbolicating profiles from local mochitest / xpcshell / Talos / raptor / browsertime runs → Use profiler-symbol-server for opening and symbolicating profiles from local mochitest / xpcshell / Talos / raptor / browsertime runs
Blocks: 1635139
Whiteboard: [fxp]
Summary: Use profiler-symbol-server for opening and symbolicating profiles from local mochitest / xpcshell / Talos / raptor / browsertime runs → Use samply for opening and symbolicating profiles from local mochitest / xpcshell / Talos / raptor / browsertime runs
Severity: N/A → S3
Whiteboard: [fxp] → [fp]
Depends on: 2028955

Following the closure of Bug 2028955, samply has been added to ./mach bootstrap. Locally the samply binary will be available at ~/.mozbuild/samply/.

You need to log in before you can comment on or make changes to this bug.