Performance:Tools: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(The section of this page about leak tools was very out of date, so I removed it.)
(mark that this page is very outdated)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Profiling tools =
{{delete|This information is very outdated, please see https://firefox-source-docs.mozilla.org/performance/index.html for more current information about performance tools in Mozilla.|date=10/17/2023}}
 
== Profiling tools ==


The following tools are used to measure product performance.
The following tools are used to measure product performance.


=== Platform-independent ===
* [[Platform/FunctionTimer Usage|FunctionTimer]] - Timing instrumentation. Useful for app startup measurements.
* [http://www.mozilla.org/performance/jsprofiler.html JS Runtime Profiler]. Profile JavaScript usage, dumps output to a file.
* [http://blog.mozilla.com/dmandelin/2009/02/26/tracevis-performance-visualization-for-tracemonkey/ TraceVis] and [http://code.google.com/p/ethogram/ Ethograms] - [https://developer.mozilla.org/en/TraceVis TraceVis usage] and ethogram bug {{bug|497999}}
* [[Perfomatic|Mozilla graph server]]
* [[TestEngineering/Performance/Talos|Talos]] - really nice setup where various performance tests are run automatically and compared against previous builds. Results are posted to the [news://news.mozilla.org/mozilla.dev.tree-management mozilla.dev.tree-management] newsgroup
* [[Dromaeo]] - in-browser Javascript tests
* [https://developer.mozilla.org/en/Mochitest mochitests] - test harness for writing tests in js using full browser
* Various internal tools/settings/whatever
** {{bug|568863}} - provide access to hw perf counters
** {{bug|507012}} - Javascript callback for function entry/exit
=== Platform-specific ===
==== Windows ====
* [https://developer.mozilla.org/Profiling_with_AMD_CodeAnalyst AMD CodeAnalyst]
* Xperf
** ETW (Event Tracing for Windows)
* [http://www.sysinternals.com/ Sysinternals utilities]. Win9x/Me/NT/2K utilites for monitoring system usage. CPU/Mon, Diskmon, Filemon, Regmon, etc.
==== Mac ====
* [https://developer.mozilla.org/en/Profiling_JavaScript_with_Shark Shark]
* The Metrowerks Profiler (on subsets of the codebase), or Apple's Instrumentation SDK. For details, see the [http://www.mozilla.org/performance/mac-performance.html Mac performance page].
==== Linux ====
* [https://wiki.mozilla.org/Performance:Tools/oprofile oprofile]
* sysprof
* [http://www.mozilla.org/performance/jprof.html jprof]. Sampling profiling tool by [mailto:jim_nance@yahoo.com Jim Nance] that runs on 32-bit Linux.
* [http://www.mozilla.org/performance/eazel.html eazel profilers]. Two profiling tools from Eazel/gnome.org.
* [https://perf.wiki.kernel.org/index.php/Main_Page perf] - originally just for the kernel itself, now has decent user-space capabilities
* [http://sourceware.org/systemtap/wiki SystemTap] - similar to perf, but different. They share quite a bit of infrastructure.
More about perf and SystemTap:
SystemTap has a scripting language that gets converted to kernel modules, so is extremely customizable. It is not in the kernel tree, so may not work on the latest greatest kernel. Perf is the current Chosen One within the kernel developer community, and is in the tree (''lots'' of development is happening on perf right now; someone commented that it seems like soon the kernel will be a thin wrapper kept around only to enable running perf.)
Both are useful at seeing what the kernel is doing as a result of a user-space process or processes. Both have some ability to look directly at user processes and report only on them. SystemTap is attempting to be compatible with Solaris's excellent dtrace toolkit, but is still pretty rough. (eg I can't get it to link successfully right now. Taras ran into many different issues.) Both support dynamic probes as well as statically inserted probes. Static probes in user space have rough edges.
==== Other ====
* dtrace - excellent dynamic tracing framework for Solaris. SystemTap is attempting to port and extend its capabilities to Linux.
* [http://alisa.ucsd.edu/cgi/webman?SEARCH+man5+hiprof.5.gz hiprof]. A hierarchical instruction profiler for Digital Unix. There is an [http://www.mozilla.org/performance/atom/atom.html online tutorial], courtesy [mailto:jim_nance@yahoo.com Jim Nance] (jim_nance@yahoo.com):
** ''"I like it because it does not require you to recompile the program, because it give accurate times for callers, and because it comes with DU so that everyone developing there should already have it." [news://news.mozilla.org/slrn7jop6f.jlq.jlnance%40Bessie.acs.uncwil.edu *]''
==== Multiple ====
* [http://valgrind.org/docs/manual/cl-manual.html callgrind] (part of valgrind)
* VTune (Windows & Linux)
* [http://www.ibm.com/software/awdtools/purifyplus/ Rational PurifyPlus]. (Commercial) Used to be called Rational Quantify.
* [http://www.ibm.com/software/awdtools/purifyplus/ Rational PurifyPlus]. (Commercial) Used to be called Rational Quantify.
** [http://www.mozilla.org/performance/qfy2html.pl qfy2html.pl]. A Perl script for munging Quantify 6.0 output into hyperlinked HTML to share with your friends. Run Quantify, save your results as text, and then let this thing rip.
** [http://www.mozilla.org/performance/qfy2html.pl qfy2html.pl]. A Perl script for munging Quantify 6.0 output into hyperlinked HTML to share with your friends. Run Quantify, save your results as text, and then let this thing rip.
** [http://www.mozilla.org/unix/quantify.html Quantifying Mozilla on Solaris]. Instructions on how to make Quantify play nicely with Mozilla on Solaris.
** [http://www.mozilla.org/unix/quantify.html Quantifying Mozilla on Solaris]. Instructions on how to make Quantify play nicely with Mozilla on Solaris.
* For performance work on Mac, you can use either the Metrowerks Profiler (on subsets of the codebase), or Apple's Instrumentation SDK. For details, see the page on [http://www.mozilla.org/performance/mac-performance.html Mac performance].
* [http://alisa.ucsd.edu/cgi/webman?SEARCH+man5+hiprof.5.gz hiprof]. A hierarchical instruction profiler for Digital Unix. There is an [http://www.mozilla.org/performance/atom/atom.html online tutorial], courtesy [mailto:jim_nance@yahoo.com Jim Nance] (jim_nance@yahoo.com):
** "I like it because it does not require you to recompile the program, because it give accurate times for callers, and because it comes with DU so that everyone developing there should already have it." [news://news.mozilla.org/slrn7jop6f.jlq.jlnance%40Bessie.acs.uncwil.edu *]
* [http://www.mozilla.org/performance/jprof.html jprof]. Sampling profiling tool by [mailto:jim_nance@yahoo.com Jim Nance] that runs on RedHat 6.1, 6.2.
* [http://www.mozilla.org/performance/measureStartup.html MOZ_TIMELINE] Timing instrumentation. Extremely useful for app startup measurements.
* [http://www.mozilla.org/performance/eazel.html eazel profilers]. Two profiling tools from Eazel/gnome.org, runs on Linux.
* [http://www.mozilla.org/performance/jsprofiler.html JS Runtime Profiler]. Profile JavaScript usage, dumps output to a file.
* [http://www.sysinternals.com/ Sysinternals utilities]. Win9x/Me/NT/2K utilites for monitoring system usage. CPU/Mon, Diskmon, Filemon, Regmon, etc.
* [http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html gprof]. Part of the [http://www.gnu.org/software/binutils/ GNU Binutils]. Back in May 1999 there were rumors that gprof had trouble with dynamically linked and loaded objects (like Mozilla). Currently (March 2006) gprof is still being developed, so hopefully that's no longer true (assuming it ever was). The link to the gprof manual above is *years* out of date but, at the time of writing, it's the latest version of the [http://www.gnu.org/manual/ manual on gnu.org]. To get an up to date version of the manual, get the gprof source and run |. configure; make html| in the gprof source directory.
* [http://www.gnu.org/software/binutils/manual/gprof-2.9.1/gprof.html gprof]. Part of the [http://www.gnu.org/software/binutils/ GNU Binutils]. Back in May 1999 there were rumors that gprof had trouble with dynamically linked and loaded objects (like Mozilla). Currently (March 2006) gprof is still being developed, so hopefully that's no longer true (assuming it ever was). The link to the gprof manual above is *years* out of date but, at the time of writing, it's the latest version of the [http://www.gnu.org/manual/ manual on gnu.org]. To get an up to date version of the manual, get the gprof source and run |. configure; make html| in the gprof source directory.


= Other References =
== Other References ==
 
* [[Performance:Leak_Tools|Leak Tools]]
* [[Performance:Leak_Tools|Leak Tools]]

Latest revision as of 14:31, 17 October 2023

Do not edit this page THIS PAGE IS PROPOSED FOR DELETION 10/17/2023
This information is very outdated, please see https://firefox-source-docs.mozilla.org/performance/index.html for more current information about performance tools in Mozilla.

Profiling tools

The following tools are used to measure product performance.

Platform-independent

Platform-specific

Windows

Mac

  • Shark
  • The Metrowerks Profiler (on subsets of the codebase), or Apple's Instrumentation SDK. For details, see the Mac performance page.

Linux

  • oprofile
  • sysprof
  • jprof. Sampling profiling tool by Jim Nance that runs on 32-bit Linux.
  • eazel profilers. Two profiling tools from Eazel/gnome.org.
  • perf - originally just for the kernel itself, now has decent user-space capabilities
  • SystemTap - similar to perf, but different. They share quite a bit of infrastructure.

More about perf and SystemTap:

SystemTap has a scripting language that gets converted to kernel modules, so is extremely customizable. It is not in the kernel tree, so may not work on the latest greatest kernel. Perf is the current Chosen One within the kernel developer community, and is in the tree (lots of development is happening on perf right now; someone commented that it seems like soon the kernel will be a thin wrapper kept around only to enable running perf.)

Both are useful at seeing what the kernel is doing as a result of a user-space process or processes. Both have some ability to look directly at user processes and report only on them. SystemTap is attempting to be compatible with Solaris's excellent dtrace toolkit, but is still pretty rough. (eg I can't get it to link successfully right now. Taras ran into many different issues.) Both support dynamic probes as well as statically inserted probes. Static probes in user space have rough edges.

Other

  • dtrace - excellent dynamic tracing framework for Solaris. SystemTap is attempting to port and extend its capabilities to Linux.
  • hiprof. A hierarchical instruction profiler for Digital Unix. There is an online tutorial, courtesy Jim Nance (jim_nance@yahoo.com):
    • "I like it because it does not require you to recompile the program, because it give accurate times for callers, and because it comes with DU so that everyone developing there should already have it." *

Multiple

  • callgrind (part of valgrind)
  • VTune (Windows & Linux)
  • Rational PurifyPlus. (Commercial) Used to be called Rational Quantify.
    • qfy2html.pl. A Perl script for munging Quantify 6.0 output into hyperlinked HTML to share with your friends. Run Quantify, save your results as text, and then let this thing rip.
    • Quantifying Mozilla on Solaris. Instructions on how to make Quantify play nicely with Mozilla on Solaris.
  • gprof. Part of the GNU Binutils. Back in May 1999 there were rumors that gprof had trouble with dynamically linked and loaded objects (like Mozilla). Currently (March 2006) gprof is still being developed, so hopefully that's no longer true (assuming it ever was). The link to the gprof manual above is *years* out of date but, at the time of writing, it's the latest version of the manual on gnu.org. To get an up to date version of the manual, get the gprof source and run |. configure; make html| in the gprof source directory.

Other References