Invoking.html 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. Copyright (C) 1988-2017 Free Software Foundation, Inc.
  5. Permission is granted to copy, distribute and/or modify this document
  6. under the terms of the GNU Free Documentation License, Version 1.3
  7. or any later version published by the Free Software Foundation;
  8. with no Invariant Sections, with no Front-Cover Texts, and with no
  9. Back-Cover Texts. A copy of the license is included in the
  10. section entitled "GNU Free Documentation License".
  11. -->
  12. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <title>GNU gprof: Invoking</title>
  15. <meta name="description" content="GNU gprof: Invoking">
  16. <meta name="keywords" content="GNU gprof: Invoking">
  17. <meta name="resource-type" content="document">
  18. <meta name="distribution" content="global">
  19. <meta name="Generator" content="makeinfo">
  20. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  23. <link href="index.html#Top" rel="up" title="Top">
  24. <link href="Output-Options.html#Output-Options" rel="next" title="Output Options">
  25. <link href="Executing.html#Executing" rel="prev" title="Executing">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.smallquotation {font-size: smaller}
  30. div.display {margin-left: 3.2em}
  31. div.example {margin-left: 3.2em}
  32. div.indentedblock {margin-left: 3.2em}
  33. div.lisp {margin-left: 3.2em}
  34. div.smalldisplay {margin-left: 3.2em}
  35. div.smallexample {margin-left: 3.2em}
  36. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  37. div.smalllisp {margin-left: 3.2em}
  38. kbd {font-style:oblique}
  39. pre.display {font-family: inherit}
  40. pre.format {font-family: inherit}
  41. pre.menu-comment {font-family: serif}
  42. pre.menu-preformatted {font-family: serif}
  43. pre.smalldisplay {font-family: inherit; font-size: smaller}
  44. pre.smallexample {font-size: smaller}
  45. pre.smallformat {font-family: inherit; font-size: smaller}
  46. pre.smalllisp {font-size: smaller}
  47. span.nocodebreak {white-space:nowrap}
  48. span.nolinebreak {white-space:nowrap}
  49. span.roman {font-family:serif; font-weight:normal}
  50. span.sansserif {font-family:sans-serif; font-weight:normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  56. <a name="Invoking"></a>
  57. <div class="header">
  58. <p>
  59. Next: <a href="Output.html#Output" accesskey="n" rel="next">Output</a>, Previous: <a href="Executing.html#Executing" accesskey="p" rel="prev">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>
  60. </div>
  61. <hr>
  62. <a name="gprof-Command-Summary"></a>
  63. <h2 class="chapter">4 <code>gprof</code> Command Summary</h2>
  64. <p>After you have a profile data file <samp>gmon.out</samp>, you can run <code>gprof</code>
  65. to interpret the information in it. The <code>gprof</code> program prints a
  66. flat profile and a call graph on standard output. Typically you would
  67. redirect the output of <code>gprof</code> into a file with &lsquo;<samp>&gt;</samp>&rsquo;.
  68. </p>
  69. <p>You run <code>gprof</code> like this:
  70. </p>
  71. <div class="smallexample">
  72. <pre class="smallexample">gprof <var>options</var> [<var>executable-file</var> [<var>profile-data-files</var>&hellip;]] [&gt; <var>outfile</var>]
  73. </pre></div>
  74. <p>Here square-brackets indicate optional arguments.
  75. </p>
  76. <p>If you omit the executable file name, the file <samp>a.out</samp> is used. If
  77. you give no profile data file name, the file <samp>gmon.out</samp> is used. If
  78. any file is not in the proper format, or if the profile data file does not
  79. appear to belong to the executable file, an error message is printed.
  80. </p>
  81. <p>You can give more than one profile data file by entering all their names
  82. after the executable file name; then the statistics in all the data files
  83. are summed together.
  84. </p>
  85. <p>The order of these options does not matter.
  86. </p>
  87. <table class="menu" border="0" cellspacing="0">
  88. <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
  89. </td></tr>
  90. <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
  91. </td></tr>
  92. <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">
  93. </td></tr>
  94. <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
  95. have been retained for compatibility
  96. </td></tr>
  97. <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
  98. </td></tr>
  99. </table>
  100. </body>
  101. </html>