Closed Bug 1573090 Opened 3 years ago Closed 3 years ago

improve local symbolication of profiles


(Core :: Gecko Profiler, enhancement, P3)




Tracking Status
firefox70 --- fixed


(Reporter: heycam, Assigned: heycam)




(3 files)

We can use CodeAddressService to make it faster. But also we need to mess with the format of the strings we generate, so that they look right in the profiler UI and collapse together properly.

Blocks: 1569077
Priority: -- → P3

This speeds up pre-symbolication substantially.

We add a new class ProfilerCodeAddressService as the next patch will add
some functionality.

This unfortunately results in a lot of argument passing to thread the
object through to the right place, but that's probably better than
having some global variable. The object needs to be created early up on
the stack to have the best effect.

This also changes the format of the string we generate when
symbolicating, by dropping the leading address and space if we do have a
string that MozDescribeCodeAddress gave us. (We'll change this format
again in the next patch.)

Whereas previously MozDescribeCodeAddress would have handled demangling,
we need to do explicitly do that from our new GetFunction method. The
string we generate is now more useful for the profiler to merge --
having dropped the address in the previous patch, and the file & line number
and library in this patch.

While we're at it, try to demangle Rust symbols too.

Ideally we'd add Rust symbol handling to DemangleSymbol in
StackWalk.cpp, but that lives in mozglue, which currently cannot have
any Rust crate dependencies.

Assignee: nobody → cam
Pushed by
Part 1: Use a CodeAddressService when pre-symbolicating Gecko profiles. r=gerald
Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald
Part 3: Run rustfmt on tools/profiler/rust-helper/. r=gerald
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
No longer depends on: 1342076
You need to log in before you can comment on or make changes to this bug.