My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

Table of contents

Overview

aprof is a Valgrind tool for performance profiling designed to help developers discover hidden asymptotic inefficiencies in the code. From a single run of a program, aprof measures how the performance of individual routines scales as a function of the input size, yielding clues to its growth rate and to the "big-O" of the program.

Basic usage

To start a profile run for a program, execute:

cd aprof_valgrind
./inst/bin/valgrind --tool=aprof your-program [program options]

aprof will produce, in the working directory, a report for each thread of your program. Each report is a text file that has a name of the form your-program_TID.aprof and contains profile data in aprof's file format. Report files can be visualized with aprof-plot.

Plot examples

The following performance plots illustrate examples excerpted from the SPEC CPU2006 benchmarks. All reports were generated by aprof on single runs on reference workloads. Plots were produced by aprof-plot. The cost metric is the number of executed basic blocks. In cost, total cost, and ratio plots, point colors reflect the numbers of routine invocations on a given read memory size, in accordance with the following legend:

gobmk

Artificial Intelligence: Go - Plays the game of Go, a simply described but deeply complex game.

Routine: owl_shapes()

Routine: accumulate_influence()

Routine: simple_ladder_defend()

gcc

C Compiler - Based on gcc Version 3.2. Generates code for Opteron.

Routine: recog_for_combine_mmm() Routine: sched_analyze_2()

bzip2

Compression - Julian Seward's bzip2 version 1.0.3, modified to do most work in memory, rather than doing I/O.

Routine: BZ2_bzDecompress()

calculix

Structural Mechanics - Finite element code for linear and nonlinear 3D structural applications. Uses the SPOOLES solver library.

Routine: I2Ohash_insert()

Routine: IV2isortUp()

Routine: SubMtx_sortColumnsUp()

h264ref

Video Compression - Reference implementation of H.264/AVC, encodes a videostream using 2 parameter sets.

Routine: PartitionMotionSearch()

gamess

Quantum Chemistry - Implements a wide range of quantum chemical computations. For the SPEC workload, self-consistent field calculations are performed using the Restricted Hartree Fock method, Restricted open-shell Hartree-Fock, and Multi-Configuration Self-Consistent Field.

Routine: dasum_()Routine: dirfck_()

Routine: elau()

hmmer

Search Gene Sequence - Protein sequence analysis using profile hidden Markov models (profile HMMs)

Routine: P7Viterbi()

tonto

Quantum Chemistry - An open source quantum chemistry package, using an object-oriented design in Fortran 95. The test case places a constraint on a molecular Hartree-Fock wavefunction calculation to better match experimental X-ray diffraction data.

Routine: __shell1quartet_module__make_r_jk_ascd()

Installing aprof

Currently, aprof does not ship with Valgrind, so you have to download it from our svn repo:

svn checkout http://aprof.googlecode.com/svn/trunk/valgrind aprof_valgrind

To compile it (automake tools are needed):

cd aprof_valgrind
./autogen.sh
./configure --prefix=`pwd`/inst
make

the downloaded repository includes Valgrind 3.7.0 - svn rev. 12556. Using the --prefix param of the configure command we avoid any collision with other installations of Valgrind in your system. aprof will be installed locally under the aprof_valgrind/inst directory. You can install it with:

make install

If you are on an ARM/PPC architecture please read this first.

Developers

Current

Former

  • Bruno Aleandri

Papers

The methodology, evaluation, and implementation of aprof is described in an upcoming PLDI 2012 paper:

  • Emilio Coppa, Camil Demetrescu, Irene Finocchi: Input-Sensitive Profiling. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2012), June 11-16, 2012, Beijing, China. To appear.
Powered by Google Project Hosting