зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1170671 - ProfileTimelineMarkers that use TRACING_TIMESTAMP should capture stack information. r=smaug
This commit is contained in:
Родитель
d6a8387f7e
Коммит
a293db6727
|
@ -26,6 +26,7 @@ function* spawnTest () {
|
|||
|
||||
let maxMarkerTime = model._timelineStartTime + model.getDuration() + TIME_CLOSE_TO;
|
||||
|
||||
ok(markers.every(({stack}) => typeof stack === "number"), "All markers have stack references.");
|
||||
ok(markers.every(({name}) => name === "TimeStamp"), "All markers found are TimeStamp markers");
|
||||
ok(markers.length === 2, "found 2 TimeStamp markers");
|
||||
ok(markers.every(({start}) => typeof start === "number" && start > 0 && start < maxMarkerTime),
|
||||
|
|
|
@ -15,7 +15,7 @@ TimelineMarker::TimelineMarker(nsDocShell* aDocShell, const char* aName,
|
|||
MOZ_COUNT_CTOR(TimelineMarker);
|
||||
MOZ_ASSERT(aName);
|
||||
aDocShell->Now(&mTime);
|
||||
if (aMetaData == TRACING_INTERVAL_START) {
|
||||
if (aMetaData == TRACING_INTERVAL_START || aMetaData == TRACING_TIMESTAMP) {
|
||||
CaptureStack();
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,9 @@ TimelineMarker::TimelineMarker(nsDocShell* aDocShell, const char* aName,
|
|||
MOZ_COUNT_CTOR(TimelineMarker);
|
||||
MOZ_ASSERT(aName);
|
||||
aDocShell->Now(&mTime);
|
||||
if (aMetaData == TRACING_INTERVAL_START && aStackRequest != NO_STACK) {
|
||||
if ((aMetaData == TRACING_INTERVAL_START ||
|
||||
aMetaData == TRACING_TIMESTAMP) &&
|
||||
aStackRequest != NO_STACK) {
|
||||
CaptureStack();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2997,6 +2997,7 @@ nsDocShell::PopProfileTimelineMarkers(
|
|||
marker->mName = NS_ConvertUTF8toUTF16(startPayload->GetName());
|
||||
marker->mStart = startPayload->GetTime();
|
||||
marker->mEnd = startPayload->GetTime();
|
||||
marker->mStack = startPayload->GetStack();
|
||||
startPayload->AddDetails(aCx, *marker);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -1044,7 +1044,6 @@ public:
|
|||
const nsAString& aCause)
|
||||
: TimelineMarker(aDocShell, "TimeStamp", aMetaData, aCause)
|
||||
{
|
||||
CaptureStack();
|
||||
MOZ_ASSERT(aMetaData == TRACING_TIMESTAMP);
|
||||
}
|
||||
|
||||
|
@ -1054,7 +1053,6 @@ public:
|
|||
if (!GetCause().IsEmpty()) {
|
||||
aMarker.mCauseName.Construct(GetCause());
|
||||
}
|
||||
aMarker.mEndStack = GetStack();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче