Existing Tools

  • Revision slug: Debugging/Existing_Tools
  • Revision title: Existing Tools
  • Revision id: 6198
  • Created:
  • Creator: ziyunfei
  • Is current revision? No
  • Comment 1 words added

Revision Content

A non-complete list of existing tools to help debugging performance and memory problems.

SPS - Built-in profiler

profiler.pngDescription: Add-on that runs the built-in profiler, retrieves the data and parses it on a web service, displaying a call tree and a timeline with responsiveness measurements.
Good for: Figuring out where time is being spent in the code / what is hanging Firefox
URL: geckoprofiler.xpi on GitHub
How to use: After installing the add-on, click on the icon in the Add-ons bar (status bar) to open an widget with Start/Stop and Analyze buttons. More details at Profiling with the built-in profiler. The profiling build can be used to get accurate call stacks (currently Mac only).

 

about:jank

aboutjank.PNGDescription: Add-on that runs the built-in profiler and displays the retrieved data on about:jank
Good for: Figuring out where time is being spent in the code / what is hanging Firefox
URL: about:jank on AMO
How to use: Open about:jank for the first time to activate the profiler, then refresh or reopen the page to see the accumulated data.

 

 

 

about:telemetry

aboutelemetry.pngDescription: Displays the data gathered by telemetry for the current profile: histograms, slow SQL statements and a start-up timeline.
Good for: Getting performance data for the current profile
URL: about:telemetry on AMO
How to use: Make sure that telemetry reporting is on (Options -> Advanced -> Submit performance data) and open about:telemetry.

 

 

about:startup

aboutstartup.PNGDescription: This addon displays startup timings as exposed by a Gecko API at the about:startup.
Good for: Getting startup performance information for the current profile
URL: about:startup on AMO
How to use: Install the add-on and open about:startup.

 

 

about:cc

aboutcc.PNGDescription: Analyzes the cycle collection graphs and helps find leaks (specially documents) and missing CC optimizations.
Good for: Finding leaked documents
URL: about:cc on bugzilla
How to use: Install the add-on (a restart is recommended), open about:cc.  First click on Run Cycle Collector, and then on Find Documents.

 

about:ccdump

aboutccdump.pngDescription: More graphical interface to about:cc. Helps analyze cycle collection graphs and finding leaks
Good for: Finding cycles that are causing memory leaks
URL: about:ccdump on AMO
How to use: See Jan Odvarko's post for detailed information.

 

about:nosy

about-nosy-overview-scaled.pngDescription: Graphical interface for jsprobes. Helps analyze which tab is consuming the most resources
Good for: Seeing the memory and CPU usage of your tabs and extensions (that live in compartments)
URL: about:nosy on Github
How to use: See Andrew Sutherland's post for detailed information. Note: existing builds at https://clicky.visophyte.org/files/labs/about-nosy/ only work in earlier versions of Firefox "Aurora" 12.

 

MemChaser

memchaser.pngDescription: Displays GC/CC and memory usage information on the Add-ons bar (status bar). Also toggles the memory reporting logging.
Good for: Track GC and memory usage over time during a regular browsing session.
URL: MemChaser on AMO
How to use: Install the add-on and open the Add-ons bar.

 

MozRegression

Description: Python script that greatly helps you binary-search a regression bug through the nightly builds by automatically downloading and running each build with a fresh profile.
Good for: Finding the nightly regression range for a bug that you're not sure when was introduced.
URL: MozRegression on GitHub
How to use: First find a nightly build date that you're sure the problem exists, and one where you're sure it doesn't. Then run mozregression --good=yyyy-mm-dd --bad=yyyy-mm-dd and the script will guide you on finding the regression.

 

Layout painting flash

Description: Activating this option, the rendered content will be flashed with a random color every time it's painted on screen
Good for: Finding unneccessary painting or invalidation problems
URL: Set nglayout.debug.paint_flashing to true in about:config
How to use: Set the pref in about:config. More information on this post.

 

Logging GC/CC times

Description: Logs the timing for GC/CC runs to the Error Console.
Good for: Figuring out if Garbage/Cycle collection is taking too long.
URL: Set javascript.options.mem.log to true in about:config
How to use: Set the pref in about:config. Open the Error Console to view the logged information.

{{ languages( { "zh-cn": "zh-cn/Debugging/Existing_Tools"} ) }}

Revision Source

