Add a profiler label variant that does nothing if the profiler isn't running
Categories
(Core :: Gecko Profiler, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Attachments
(2 files, 1 obsolete file)
On Speedometer3, even with the profiler disabled, 1.4% of the innerHTML setter is spent pushing and popping profiler labels for the frame constructor:
https://share.firefox.dev/48m13lm 42702 samples in innerHTML
overall
https://share.firefox.dev/48dL34R 606 samples in AutoProfilerLabel
code
These labels use the AUTO_PROFILER_LABEL
macro. I think it would make sense to add an AUTO_PROFILER_LABEL_HOT
macro which checks whether the profiler is running before it pushes the label.
Updated•1 year ago
|
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
The overhead is showing up in Speedometer 3, especially in the innerHTML setter
when it calls into the frame constructor.
Full breakdown of callers across sp3 is here: https://share.firefox.dev/3rfckTG
Time spent in AutoProfilerLabel during TodoMVC-jQuery innerHTML:
Before: https://share.firefox.dev/3Znlydp 378 sampes
After: https://share.firefox.dev/45VdVgr 71 samples
Depends on D188486
Assignee | ||
Comment 3•1 year ago
|
||
This probably doesn't tell the compiler anything it doesn't already know from PGO,
but it shouldn't hurt either.
Depends on D188487
Updated•1 year ago
|
Updated•1 year ago
|
Comment 5•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/08832aa3ba61
https://hg.mozilla.org/mozilla-central/rev/446af5901170
Description
•