Firefox/Meeting/01-Dec-2020: Difference between revisions

Jump to navigation Jump to search
→‎Performance Tools: Fix formatting for Performance Tools
(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.'']<br />
* 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:<br />
 
<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(&quot;Marker Name&quot;, DOM);


// 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(&quot;Marker Name&quot;, JS, MarkerOptions{}, &quot;Additional text information.&quot;);


// 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>


PROFILER_MARKER(&quot;Number&quot;, OTHER, MarkerOptions{}, ExampleNumberMarker, 42);
*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.
</code>
<ul>
<li><p>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.</p>
<ul>
<li><blockquote><p>Example:</p></blockquote></li></ul>
</li></ul>


Example:
<syntaxhighlight>
let startTime = performance.now();
let startTime = performance.now();
 
<br />
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 &quot;Idle&quot;, &quot;Other&quot;, &quot;Test&quot;, &quot;Layout&quot;, &quot;JavaScript&quot;, &quot;GC / CC&quot;, &quot;Network&quot;, &quot;Graphics&quot;, &quot;DOM&quot;, &quot;IPC&quot;, &quot;Media&quot;. Using an unknown category name will fallback to the “Other” category.<br />
Currently supported values for the category are &quot;Idle&quot;, &quot;Other&quot;, &quot;Test&quot;, &quot;Layout&quot;, &quot;JavaScript&quot;, &quot;GC / CC&quot;, &quot;Network&quot;, &quot;Graphics&quot;, &quot;DOM&quot;, &quot;IPC&quot;, &quot;Media&quot;. Using an unknown category name will fallback to the “Other” category.<br />
48

edits

Navigation menu