зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1753192 - Add handover marker - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D137805
This commit is contained in:
Родитель
e73913b166
Коммит
c2785cc79a
|
@ -5477,6 +5477,7 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity,
|
|||
mozilla::base_profiler_markers_detail::EnsureBufferForMainThreadAddMarker();
|
||||
|
||||
UniquePtr<ProfileBufferChunkManagerWithLocalLimit> baseChunkManager;
|
||||
bool profilersHandOver = false;
|
||||
if (baseprofiler::profiler_is_active()) {
|
||||
// Note that we still hold the lock, so the sampler cannot run yet and
|
||||
// interact negatively with the still-active BaseProfiler sampler.
|
||||
|
@ -5487,6 +5488,13 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity,
|
|||
// same core buffer, all the base profiler data remains.
|
||||
baseChunkManager = baseprofiler::detail::ExtractBaseProfilerChunkManager();
|
||||
|
||||
if (baseChunkManager) {
|
||||
profilersHandOver = true;
|
||||
BASE_PROFILER_MARKER_TEXT(
|
||||
"Profilers handover", PROFILER, MarkerTiming::IntervalStart(),
|
||||
"Transition from Base to Gecko Profiler, some data may be missing");
|
||||
}
|
||||
|
||||
// Now stop Base Profiler (BP), as further recording will be ignored anyway,
|
||||
// and so that it won't clash with Gecko Profiler (GP) sampling starting
|
||||
// after the lock is dropped.
|
||||
|
@ -5610,6 +5618,11 @@ static void locked_profiler_start(PSLockRef aLock, PowerOfTwo32 aCapacity,
|
|||
|
||||
// At the very end, set up RacyFeatures.
|
||||
RacyFeatures::SetActive(ActivePS::Features(aLock));
|
||||
|
||||
if (profilersHandOver) {
|
||||
PROFILER_MARKER_UNTYPED("Profilers handover", PROFILER,
|
||||
MarkerTiming::IntervalEnd());
|
||||
}
|
||||
}
|
||||
|
||||
void profiler_start(PowerOfTwo32 aCapacity, double aInterval,
|
||||
|
|
Загрузка…
Ссылка в новой задаче