48
edits
(Created page with "Today’s meeting leader is: '''mtigley''' =General Topics / Roundtable= * [jaws] Firefox engineering productivity tools/scripts lightning talks? Waiting a few weeks to see...") |
(→Performance Tools: Fix formatting for Performance Tools) |
||
| Line 95: | Line 95: | ||
==Performance Tools== | ==Performance Tools== | ||
* Firefox Profiler has a new and more powerful C++ marker API now! You can create your own custom marker type and specify how to display it in the front-end without touching any front-end code. [https://firefox-source-docs.mozilla.org/tools/profiler/markers-guide.html ''Take a look at the docs to see how to use it.''] | * Firefox Profiler has a new and more powerful C++ marker API now! You can create your own custom marker type and specify how to display it in the front-end without touching any front-end code. [https://firefox-source-docs.mozilla.org/tools/profiler/markers-guide.html ''Take a look at the docs to see how to use it.''] | ||
Example code: | |||
< | Example code: | ||
<syntaxhighlight> | |||
// Record a simple marker with the category of DOM. | // Record a simple marker with the category of DOM. | ||
PROFILER_MARKER_UNTYPED("Marker Name", DOM); | |||
PROFILER_MARKER_UNTYPED( | |||
// Create a marker with some additional text information. | // Create a marker with some additional text information. | ||
PROFILER_MARKER_TEXT("Marker Name", JS, MarkerOptions{}, "Additional text information"); | |||
PROFILER_MARKER_TEXT( | |||
// Record a custom marker of type `ExampleNumberMarker` (see definition in the documentation). | // Record a custom marker of type `ExampleNumberMarker` (see definition in the documentation). | ||
PROFILER_MARKER("Number", OTHER, MarkerOptions{}, ExampleNumberMarker, 42); | |||
</syntaxhighlight> | |||
*The [https://bugzilla.mozilla.org/show_bug.cgi?id=1674476 ''ChromeUtils.addProfilerMarker API has been extended'']. It now supports capturing a stack trace and setting the marker category. | |||
Example: | |||
<syntaxhighlight> | |||
let startTime = performance.now(); | let startTime = performance.now(); | ||
… | |||
… | |||
ChromeUtils.addProfilerMarker(“Marker Name”, {startTime, captureStack: true, category: “Test“}, “Marker text”); | ChromeUtils.addProfilerMarker(“Marker Name”, {startTime, captureStack: true, category: “Test“}, “Marker text”); | ||
</syntaxhighlight> | |||
Currently supported values for the category are "Idle", "Other", "Test", "Layout", "JavaScript", "GC / CC", "Network", "Graphics", "DOM", "IPC", "Media". Using an unknown category name will fallback to the “Other” category.<br /> | Currently supported values for the category are "Idle", "Other", "Test", "Layout", "JavaScript", "GC / CC", "Network", "Graphics", "DOM", "IPC", "Media". Using an unknown category name will fallback to the “Other” category.<br /> | ||
edits