Personal tools

Performance:Tools

From MozillaWiki

Jump to: navigation, search

Contents

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