Add way to register callbacks that the profiler will invoke when its state changes
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox91 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(1 file)
Reason:
For things like bug 1667818 (where we want to know process priorities at all time), we need to make sure that there is always enough information in a profile to be able to reconstruct a full timeline of some value across time.
One step is to record a marker when the value changes. But this marker could be lost: Maybe the profiler is paused, maybe it's discarded when old data must be removed from the profile buffer.
So the second step is to record markers with the known value when the profiler changes state. E.g., when it pauses, resumes, shuts down, or when a profile is recorded. This way when the profile is output, there should always be at least a final marker with the value.
To achieve this, I'm adding functions to add such callbacks, with a choice of when to invoke them. And optionally a unique identifier may be provided (e.g., the address of an owned object), which can be used to remove the callback later on.
| Assignee | ||
Comment 1•4 years ago
|
||
Callbacks can be registered to be called at specific profiler state changes.
This may be useful to make sure some markers are recorded at the end of the profile time range, if some information would be useful to always have available (and it doesn't fit in meta-information or elsewhere).
Comment 3•4 years ago
|
||
| bugherder | ||
Description
•