You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
157 lines
5.8 KiB
HTML
157 lines
5.8 KiB
HTML
<!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-2019 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 6.4, http://www.gnu.org/software/texinfo/ -->
|
|
<head>
|
|
<title>Primary (GNU gprof)</title>
|
|
|
|
<meta name="description" content="Primary (GNU gprof)">
|
|
<meta name="keywords" content="Primary (GNU gprof)">
|
|
<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="Call-Graph.html#Call-Graph" rel="up" title="Call Graph">
|
|
<link href="Callers.html#Callers" rel="next" title="Callers">
|
|
<link href="Call-Graph.html#Call-Graph" rel="prev" title="Call Graph">
|
|
<style type="text/css">
|
|
<!--
|
|
a.summary-letter {text-decoration: none}
|
|
blockquote.indentedblock {margin-right: 0em}
|
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
|
blockquote.smallquotation {font-size: smaller}
|
|
div.display {margin-left: 3.2em}
|
|
div.example {margin-left: 3.2em}
|
|
div.lisp {margin-left: 3.2em}
|
|
div.smalldisplay {margin-left: 3.2em}
|
|
div.smallexample {margin-left: 3.2em}
|
|
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.nolinebreak {white-space: nowrap}
|
|
span.roman {font-family: initial; font-weight: normal}
|
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
|
ul.no-bullet {list-style: none}
|
|
-->
|
|
</style>
|
|
|
|
|
|
</head>
|
|
|
|
<body lang="en">
|
|
<a name="Primary"></a>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Callers.html#Callers" accesskey="n" rel="next">Callers</a>, Up: <a href="Call-Graph.html#Call-Graph" accesskey="u" rel="up">Call Graph</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
|
|
</div>
|
|
<hr>
|
|
<a name="The-Primary-Line"></a>
|
|
<h4 class="subsection">5.2.1 The Primary Line</h4>
|
|
|
|
<p>The <em>primary line</em> in a call graph entry is the line that
|
|
describes the function which the entry is about and gives the overall
|
|
statistics for this function.
|
|
</p>
|
|
<p>For reference, we repeat the primary line from the entry for function
|
|
<code>report</code> in our main example, together with the heading line that
|
|
shows the names of the fields:
|
|
</p>
|
|
<div class="smallexample">
|
|
<pre class="smallexample">index % time self children called name
|
|
…
|
|
[3] 100.0 0.00 0.05 1 report [3]
|
|
</pre></div>
|
|
|
|
<p>Here is what the fields in the primary line mean:
|
|
</p>
|
|
<dl compact="compact">
|
|
<dt><code>index</code></dt>
|
|
<dd><p>Entries are numbered with consecutive integers. Each function
|
|
therefore has an index number, which appears at the beginning of its
|
|
primary line.
|
|
</p>
|
|
<p>Each cross-reference to a function, as a caller or subroutine of
|
|
another, gives its index number as well as its name. The index number
|
|
guides you if you wish to look for the entry for that function.
|
|
</p>
|
|
</dd>
|
|
<dt><code>% time</code></dt>
|
|
<dd><p>This is the percentage of the total time that was spent in this
|
|
function, including time spent in subroutines called from this
|
|
function.
|
|
</p>
|
|
<p>The time spent in this function is counted again for the callers of
|
|
this function. Therefore, adding up these percentages is meaningless.
|
|
</p>
|
|
</dd>
|
|
<dt><code>self</code></dt>
|
|
<dd><p>This is the total amount of time spent in this function. This
|
|
should be identical to the number printed in the <code>seconds</code> field
|
|
for this function in the flat profile.
|
|
</p>
|
|
</dd>
|
|
<dt><code>children</code></dt>
|
|
<dd><p>This is the total amount of time spent in the subroutine calls made by
|
|
this function. This should be equal to the sum of all the <code>self</code>
|
|
and <code>children</code> entries of the children listed directly below this
|
|
function.
|
|
</p>
|
|
</dd>
|
|
<dt><code>called</code></dt>
|
|
<dd><p>This is the number of times the function was called.
|
|
</p>
|
|
<p>If the function called itself recursively, there are two numbers,
|
|
separated by a ‘<samp>+</samp>’. The first number counts non-recursive calls,
|
|
and the second counts recursive calls.
|
|
</p>
|
|
<p>In the example above, the function <code>report</code> was called once from
|
|
<code>main</code>.
|
|
</p>
|
|
</dd>
|
|
<dt><code>name</code></dt>
|
|
<dd><p>This is the name of the current function. The index number is
|
|
repeated after it.
|
|
</p>
|
|
<p>If the function is part of a cycle of recursion, the cycle number is
|
|
printed between the function’s name and the index number
|
|
(see <a href="Cycles.html#Cycles">How Mutually Recursive Functions Are Described</a>).
|
|
For example, if function <code>gnurr</code> is part of
|
|
cycle number one, and has index number twelve, its primary line would
|
|
be end like this:
|
|
</p>
|
|
<div class="example">
|
|
<pre class="example">gnurr <cycle 1> [12]
|
|
</pre></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
<hr>
|
|
<div class="header">
|
|
<p>
|
|
Next: <a href="Callers.html#Callers" accesskey="n" rel="next">Callers</a>, Up: <a href="Call-Graph.html#Call-Graph" accesskey="u" rel="up">Call Graph</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|