Bug 1815642 - Capture the stack of adding timers named nonfunction:JS when adding profiler markers, r=canaltinova.

Differential Revision: https://phabricator.services.mozilla.com/D169177
This commit is contained in:
Florian Quèze 2023-02-08 10:17:32 +00:00
parent c9b2c13262
commit b5a93c9176

View File

@ -737,6 +737,7 @@ nsresult TimerThread::AddTimer(nsTimerImpl* aTimer,
"AddTimer", geckoprofiler::category::OTHER,
MarkerOptions(MarkerThreadId(mProfilerThreadId),
MarkerStack::MaybeCapture(
name.Equals("nonfunction:JS") ||
StringHead(name, prefix.Length()) == prefix)),
TimerMarker{}, name, aTimer->mDelay.ToMilliseconds(),
MarkerThreadId::CurrentThread());
@ -775,6 +776,7 @@ nsresult TimerThread::RemoveTimer(nsTimerImpl* aTimer,
"RemoveTimer", OTHER,
MarkerOptions(MarkerThreadId(mProfilerThreadId),
MarkerStack::MaybeCapture(
name.Equals("nonfunction:JS") ||
StringHead(name, prefix.Length()) == prefix)),
name);
}