зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1691092 - When capturing a marker stack, stop when the PROFILER category is encountered, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D104248
This commit is contained in:
Родитель
7f356c706e
Коммит
2df72b6edb
|
@ -1368,6 +1368,13 @@ static void MergeStacks(uint32_t aFeatures, bool aIsSynchronous,
|
|||
// Sp marker frames are just annotations and should not be recorded in
|
||||
// the profile.
|
||||
if (!profilingStackFrame.isSpMarkerFrame()) {
|
||||
if (aIsSynchronous && profilingStackFrame.categoryPair() ==
|
||||
ProfilingCategoryPair::PROFILER) {
|
||||
// For stacks captured synchronously (ie. marker stacks), stop
|
||||
// walking the stack as soon as we enter the profiler category,
|
||||
// to avoid showing profiler internal code in marker stacks.
|
||||
return;
|
||||
}
|
||||
aCollector.CollectProfilingStackFrame(profilingStackFrame);
|
||||
}
|
||||
profilingStackIndex++;
|
||||
|
|
|
@ -1843,6 +1843,13 @@ static void MergeStacks(uint32_t aFeatures, bool aIsSynchronous,
|
|||
!profilingStackFrame.pc(),
|
||||
&profilingStackFrame ==
|
||||
&profilingStack.frames[profilingStack.stackSize() - 1]);
|
||||
if (aIsSynchronous && profilingStackFrame.categoryPair() ==
|
||||
JS::ProfilingCategoryPair::PROFILER) {
|
||||
// For stacks captured synchronously (ie. marker stacks), stop
|
||||
// walking the stack as soon as we enter the profiler category,
|
||||
// to avoid showing profiler internal code in marker stacks.
|
||||
return;
|
||||
}
|
||||
aCollector.CollectProfilingStackFrame(profilingStackFrame);
|
||||
}
|
||||
profilingStackIndex++;
|
||||
|
|
Загрузка…
Ссылка в новой задаче