blob: 50eab022a39ea0767ff67410af0c0248781e7c75 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- This file documents the gprof profiler of the GNU system.
Copyright (C) 1988, 1992, 1997, 1998, 1999, 2000, 2001, 2003,
2007, 2008, 2009 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".
-->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU gprof: Debugging</title>
<meta name="description" content="GNU gprof: Debugging">
<meta name="keywords" content="GNU gprof: Debugging">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Details.html#Details" rel="up" title="Details">
<link href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" rel="next" title="GNU Free Documentation License">
<link href="Internals.html#Internals" rel="prev" title="Internals">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Debugging"></a>
<div class="header">
<p>
Previous: <a href="Internals.html#Internals" accesskey="p" rel="prev">Internals</a>, Up: <a href="Details.html#Details" accesskey="u" rel="up">Details</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<a name="Debugging-gprof"></a>
<h3 class="section">9.4 Debugging <code>gprof</code></h3>
<p>If <code>gprof</code> was compiled with debugging enabled,
the &lsquo;<samp>-d</samp>&rsquo; option triggers debugging output
(to stdout) which can be helpful in understanding its operation.
The debugging number specified is interpreted as a sum of the following
options:
</p>
<dl compact="compact">
<dt>2 - Topological sort</dt>
<dd><p>Monitor depth-first numbering of symbols during call graph analysis
</p></dd>
<dt>4 - Cycles</dt>
<dd><p>Shows symbols as they are identified as cycle heads
</p></dd>
<dt>16 - Tallying</dt>
<dd><p>As the call graph arcs are read, show each arc and how
the total calls to each function are tallied
</p></dd>
<dt>32 - Call graph arc sorting</dt>
<dd><p>Details sorting individual parents/children within each call graph entry
</p></dd>
<dt>64 - Reading histogram and call graph records</dt>
<dd><p>Shows address ranges of histograms as they are read, and each
call graph arc
</p></dd>
<dt>128 - Symbol table</dt>
<dd><p>Reading, classifying, and sorting the symbol table from the object file.
For line-by-line profiling (&lsquo;<samp>-l</samp>&rsquo; option), also shows line numbers
being assigned to memory addresses.
</p></dd>
<dt>256 - Static call graph</dt>
<dd><p>Trace operation of &lsquo;<samp>-c</samp>&rsquo; option
</p></dd>
<dt>512 - Symbol table and arc table lookups</dt>
<dd><p>Detail operation of lookup routines
</p></dd>
<dt>1024 - Call graph propagation</dt>
<dd><p>Shows how function times are propagated along the call graph
</p></dd>
<dt>2048 - Basic-blocks</dt>
<dd><p>Shows basic-block records as they are read from profile data
(only meaningful with &lsquo;<samp>-l</samp>&rsquo; option)
</p></dd>
<dt>4096 - Symspecs</dt>
<dd><p>Shows symspec-to-symbol pattern matching operation
</p></dd>
<dt>8192 - Annotate source</dt>
<dd><p>Tracks operation of &lsquo;<samp>-A</samp>&rsquo; option
</p></dd>
</dl>
</body>
</html>