Open Bug 1648675 Opened 4 years ago

Consider stopping the profiler when capturing a profile

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: mozbugz, Unassigned)

Details

Currently profiler_get_profile() and related APIs only take the profiler lock while capturing the profile.
The popup UI calls profiler_pause() before, and profiler_stop() after, so in most cases the profiler effectively stops when a profile is captured.

I'm not sure there are useful cases where we really need the profile to continue after capture?

So we should consider implementing something like profiler_stop_and_get_profile(), to always fully stop the profiler and produce a profile, and remove the other non-stopping APIs.

If someone really needs profiling to continue, they could then call profiler_start() -- though it's more expensive.

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