Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

Analysis-Options.html 8.0KB

pirms 3 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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-2020 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 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Analysis Options (GNU gprof)</title>
  16. <meta name="description" content="Analysis Options (GNU gprof)">
  17. <meta name="keywords" content="Analysis Options (GNU gprof)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  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="Invoking.html#Invoking" rel="up" title="Invoking">
  24. <link href="Miscellaneous-Options.html#Miscellaneous-Options" rel="next" title="Miscellaneous Options">
  25. <link href="Output-Options.html#Output-Options" rel="prev" title="Output Options">
  26. <style type="text/css">
  27. <!--
  28. a.summary-letter {text-decoration: none}
  29. blockquote.indentedblock {margin-right: 0em}
  30. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.lisp {margin-left: 3.2em}
  35. div.smalldisplay {margin-left: 3.2em}
  36. div.smallexample {margin-left: 3.2em}
  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.nolinebreak {white-space: nowrap}
  48. span.roman {font-family: initial; font-weight: normal}
  49. span.sansserif {font-family: sans-serif; font-weight: normal}
  50. ul.no-bullet {list-style: none}
  51. -->
  52. </style>
  53. </head>
  54. <body lang="en">
  55. <a name="Analysis-Options"></a>
  56. <div class="header">
  57. <p>
  58. Next: <a href="Miscellaneous-Options.html#Miscellaneous-Options" accesskey="n" rel="next">Miscellaneous Options</a>, Previous: <a href="Output-Options.html#Output-Options" accesskey="p" rel="prev">Output Options</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  59. </div>
  60. <hr>
  61. <a name="Analysis-Options-1"></a>
  62. <h3 class="section">4.2 Analysis Options</h3>
  63. <dl compact="compact">
  64. <dt><code>-a</code></dt>
  65. <dt><code>--no-static</code></dt>
  66. <dd><p>The &lsquo;<samp>-a</samp>&rsquo; option causes <code>gprof</code> to suppress the printing of
  67. statically declared (private) functions. (These are functions whose
  68. names are not listed as global, and which are not visible outside the
  69. file/function/block where they were defined.) Time spent in these
  70. functions, calls to/from them, etc., will all be attributed to the
  71. function that was loaded directly before it in the executable file.
  72. This option affects both the flat profile and the call graph.
  73. </p>
  74. </dd>
  75. <dt><code>-c</code></dt>
  76. <dt><code>--static-call-graph</code></dt>
  77. <dd><p>The &lsquo;<samp>-c</samp>&rsquo; option causes the call graph of the program to be
  78. augmented by a heuristic which examines the text space of the object
  79. file and identifies function calls in the binary machine code.
  80. Since normal call graph records are only generated when functions are
  81. entered, this option identifies children that could have been called,
  82. but never were. Calls to functions that were not compiled with
  83. profiling enabled are also identified, but only if symbol table
  84. entries are present for them.
  85. Calls to dynamic library routines are typically <em>not</em> found
  86. by this option.
  87. Parents or children identified via this heuristic
  88. are indicated in the call graph with call counts of &lsquo;<samp>0</samp>&rsquo;.
  89. </p>
  90. </dd>
  91. <dt><code>-D</code></dt>
  92. <dt><code>--ignore-non-functions</code></dt>
  93. <dd><p>The &lsquo;<samp>-D</samp>&rsquo; option causes <code>gprof</code> to ignore symbols which
  94. are not known to be functions. This option will give more accurate
  95. profile data on systems where it is supported (Solaris and HPUX for
  96. example).
  97. </p>
  98. </dd>
  99. <dt><code>-k <var>from</var>/<var>to</var></code></dt>
  100. <dd><p>The &lsquo;<samp>-k</samp>&rsquo; option allows you to delete from the call graph any arcs from
  101. symbols matching symspec <var>from</var> to those matching symspec <var>to</var>.
  102. </p>
  103. </dd>
  104. <dt><code>-l</code></dt>
  105. <dt><code>--line</code></dt>
  106. <dd><p>The &lsquo;<samp>-l</samp>&rsquo; option enables line-by-line profiling, which causes
  107. histogram hits to be charged to individual source code lines,
  108. instead of functions. This feature only works with programs compiled
  109. by older versions of the <code>gcc</code> compiler. Newer versions of
  110. <code>gcc</code> are designed to work with the <code>gcov</code> tool instead.
  111. </p>
  112. <p>If the program was compiled with basic-block counting enabled,
  113. this option will also identify how many times each line of
  114. code was executed.
  115. While line-by-line profiling can help isolate where in a large function
  116. a program is spending its time, it also significantly increases
  117. the running time of <code>gprof</code>, and magnifies statistical
  118. inaccuracies.
  119. See <a href="Sampling-Error.html#Sampling-Error">Statistical Sampling Error</a>.
  120. </p>
  121. </dd>
  122. <dt><code>--inline-file-names</code></dt>
  123. <dd><p>This option causes <code>gprof</code> to print the source file after each
  124. symbol in both the flat profile and the call graph. The full path to the
  125. file is printed if used with the &lsquo;<samp>-L</samp>&rsquo; option.
  126. </p>
  127. </dd>
  128. <dt><code>-m <var>num</var></code></dt>
  129. <dt><code>--min-count=<var>num</var></code></dt>
  130. <dd><p>This option affects execution count output only.
  131. Symbols that are executed less than <var>num</var> times are suppressed.
  132. </p>
  133. </dd>
  134. <dt><code>-n<var>symspec</var></code></dt>
  135. <dt><code>--time=<var>symspec</var></code></dt>
  136. <dd><p>The &lsquo;<samp>-n</samp>&rsquo; option causes <code>gprof</code>, in its call graph analysis,
  137. to only propagate times for symbols matching <var>symspec</var>.
  138. </p>
  139. </dd>
  140. <dt><code>-N<var>symspec</var></code></dt>
  141. <dt><code>--no-time=<var>symspec</var></code></dt>
  142. <dd><p>The &lsquo;<samp>-n</samp>&rsquo; option causes <code>gprof</code>, in its call graph analysis,
  143. not to propagate times for symbols matching <var>symspec</var>.
  144. </p>
  145. </dd>
  146. <dt><code>-S<var>filename</var></code></dt>
  147. <dt><code>--external-symbol-table=<var>filename</var></code></dt>
  148. <dd><p>The &lsquo;<samp>-S</samp>&rsquo; option causes <code>gprof</code> to read an external symbol table
  149. file, such as <samp>/proc/kallsyms</samp>, rather than read the symbol table
  150. from the given object file (the default is <code>a.out</code>). This is useful
  151. for profiling kernel modules.
  152. </p>
  153. </dd>
  154. <dt><code>-z</code></dt>
  155. <dt><code>--display-unused-functions</code></dt>
  156. <dd><p>If you give the &lsquo;<samp>-z</samp>&rsquo; option, <code>gprof</code> will mention all
  157. functions in the flat profile, even those that were never called, and
  158. that had no time spent in them. This is useful in conjunction with the
  159. &lsquo;<samp>-c</samp>&rsquo; option for discovering which routines were never called.
  160. </p>
  161. </dd>
  162. </dl>
  163. <hr>
  164. <div class="header">
  165. <p>
  166. Next: <a href="Miscellaneous-Options.html#Miscellaneous-Options" accesskey="n" rel="next">Miscellaneous Options</a>, Previous: <a href="Output-Options.html#Output-Options" accesskey="p" rel="prev">Output Options</a>, Up: <a href="Invoking.html#Invoking" accesskey="u" rel="up">Invoking</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
  167. </div>
  168. </body>
  169. </html>