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: Invoking</title>
17
18<meta name="description" content="GNU gprof: Invoking">
19<meta name="keywords" content="GNU gprof: Invoking">
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="index.html#Top" rel="up" title="Top">
27<link href="Output-Options.html#Output-Options" rel="next" title="Output Options">
28<link href="Executing.html#Executing" rel="previous" title="Executing">
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="Invoking"></a>
63<div class="header">
64<p>
65Next: <a href="Output.html#Output" accesskey="n" rel="next">Output</a>, Previous: <a href="Executing.html#Executing" accesskey="p" rel="previous">Executing</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
66</div>
67<hr>
68<a name="gprof-Command-Summary"></a>
69<h2 class="chapter">4 <code>gprof</code> Command Summary</h2>
70
71<p>After you have a profile data file <samp>gmon.out</samp>, you can run <code>gprof</code>
72to interpret the information in it.  The <code>gprof</code> program prints a
73flat profile and a call graph on standard output.  Typically you would
74redirect the output of <code>gprof</code> into a file with &lsquo;<samp>&gt;</samp>&rsquo;.
75</p>
76<p>You run <code>gprof</code> like this:
77</p>
78<div class="smallexample">
79<pre class="smallexample">gprof <var>options</var> [<var>executable-file</var> [<var>profile-data-files</var>&hellip;]] [&gt; <var>outfile</var>]
80</pre></div>
81
82<p>Here square-brackets indicate optional arguments.
83</p>
84<p>If you omit the executable file name, the file <samp>a.out</samp> is used.  If
85you give no profile data file name, the file <samp>gmon.out</samp> is used.  If
86any file is not in the proper format, or if the profile data file does not
87appear to belong to the executable file, an error message is printed.
88</p>
89<p>You can give more than one profile data file by entering all their names
90after the executable file name; then the statistics in all the data files
91are summed together.
92</p>
93<p>The order of these options does not matter.
94</p>
95<table class="menu" border="0" cellspacing="0">
96<tr><td align="left" valign="top">&bull; <a href="Output-Options.html#Output-Options" accesskey="1">Output Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Controlling <code>gprof</code>&rsquo;s output style
97</td></tr>
98<tr><td align="left" valign="top">&bull; <a href="Analysis-Options.html#Analysis-Options" accesskey="2">Analysis Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Controlling how <code>gprof</code> analyzes its data
99</td></tr>
100<tr><td align="left" valign="top">&bull; <a href="Miscellaneous-Options.html#Miscellaneous-Options" accesskey="3">Miscellaneous Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
101</td></tr>
102<tr><td align="left" valign="top">&bull; <a href="Deprecated-Options.html#Deprecated-Options" accesskey="4">Deprecated Options</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Options you no longer need to use, but which
103                            have been retained for compatibility
104</td></tr>
105<tr><td align="left" valign="top">&bull; <a href="Symspecs.html#Symspecs" accesskey="5">Symspecs</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Specifying functions to include or exclude
106</td></tr>
107</table>
108
109
110
111
112</body>
113</html>
114