Open Bug 1762526 Opened 3 years ago Updated 2 years ago

Stop using a dedicated thread for profiler startup and control

Categories

(Core :: Gecko Profiler, defect, P2)

defect

Tracking

()

Performance Impact none

People

(Reporter: jesup, Unassigned)

Details

(Keywords: memory-footprint)

Profiler currently uses an always-running thread (ProfilerChild) in every process. Better would be to use a TaskQueue, which would also solve the thread-shutdown issue (ProfilerChild doesn't have code to shut it down at the appropriate time in shutdown; TaskManager ends up cleaning it up).

If there's some reason it can't use a TaskQueue, then it should be started when we send Start, and hopefully shut down when the profiler stops.

This will improve startup (and content-process startup) time, and also reduce memory use.

Performance Impact: --- → ?
Severity: -- → S3
Priority: -- → P2

PProfiler is a top-level protocol. My impression was that top level protocol IPC endpoints need to be bound on a fixed thread and only used on that thread. If that's the case, it wouldn't be a good match for a thread-pool-using task manager.

Performance Impact: ? → -
You need to log in before you can comment on or make changes to this bug.