Closed Bug 1746361 Opened 2 years ago Closed 2 years ago

Add Runnable markers for runnables wrapped in runners (TaskQueue, AbstractThread, TaskQueueWrapper) and other places (DelayedRunnable)

Categories

(Core :: Gecko Profiler, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(1 file)

These runners (typically for tail dispatched runnables, in the case of TaskQueue and AbstractThread) tend to show up as TaskQueue::Runner in a profile. They do run any number of runnables themselves though, so adding native markers for these would provide extra detail to a profile.

The Runnable markers in the profilers are handy, but miss many types of
runnables. This includes most of those that wrap another runnable and run that
at a (possibly) later time.

AbstractThread, TaskDispatcher and TaskQueue does this for e.g. tail dispatched
tasks.

TaskQueueWrapper does this when wrapping webrtc tasks (and Mozilla Runnables) to
be run in a Mozilla TaskQueue with some overhead on the stack.

DelayedRunnable wraps a runnable to be run after a timeout.

It would perhaps be better in many cases to ignore the intermediate runnables,
but I haven't seen a straight forward way to achieve this.

More detailed data could be added on a case by case basis, for instance the
delay for a DelayedRunnable (incl. actual vs. target delay) or the scope of a
task in which a tail-dispatched runnable was dispatched. But this is also true
for the status quo (for instance the time from dispatch to run) so I leave these
ideas as future work.

Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/58dd008520da
Gecko Profiler: Track wrapped runnables throughout the tree. r=gerald
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/87803df11e5a
Gecko Profiler: Track wrapped runnables throughout the tree. r=gerald
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: