mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1614013 - Fix RAII Profiler object scopes - r=gregtatum
In bug 1578329 I introduced two scoping mistakes: - A marker was made to have a shorter duration. - A label was scoped too short and so would most likely be missed during sampling. This patch reverts to the original wider scope. Differential Revision: https://phabricator.services.mozilla.com/D62274 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0044ed8301
commit
fbbc5d66db
@ -5888,8 +5888,8 @@ bool nsGlobalWindowInner::RunTimeoutHandler(Timeout* aTimeout,
|
|||||||
const char* reason = GetTimeoutReasonString(timeout);
|
const char* reason = GetTimeoutReasonString(timeout);
|
||||||
|
|
||||||
#ifdef MOZ_GECKO_PROFILER
|
#ifdef MOZ_GECKO_PROFILER
|
||||||
|
nsCString str;
|
||||||
if (profiler_can_accept_markers()) {
|
if (profiler_can_accept_markers()) {
|
||||||
nsCString str;
|
|
||||||
TimeDuration originalInterval = timeout->When() - timeout->SubmitTime();
|
TimeDuration originalInterval = timeout->When() - timeout->SubmitTime();
|
||||||
str.Append(reason);
|
str.Append(reason);
|
||||||
str.Append(" with interval ");
|
str.Append(" with interval ");
|
||||||
@ -5898,10 +5898,10 @@ bool nsGlobalWindowInner::RunTimeoutHandler(Timeout* aTimeout,
|
|||||||
nsCString handlerDescription;
|
nsCString handlerDescription;
|
||||||
timeout->mScriptHandler->GetDescription(handlerDescription);
|
timeout->mScriptHandler->GetDescription(handlerDescription);
|
||||||
str.Append(handlerDescription);
|
str.Append(handlerDescription);
|
||||||
AUTO_PROFILER_TEXT_MARKER_CAUSE("setTimeout callback", str, JS,
|
|
||||||
Some(mWindowID),
|
|
||||||
timeout->TakeProfilerBacktrace());
|
|
||||||
}
|
}
|
||||||
|
AUTO_PROFILER_TEXT_MARKER_CAUSE("setTimeout callback", str, JS,
|
||||||
|
Some(mWindowID),
|
||||||
|
timeout->TakeProfilerBacktrace());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool abortIntervalHandler;
|
bool abortIntervalHandler;
|
||||||
|
@ -1741,12 +1741,12 @@ void gfxFontFamily::FindFontForChar(GlobalFontMatch* aMatchData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MOZ_GECKO_PROFILER
|
#ifdef MOZ_GECKO_PROFILER
|
||||||
|
nsCString charAndName;
|
||||||
if (profiler_can_accept_markers()) {
|
if (profiler_can_accept_markers()) {
|
||||||
nsCString charAndName =
|
charAndName = nsPrintfCString("\\u%x %s", aMatchData->mCh, mName.get());
|
||||||
nsPrintfCString("\\u%x %s", aMatchData->mCh, mName.get());
|
|
||||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("gfxFontFamily::FindFontForChar",
|
|
||||||
LAYOUT, charAndName);
|
|
||||||
}
|
}
|
||||||
|
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("gfxFontFamily::FindFontForChar",
|
||||||
|
LAYOUT, charAndName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AutoTArray<gfxFontEntry*, 4> entries;
|
AutoTArray<gfxFontEntry*, 4> entries;
|
||||||
|
Loading…
Reference in New Issue
Block a user