Make --enable-perf work on macOS
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox114 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
samply is getting support for Jitdump on macOS, so we should make --enable-perf / PerfSpewer work on macOS.
Note that, with these patches applied, --enable-perf builds will crash on Apple Silicon macOS due to bug 1827213, because --enable-perf turns on interpreter entry stubs by default. In the meantime, they can be disabled with --no-emit-interpreter-entry.
| Assignee | ||
Comment 1•3 years ago
|
||
Emitting Jitdump files on macOS will be useful once the samply profiler
supports Jitdump on macOS.
| Assignee | ||
Comment 2•3 years ago
|
||
These flushes cause a fair amount of overhead and aren't really necessary.
Both perf and samply will look at jitdump files once the process has stopped running.
Flushing frequently does have the advantage that the overhead is relatively
evenly distributed over all the places that write to the file; avoiding the
flush just means there will be an automatic flush at an arbitrary point. So
when we look at profiles we'll still have to remove samples in Jitdump file
writing from the profile, to avoid skewing the runtime of the functions which
happened to incur the actual flush. However, the overall flushing time should
be less.
There is another case where frequent flushing would be beneficial: If the
information in the Jitdump file was needed for accurate stack walking, i.e.
if we were using JIT_CODE_UNWINDING_INFO records. But we don't use those
records (we walk the stack using frame pointers), so this doesn't apply.
Depends on D175045
| Assignee | ||
Comment 3•3 years ago
|
||
On Linux, this mmap is needed so that the perf.data file contains MMAP2
records with the filename.
On macOS, samply hooks the open (and fopen) function to observe the
jitdump path, and no mmap is needed.
Depends on D175046
Updated•2 years ago
|
Updated•2 years ago
|
Comment 5•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/663b5e3ebfbc
https://hg.mozilla.org/mozilla-central/rev/edd14c1eb849
https://hg.mozilla.org/mozilla-central/rev/2969fa3d6880
Description
•