Open Bug 1839587 Opened 2 years ago

Call `PreRecordMetaInformation()` only when profiler is active in profiler_shutdown

Categories

(Core :: Gecko Profiler, task, P3)

task

Tracking

()

Tracking Status
firefox116 --- affected

People

(Reporter: canova, Unassigned)

Details

Currently we are calling the PreRecordMetaInformation even though profiler is not active during shutdown. We should only call it when the profiler is active because we don't need it otherwise.

Currently we can't put it inside the if (ActivePS::Exists(lock)) branch below because PreRecordMetaInformation has to be called outside of the profiler lock.

The best place looks like here, inside the if (profiler_is_active()) if branch above:
https://searchfox.org/mozilla-central/rev/4e8f62a231e71dc53eb50b6d74afca21d6b254e9/tools/profiler/core/platform.cpp#5329-5331

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