mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1526508 - add profiler markers for importing a JS module, loading a JS XPCOM component or a subscript r=mstange
Bug 1526508 - add profiler markers for importing a JS module, loading a JS XPCOM component or a subscript Differential Revision: https://phabricator.services.mozilla.com/D19228 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8a104d860e
commit
5de09797c0
@ -395,6 +395,8 @@ const mozilla::Module* mozJSComponentLoader::LoadModule(FileLocation& aFile) {
|
||||
}
|
||||
}
|
||||
|
||||
AUTO_PROFILER_TEXT_MARKER_CAUSE("JS XPCOM", spec, JS,
|
||||
profiler_get_backtrace());
|
||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("mozJSComponentLoader::LoadModule",
|
||||
OTHER, spec);
|
||||
|
||||
@ -1268,8 +1270,9 @@ nsresult mozJSComponentLoader::Import(JSContext* aCx,
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("mozJSComponentLoader::Import", JS,
|
||||
aLocation);
|
||||
AUTO_PROFILER_TEXT_MARKER_CAUSE("ChromeUtils.import", aLocation, JS,
|
||||
profiler_get_backtrace());
|
||||
|
||||
ComponentLoaderInfo info(aLocation);
|
||||
|
||||
rv = info.EnsureKey();
|
||||
|
@ -590,6 +590,8 @@ nsresult mozJSSubScriptLoader::DoLoadSubScriptWithOptions(
|
||||
}
|
||||
|
||||
NS_LossyConvertUTF16toASCII asciiUrl(url);
|
||||
AUTO_PROFILER_TEXT_MARKER_CAUSE("SubScript", asciiUrl, JS,
|
||||
profiler_get_backtrace());
|
||||
AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING(
|
||||
"mozJSSubScriptLoader::DoLoadSubScriptWithOptions", OTHER, asciiUrl);
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
# define AUTO_PROFILER_TRACING(categoryString, markerName, category)
|
||||
# define AUTO_PROFILER_TRACING_DOCSHELL(categoryString, markerName, category, \
|
||||
docShell)
|
||||
# define AUTO_PROFILER_TEXT_MARKER_CAUSE(markerName, text, category, cause)
|
||||
# define AUTO_PROFILER_TEXT_MARKER_DOCSHELL(markerName, text, category, \
|
||||
docShell)
|
||||
# define AUTO_PROFILER_TEXT_MARKER_DOCSHELL_CAUSE(markerName, text, category, \
|
||||
@ -749,6 +750,12 @@ class MOZ_RAII AutoProfilerTextMarker {
|
||||
const mozilla::Maybe<uint32_t> mDocShellHistoryId;
|
||||
};
|
||||
|
||||
# define AUTO_PROFILER_TEXT_MARKER_CAUSE(markerName, text, category, \
|
||||
cause) \
|
||||
AutoProfilerTextMarker PROFILER_RAII( \
|
||||
markerName, text, js::ProfilingStackFrame::Category::category, \
|
||||
Nothing(), Nothing(), cause)
|
||||
|
||||
# define AUTO_PROFILER_TEXT_MARKER_DOCSHELL(markerName, text, category, \
|
||||
docShell) \
|
||||
DECLARE_DOCSHELL_AND_HISTORY_ID(docShell); \
|
||||
|
Loading…
Reference in New Issue
Block a user