Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* QP (Quick Program Profiler) Release
@ 1991-09-16  3:35 James Larus
  0 siblings, 0 replies; only message in thread
From: James Larus @ 1991-09-16  3:35 UTC (permalink / raw)



		     QP: A Quick Program Profiler


QP is an exact and efficient program profiler.  It rewrites a
program's executable file (a.out) by inserting code to record the
execution frequency of every basic block (straight-line sequence of
instructions).  From these counts, another program QP_STATS can
calculate the execution cost of procedures in the program.  Unlike the
Unix tools PROF and GPROF, QP records exact execution frequency, not a
statistical sample.

QP operates in two modes.  In "slow" mode, it places a counter in each
basic block in a program--in the same manner as the MIPS tool PIXIE.
In "quick" mode, QP places counters on an infrequently-executed subset
of the edges in the program's control-flow graph.  This placement can
reduce the cost of profiling by 3-4 times.  Since there is no such
thing as a free lunch, quick profiling requires more program analysis
and consequently slows QP and QP_STATS.  The additional cost to
instrument a program and report results, however, is small and is
quickly gained back when profiling long-running programs.

QP offers a number of advantages over existing systems:

  + On MIPS systems, QP typically requires less overhead than PIXIE
    and can profile programs that use signals.  QP can also produces
    hierarchical profiles (like GPROF).

  + On SPARC-based systems, QP offers exact instruction counts,
    instead of a PC-histogram that is subject to quantization errors.
    QP also does not require recompilation of the program.

QP currently runs on MIPS and SPARC-based systems. I have verified the
ports on a DECstation and Sun 4 by profiling the entire SPEC benchmark
suite and other programs.  A port to the the Motorola 88000 is under
way.  QP is written to be portable--all of the machine-specific
features are collected in a single file.  Porting to a new machine
requires approximately 1 month of effort.

The table below shows the overhead cost of slow and fast QP profiling
and the MIPS program PIXIE:

            Slow      Quick       Pixie
SPEC      Overhead   Overhead    Overhead
Benchmark     %          %           %

gcc          224         78         169
espresso     185         98         113
spice         68         39          43
doduc         33          4          35
nasa7          8          6           3
li           136         85         157
eqntott      158         55         180
matrix30      13         13           7
fpppp         17         12          13
tomcatv       10          9           8

[Overhead measured on a DECstation 5000 with the SPEC benchmarks
compiled at -O2 to permit register scavengering.  Overhead for QP is
slightly larger for SPEC benchmarks compiled at the standard level of
-O3 or -O4.]

Documentation
=============

The algorithms in QP are described in a technical report:

    Thomas Ball and James R. Larus, "Optimally Profiling and Tracing
    Programs," Computer Sciences Technical Report #1031, University of
    Wisconsin, July 1991 (To appear POPL '92).

A postscript version of the technical report is available for
anonymous ftp from primost.cs.wisc.edu in the file
~ftp/pub/opt-prof-tracing.ps.Z


Obtaining QP
============

QP is distributed with the full source and a small amount of documentation.

QP is copyrighted by me and is distributed under license.  A copy of
the license is available on primost.cs.wisc.edu in
~ftp/pub/qp-license.ps.Z or it can be obtained by writing to me at the
address below.

Send a signed copy of the license and a check for $300.00 (US) for a
tape copying charge.  Please make the check payable to "Computer
Sciences Fund -- University of Wisconsin Foundation."  The
foundation's federal taxpayer identification number is 39-074-3975.


James Larus
Computer Sciences Department
1210 West Dayton Street
University of Wisconsin
Madison, WI 53706

larus@cs.wisc.edu
(608) 262-9519



$Header: /home/primost/larus/RCS/BLURB,v 1.6 1991/09/15 20:18:27 larus Exp larus $


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1991-09-16  3:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1991-09-16  3:35 QP (Quick Program Profiler) Release James Larus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox