Bug 1675409 - Migrated TextMarkerPayload to Markers 2.0 API - r=gregtatum

Differential Revision: https://phabricator.services.mozilla.com/D96052
This commit is contained in:
Gerald Squelart
2020-11-17 11:38:06 +00:00
parent d8a7039d7c
commit 003bd0368c
12 changed files with 97 additions and 176 deletions

View File

@@ -179,10 +179,13 @@ void nsDOMNavigationTiming::NotifyLoadEventEnd() {
"Document %s loaded after %dms, load event duration %dms", spec.get(),
int(elapsed.ToMilliseconds()), int(duration.ToMilliseconds()));
PAGELOAD_LOG(("%s", marker.get()));
PROFILER_ADD_MARKER_WITH_PAYLOAD(
"DocumentLoad", DOM, TextMarkerPayload,
(marker, mNavigationStart, mLoadEventEnd,
profiler_get_inner_window_id_from_docshell(mDocShell)));
PROFILER_MARKER_TEXT(
"DocumentLoad", DOM,
MarkerOptions(
MarkerTiming::Interval(mNavigationStart, mLoadEventEnd),
MarkerInnerWindowId(
profiler_get_inner_window_id_from_docshell(mDocShell))),
marker);
}
#endif
TimeStamp loadEventEnd = TimeStamp::Now();
@@ -377,10 +380,13 @@ void nsDOMNavigationTiming::TTITimeout(nsITimer* aTimer) {
int(elapsed.ToMilliseconds()),
int(elapsedLongTask.ToMilliseconds()), spec.get());
PROFILER_ADD_MARKER_WITH_PAYLOAD(
"TimeToFirstInteractive (TTFI)", DOM, TextMarkerPayload,
(marker, mNavigationStart, mTTFI,
profiler_get_inner_window_id_from_docshell(mDocShell)));
PROFILER_MARKER_TEXT(
"TimeToFirstInteractive (TTFI)", DOM,
MarkerOptions(
MarkerTiming::Interval(mNavigationStart, mTTFI),
MarkerInnerWindowId(
profiler_get_inner_window_id_from_docshell(mDocShell))),
marker);
}
#endif
}
@@ -410,10 +416,13 @@ void nsDOMNavigationTiming::NotifyNonBlankPaintForRootContentDocument() {
: "this tab was inactive some of the time between navigation start "
"and first non-blank paint");
PAGELOAD_LOG(("%s", marker.get()));
PROFILER_ADD_MARKER_WITH_PAYLOAD(
"FirstNonBlankPaint", DOM, TextMarkerPayload,
(marker, mNavigationStart, mNonBlankPaint,
profiler_get_inner_window_id_from_docshell(mDocShell)));
PROFILER_MARKER_TEXT(
"FirstNonBlankPaint", DOM,
MarkerOptions(
MarkerTiming::Interval(mNavigationStart, mNonBlankPaint),
MarkerInnerWindowId(
profiler_get_inner_window_id_from_docshell(mDocShell))),
marker);
}
#endif
@@ -459,10 +468,13 @@ void nsDOMNavigationTiming::NotifyContentfulPaintForRootContentDocument(
: "this tab was inactive some of the time between navigation start "
"and first non-blank paint");
PAGELOAD_LOG(("%s", marker.get()));
PROFILER_ADD_MARKER_WITH_PAYLOAD(
"FirstContentfulPaint", DOM, TextMarkerPayload,
(marker, mNavigationStart, mContentfulPaint,
profiler_get_inner_window_id_from_docshell(mDocShell)));
PROFILER_MARKER_TEXT(
"FirstContentfulPaint", DOM,
MarkerOptions(
MarkerTiming::Interval(mNavigationStart, mContentfulPaint),
MarkerInnerWindowId(
profiler_get_inner_window_id_from_docshell(mDocShell))),
marker);
}
#endif
@@ -508,10 +520,13 @@ void nsDOMNavigationTiming::NotifyDOMContentFlushedForRootContentDocument() {
: "this tab was inactive some of the time between navigation start "
"and DOMContentFlushed");
PAGELOAD_LOG(("%s", marker.get()));
PROFILER_ADD_MARKER_WITH_PAYLOAD(
"DOMContentFlushed", DOM, TextMarkerPayload,
(marker, mNavigationStart, mDOMContentFlushed,
profiler_get_inner_window_id_from_docshell(mDocShell)));
PROFILER_MARKER_TEXT(
"DOMContentFlushed", DOM,
MarkerOptions(
MarkerTiming::Interval(mNavigationStart, mDOMContentFlushed),
MarkerInnerWindowId(
profiler_get_inner_window_id_from_docshell(mDocShell))),
marker);
}
#endif
}