diff --git a/mozilla/tools/jprof/README.html b/mozilla/tools/jprof/README.html index 2d99d29cba6..1bd472be3f8 100644 --- a/mozilla/tools/jprof/README.html +++ b/mozilla/tools/jprof/README.html @@ -1,15 +1,24 @@ -The Jprof Profiler -

The Jprof Profiler


+The Jprof Profiler -

Introduction

+ +
+

The Jprof Profiler

+ +jim_nance@yahoo.com + +
+
+ +

Introduction

Jprof is a profiling tool. I am writing it because I need to find out where mozilla is spending its time, and there do not seem to be any profilers for Linux that can handle threads and/or shared libraries. This code is based heavily on Kipp Hickman's leaky. -

Operation

+

Operation

Jprof operates by installing a timer which periodically interrupts mozilla. When this timer goes off, the jprof code inside mozilla walks the function @@ -17,39 +26,38 @@ call stack to determine which code was executing. By collecting a large number of these call stacks, it is possible to deduce where mozilla is spending its time. -

Use

+

Usage

First, check out the jprof source code since it is not a part of the default SeaMonkeyAll CVS tag. To do this do:
-cvs co mozilla/tools/jprof
-
-

+ cvs co mozilla/tools/jprof +

Next, enable jprof and rebuild mozilla: -

-configure --enable-jprof
-make
+  # jprof needs symbols, do not use --enable-strip-libs
+  ./configure --enable-jprof
+  make
 
Now you can run jprof. To do this the JPROF_FLAGS environment variable must be set. As a simple example:
-cd dist/bin
-env JPROF_FLAGS=JP_START LD_LIBRARY_PATH=. ./mozilla-bin
+  cd dist/bin
+  setenv JPROF_FLAGS JP_START
 

The JPROF_FLAGS environment variable can be composed of several substrings which have the following meanings: