1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<html>
3<!-- This file documents the gprof profiler of the GNU system.
4
5Copyright (C) 1988-2021 Free Software Foundation, Inc.
6
7Permission is granted to copy, distribute and/or modify this document
8under the terms of the GNU Free Documentation License, Version 1.3
9or any later version published by the Free Software Foundation;
10with no Invariant Sections, with no Front-Cover Texts, and with no
11Back-Cover Texts.  A copy of the license is included in the
12section entitled "GNU Free Documentation License".
13 -->
14<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
15<head>
16<title>GNU gprof: Debugging</title>
17
18<meta name="description" content="GNU gprof: Debugging">
19<meta name="keywords" content="GNU gprof: Debugging">
20<meta name="resource-type" content="document">
21<meta name="distribution" content="global">
22<meta name="Generator" content="makeinfo">
23<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
24<link href="index.html#Top" rel="start" title="Top">
25<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
26<link href="Details.html#Details" rel="up" title="Details">
27<link href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License" rel="next" title="GNU Free Documentation License">
28<link href="Internals.html#Internals" rel="previous" title="Internals">
29<style type="text/css">
30<!--
31a.summary-letter {text-decoration: none}
32blockquote.smallquotation {font-size: smaller}
33div.display {margin-left: 3.2em}
34div.example {margin-left: 3.2em}
35div.indentedblock {margin-left: 3.2em}
36div.lisp {margin-left: 3.2em}
37div.smalldisplay {margin-left: 3.2em}
38div.smallexample {margin-left: 3.2em}
39div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
40div.smalllisp {margin-left: 3.2em}
41kbd {font-style:oblique}
42pre.display {font-family: inherit}
43pre.format {font-family: inherit}
44pre.menu-comment {font-family: serif}
45pre.menu-preformatted {font-family: serif}
46pre.smalldisplay {font-family: inherit; font-size: smaller}
47pre.smallexample {font-size: smaller}
48pre.smallformat {font-family: inherit; font-size: smaller}
49pre.smalllisp {font-size: smaller}
50span.nocodebreak {white-space:nowrap}
51span.nolinebreak {white-space:nowrap}
52span.roman {font-family:serif; font-weight:normal}
53span.sansserif {font-family:sans-serif; font-weight:normal}
54ul.no-bullet {list-style: none}
55-->
56</style>
57
58
59</head>
60
61<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
62<a name="Debugging"></a>
63<div class="header">
64<p>
65Previous: <a href="Internals.html#Internals" accesskey="p" rel="previous">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>
66</div>
67<hr>
68<a name="Debugging-gprof"></a>
69<h3 class="section">9.4 Debugging <code>gprof</code></h3>
70
71<p>If <code>gprof</code> was compiled with debugging enabled,
72the &lsquo;<samp>-d</samp>&rsquo; option triggers debugging output
73(to stdout) which can be helpful in understanding its operation.
74The debugging number specified is interpreted as a sum of the following
75options:
76</p>
77<dl compact="compact">
78<dt>2 - Topological sort</dt>
79<dd><p>Monitor depth-first numbering of symbols during call graph analysis
80</p></dd>
81<dt>4 - Cycles</dt>
82<dd><p>Shows symbols as they are identified as cycle heads
83</p></dd>
84<dt>16 - Tallying</dt>
85<dd><p>As the call graph arcs are read, show each arc and how
86the total calls to each function are tallied
87</p></dd>
88<dt>32 - Call graph arc sorting</dt>
89<dd><p>Details sorting individual parents/children within each call graph entry
90</p></dd>
91<dt>64 - Reading histogram and call graph records</dt>
92<dd><p>Shows address ranges of histograms as they are read, and each
93call graph arc
94</p></dd>
95<dt>128 - Symbol table</dt>
96<dd><p>Reading, classifying, and sorting the symbol table from the object file.
97For line-by-line profiling (&lsquo;<samp>-l</samp>&rsquo; option), also shows line numbers
98being assigned to memory addresses.
99</p></dd>
100<dt>256 - Static call graph</dt>
101<dd><p>Trace operation of &lsquo;<samp>-c</samp>&rsquo; option
102</p></dd>
103<dt>512 - Symbol table and arc table lookups</dt>
104<dd><p>Detail operation of lookup routines
105</p></dd>
106<dt>1024 - Call graph propagation</dt>
107<dd><p>Shows how function times are propagated along the call graph
108</p></dd>
109<dt>2048 - Basic-blocks</dt>
110<dd><p>Shows basic-block records as they are read from profile data
111(only meaningful with &lsquo;<samp>-l</samp>&rsquo; option)
112</p></dd>
113<dt>4096 - Symspecs</dt>
114<dd><p>Shows symspec-to-symbol pattern matching operation
115</p></dd>
116<dt>8192 - Annotate source</dt>
117<dd><p>Tracks operation of &lsquo;<samp>-A</samp>&rsquo; option
118</p></dd>
119</dl>
120
121
122
123
124</body>
125</html>
126