<p>A non-complete list of existing tools to help debugging performance and memory problems.</p>
<h2>SPS - Built-in profiler</h2>
<p><a href="/@api/deki/files/6129/=profiler.png" title="profiler.png"><img align="left" alt="profiler.png" class="internal lwrap" src="/@api/deki/files/6129/=profiler.png?size=thumb" style="width: 160px; height: 91px;"></a><strong>Description:</strong> Add-on that runs the built-in profiler, retrieves the data and parses it on a web service, displaying a call tree and a timeline with responsiveness measurements.<br> <strong> Good for:</strong> Figuring out where time is being spent in the code / what is hanging Firefox<br> <strong> URL:</strong> <a class="link-https" href="https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler.xpi" title="https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler.xpi">geckoprofiler.xpi on GitHub</a><br> <strong> How to use:</strong> After installing the add-on, click on the icon in the Add-ons bar (status bar) to open an widget with Start/Stop and Analyze buttons. More details at <a href="/en/Performance/Profiling_with_the_Built-in_Profiler" title="En/Performance/Profiling_with_the_Built-in_Profiler">Profiling with the built-in profiler</a>. The <a class="external" href="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-profiling/" title="http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-profiling/">profiling build</a> can be used to get accurate call stacks (currently Mac only).</p>
<p> </p>
<h2>about:jank</h2>
<p><a href="/@api/deki/files/6128/=aboutjank.PNG" title="aboutjank.PNG"><img align="left" alt="aboutjank.PNG" class="internal lwrap" src="/@api/deki/files/6128/=aboutjank.PNG?size=webview" style="width: 148px; height: 159px;"></a><strong>Description:</strong> Add-on that runs the built-in profiler and displays the retrieved data on about:jank<br> <strong> Good for:</strong> Figuring out where time is being spent in the code / what is hanging Firefox<br> <strong> URL:</strong> <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/aboutjank/" title="https://addons.mozilla.org/en-US/firefox/addon/aboutjank/">about:jank on AMO</a><br> <strong> How to use:</strong> Open about:jank for the first time to activate the profiler, then refresh or reopen the page to see the accumulated data.</p>
<p> </p>
<p> </p>
<p> </p>
<h2>about:telemetry</h2>
<p><strong><a href="/@api/deki/files/6127/=aboutelemetry.png" title="aboutelemetry.png"><img align="left" alt="aboutelemetry.png" class="internal lwrap" src="/@api/deki/files/6127/=aboutelemetry.png?size=webview" style="width: 160px; height: 124px;"></a></strong><strong>Description:</strong> Displays the data gathered by telemetry for the current profile: histograms, slow SQL statements and a start-up timeline.<br> <strong>Good for:</strong> Getting performance data for the current profile<br> <strong>URL:</strong> <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/abouttelemetry/" title="https://addons.mozilla.org/en-US/firefox/addon/abouttelemetry/">about:telemetry on AMO</a><br> <strong>How to use:</strong> Make sure that telemetry reporting is on (Options -&gt; Advanced -&gt; Submit performance data) and open about:telemetry.</p>
<p> </p>
<p> </p>
<h2>about:startup</h2>
<p><strong><a href="/@api/deki/files/6130/=aboutstartup.PNG" title="aboutstartup.PNG"><img align="left" alt="aboutstartup.PNG" class="internal lwrap" src="/@api/deki/files/6130/=aboutstartup.PNG?size=thumb" style="width: 160px; height: 90px;"></a>Description:</strong> This addon displays startup timings as exposed by a Gecko API at the about:startup.<br> <strong> Good for:</strong> Getting startup performance information for the current profile<br> <strong> URL:</strong> <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/about-startup/" title="https://addons.mozilla.org/en-US/firefox/addon/about-startup/">about:startup on AMO</a><br> <strong> How to use:</strong> Install the add-on and open about:startup.</p>
<p> </p>
<p> </p>
<h2>about:cc</h2>
<p><strong><a href="/@api/deki/files/6126/=aboutcc.PNG" title="aboutcc.PNG"><img align="left" alt="aboutcc.PNG" class="internal lwrap" src="/@api/deki/files/6126/=aboutcc.PNG?size=webview" style="width: 159px; height: 96px;"></a>Description:</strong> Analyzes the cycle collection graphs and helps find leaks (specially documents) and missing CC optimizations.<br> <strong> Good for:</strong> Finding leaked documents<br> <strong> URL:</strong> <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=726346" title="https://bugzilla.mozilla.org/show_bug.cgi?id=726346">about:cc on bugzilla</a><br> <strong> How to use:</strong> Install the add-on (a restart is recommended), open about:cc.  First click on Run Cycle Collector, and then on Find Documents.</p>
<p> </p>
<h2>about:ccdump</h2>
<p><strong><a href="/@api/deki/files/6125/=aboutccdump.png" title="aboutccdump.png"><img align="left" alt="aboutccdump.png" class="internal lwrap" src="/@api/deki/files/6125/=aboutccdump.png?size=thumb" style="width: 160px; height: 70px;"></a>Description:</strong> More graphical interface to about:cc. Helps analyze cycle collection graphs and finding leaks<br> <strong> Good for:</strong> Finding cycles that are causing memory leaks<br> <strong> URL:</strong> <a href="/en/Submitting_an_add-on_to_AMO" title="Submitting an add-on to AMO">about:ccdump on AMO</a><br> <strong> How to use:</strong> See <a class="external" href="http://www.softwareishard.com/blog/planet-mozilla/hunting-zombie-memory-leaks-in-firefox/" title="http://www.softwareishard.com/blog/planet-mozilla/hunting-zombie-memory-leaks-in-firefox/">Jan Odvarko's post</a> for detailed information.</p>
<p> </p>
<h2>about:nosy</h2>
<p><strong><a class="external" href="http://www.visophyte.org/blog/wp-content/uploads/2012/02/about-nosy-overview-scaled.png" title="about-nosy-overview-scaled.png"><img align="left" alt="about-nosy-overview-scaled.png" class="internal lwrap" src="http://www.visophyte.org/blog/wp-content/uploads/2012/02/about-nosy-overview-scaled.png" style="width: 160px; height: 70px;"></a>Description:</strong> Graphical interface for jsprobes. Helps analyze which tab is consuming the most resources<br> <strong> Good for:</strong> Seeing the memory and CPU usage of your tabs and extensions (that live in compartments)<br> <strong> URL:</strong> <a class="link-https" href="https://github.com/asutherland/about-nosy/" title="about:nosy on Github">about:nosy on Github</a><br> <strong> How to use:</strong> See <a class="external" href="http://www.visophyte.org/blog/2012/02/11/aboutnosy-can-now-show-cpu-usage-using-jsprobes/" title="http://www.visophyte.org/blog/2012/02/11/aboutnosy-can-now-show-cpu-usage-using-jsprobes/">Andrew Sutherland's post</a> for detailed information. Note: existing builds at <a class=" link-https" href="https://clicky.visophyte.org/files/labs/about-nosy/" rel="freelink">https://clicky.visophyte.org/files/labs/about-nosy/</a> only work in earlier versions of Firefox "Aurora" 12.</p>
<p> </p>
<h2>MemChaser</h2>
<p><strong><a href="/@api/deki/files/6131/=memchaser.png" title="memchaser.png"><img align="left" alt="memchaser.png" class="internal lwrap" src="/@api/deki/files/6131/=memchaser.png?size=thumb" style="width: 160px; height: 44px;"></a>Description:</strong> Displays GC/CC and memory usage information on the Add-ons bar (status bar). Also toggles the memory reporting logging.<br> <strong> Good for:</strong> Track GC and memory usage over time during a regular browsing session.<br> <strong> URL:</strong> <a href="/en/Submitting_an_add-on_to_AMO" title="Submitting an add-on to AMO">MemChaser on AMO</a><br> <strong> How to use:</strong> Install the add-on and open the Add-ons bar.</p>
<p> </p>
<h2>MozRegression</h2>
<p><strong>Description:</strong> Python script that greatly helps you binary-search a regression bug through the nightly builds by automatically downloading and running each build with a fresh profile.<br> <strong>Good for:</strong> Finding the nightly regression range for a bug that you're not sure when was introduced.<br> <strong>URL:</strong> <a class="link-https" href="https://github.com/mozilla/mozregression/" title="https://github.com/mozilla/mozregression/">MozRegression on GitHub</a><br> <strong>How to use:</strong> First find a nightly build date that you're sure the problem exists, and one where you're sure it doesn't. Then run <code>mozregression --good=yyyy-mm-dd --bad=yyyy-mm-dd</code> and the script will guide you on finding the regression.</p>
<p> </p>
<h2>Layout painting flash</h2>
<p><strong>Description:</strong> Activating this option, the rendered content will be flashed with a random color every time it's painted on screen<br> <strong>Good for:</strong> Finding unneccessary painting or invalidation problems<br> <strong>URL:</strong> Set <em>nglayout.debug.paint_flashing</em> to <em>true</em> in about:config<br> <strong>How to use:</strong> Set the pref in about:config. More information on <a class="external" href="http://msujaws.wordpress.com/2012/02/01/layout-paint-flashing-in-firefox/" title="http://msujaws.wordpress.com/2012/02/01/layout-paint-flashing-in-firefox/">this post</a>.</p>
<p> </p>
<h2>Logging GC/CC times</h2>
<p><strong>Description:</strong> Logs the timing for GC/CC runs to the Error Console.<br> <strong>Good for:</strong> Figuring out if Garbage/Cycle collection is taking too long.<br> <strong>URL:</strong> Set <em><span class="message">javascript.options.mem.log</span></em> to <em>true</em> in about:config<br> <strong>How to use:</strong> Set the pref in about:config. Open the Error Console to view the logged information.</p>
<p>{{ languages( { "zh-cn": "zh-cn/Debugging/Existing_Tools"} ) }}</p>
Revert to this revision