Closed Bug 1573090 Opened 2 months ago Closed 2 months ago

improve local symbolication of profiles

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

Details

Attachments

(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
Status: NEW → ASSIGNED
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e76bdefd6540
Part 1: Use a CodeAddressService when pre-symbolicating Gecko profiles. r=gerald
https://hg.mozilla.org/integration/autoland/rev/9a33b94c2471
Part 2: Look up ELF symbol tables directly when pre-symbolicating Gecko profiles on Linux. r=gerald
https://hg.mozilla.org/integration/autoland/rev/a82e5f008873
Part 3: Run rustfmt on tools/profiler/rust-helper/. r=gerald
Status: ASSIGNED → RESOLVED
Closed: 2 months 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.