Open Bug 1639791 Opened 4 years ago Updated 2 years ago

The profiler should output the list of all registered threads, even those that were not profiled

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mozbugz, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxp])

When capturing a profile, it only contains the threads that were actively profiled (i.e., selected from the list of threads in about:profiling or MOZ_PROFILER_STARTUP_FILTERS).

Some markers (e.g., FileIO, see bug 1464506) will be created from any thread, including non-profiled threads, and even unregistered threads. These markers may reference the thread of origin through a "threadId" field or similar that would contain just the thread number.

I think it would be useful if the profiler could add the list of registered threads to the JSON output.
This could then be used in the front-end, e.g.:

  • To display that list somewhere, to inform users that there were other threads running, and to potentially help them include more of them in future profiling sessions.
  • In FileIO markers, to show a friendlier thread name instead of just the thread id.

Note that we'll need to keep track of unregistered threads that were not profiled! Probably some extra work to do in ActivePS::UnregisterThread().

Memo to self: One area of exploration is to record the CPU usage of all registered threads in all profiles (no bug yet, will probably depend on bug 1329600), in which case this bug here may naturally be implemented that way.

You need to log in before you can comment on or make changes to this bug.