Closed Bug 2065730 Opened 2 months ago Closed 2 months ago

Add a profiler marker per ClearOnShutdown entry

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: jstutte, Assigned: jstutte)

References

Details

Attachments

(1 external file)

KillClearOnShutdown walks a list of type erased observers, so a profile shows the aggregate cost of a phase's clearing with no way to tell which entry is responsible, and nothing at all about which entries are registered for a phase. Measured locally that aggregate reaches ~16ms for XPCOMShutdown, with a single entry (FOG.cpp:95) accounting for 1.1ms of it.

Record the calling location in ShutdownObserver and emit a marker around each entry, using the source_location shim from bug 2065729 rather than hand-rolling the location builtins again.

Originally posted as D320448 in bug 2065408 and split out here so the dependency on the MFBT work is explicit. The other two patches in that bug do not depend on it and can land independently.

KillClearOnShutdown walks a list of type erased observers, so a profile shows
the aggregate cost of a phase's clearing with no way to tell which entry is
responsible, and nothing at all about which entries are registered for a phase.

Record the calling location in ShutdownObserver and emit a marker around each
entry.

Assignee: nobody → jstutte
Status: NEW → ASSIGNED
No longer depends on: 2065729
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: