Skip to contentSkip to conversation

profiling Firefox, no perf-<PID>.map file

DISCUSSION Giovanni Gherdovich 2 participants 3 messages Sep 3, 2016 – Sep 4, 2016

lore
Share & tools
lore
#0 lore raw

Hello,

when profiling firefox with perf (i.e. perf top or perf record) I get errors like "Failed to open /tmp/perf-<PID>.map, continuing without symbols". The perf docs says it has to do with the support for JIT'ed code (tools/perf/Documentation/jit-interface.txt), which I guess is produced by firefox' javascript engine (I could be wrong).

The documentation is a bit vague on how to have those perf-<PID>.map files produced correctly, and the original commit introducing this feature, 80d496be89ed "perf report: Add support for profiling JIT generated code" only says "A JIT compiler is required [...]".

Is there a way to profile firefox and get those *.map files? It's more of a curiosity, I am new to perf and I'm playing around.

Thanks,
Giovanni

#1 lore raw
Quoted 8 lines · On Samstag, 3. September 2016 20:53:26 CEST Giovanni Gherdovich wrote:

Hello,

when profiling firefox with perf (i.e. perf top or perf record) I get errors like "Failed to open /tmp/perf-<PID>.map, continuing without symbols". The perf docs says it has to do with the support for JIT'ed code (tools/perf/Documentation/jit-interface.txt), which I guess is produced by firefox' javascript engine (I could be wrong).

Quoted 7 lines

The documentation is a bit vague on how to have those perf-<PID>.map files produced correctly, and the original commit introducing this feature, 80d496be89ed "perf report: Add support for profiling JIT generated code" only says "A JIT compiler is required [...]".

Is there a way to profile firefox and get those *.map files? It's more of a curiosity, I am new to perf and I'm playing around.

You need integration for generating such a file in the JavaScript engine. node and QML are two examples for that. But if you don't want to attribute JIT code addresses to JavaScript code, you can safely ignore this warning.

Bye

Signature · 4 lines
Milian Wolff | [email protected] | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
#2 lore raw
Quoted 6 lines · Milian Wolff

 [...]

You need integration for generating such a file in the JavaScript engine. node and QML are two examples for that. But if you don't want to attribute JIT code addresses to JavaScript code, you can safely ignore this warning.

Right, thanks for pointing it out. It's the VM who's JIT'ing that is in charge of writing the perf-<PID>.map files.
I've now found the relevant part in Brendan Gregg's perf page describing this: http://www.brendangregg.com/perf.html#JIT_Symbols
The first time around I read that section it didn't ring a bell, now I see what the problem is.

Thanks,
Giovanni