summaryrefslogtreecommitdiff
path: root/devdocs/gcc~13/invoking-gcov-tool.html
blob: 3faeb2f171a72258c1cc839c6129caaaf4c2528f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<div class="section-level-extent" id="Invoking-Gcov-tool"> <div class="nav-panel"> <p> Previous: <a href="gcov-tool-intro" accesskey="p" rel="prev">Introduction to <code class="command">gcov-tool</code></a>, Up: <a href="gcov-tool" accesskey="u" rel="up"><code class="command">gcov-tool</code>—an Offline Gcda Profile Processing Tool</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div>  <h1 class="section" id="Invoking-gcov-tool"><span>11.2 Invoking gcov-tool<a class="copiable-link" href="#Invoking-gcov-tool"> ¶</a></span></h1> <div class="example smallexample"> <pre class="example-preformatted" data-language="cpp">gcov-tool <span class="r">[</span><var class="var">global-options</var><span class="r">]</span> SUB_COMMAND <span class="r">[</span><var class="var">sub_command-options</var><span class="r">]</span> <var class="var">profile_dir</var></pre>
</div> <p><code class="command">gcov-tool</code> accepts the following options: </p> <dl class="table"> <dt><code class="code">-h</code></dt> <dt><code class="code">--help</code></dt> <dd>
<p>Display help about using <code class="command">gcov-tool</code> (on the standard output), and exit without doing any further processing. </p> </dd> <dt><code class="code">-v</code></dt> <dt><code class="code">--version</code></dt> <dd>
<p>Display the <code class="command">gcov-tool</code> version number (on the standard output), and exit without doing any further processing. </p> </dd> <dt><code class="code">merge</code></dt> <dd>
<p>Merge two profile directories. </p>
<dl class="table"> <dt><code class="code">-o <var class="var">directory</var></code></dt> <dt><code class="code">--output <var class="var">directory</var></code></dt> <dd>
<p>Set the output profile directory. Default output directory name is <var class="var">merged_profile</var>. </p> </dd> <dt><code class="code">-v</code></dt> <dt><code class="code">--verbose</code></dt> <dd>
<p>Set the verbose mode. </p> </dd> <dt><code class="code">-w <var class="var">w1</var>,<var class="var">w2</var></code></dt> <dt><code class="code">--weight <var class="var">w1</var>,<var class="var">w2</var></code></dt> <dd><p>Set the merge weights of the <var class="var">directory1</var> and <var class="var">directory2</var>, respectively. The default weights are 1 for both. </p></dd> </dl> </dd> <dt><code class="code">merge-stream</code></dt> <dd>
<p>Collect profiles with associated filenames from a <em class="emph">gcfn</em> and <em class="emph">gcda</em> data stream. Read the stream from the file specified by <var class="var">file</var> or from <samp class="file">stdin</samp>. Merge the profiles with associated profiles in the host filesystem. Apply the optional weights while merging profiles. </p> <p>For the generation of a <em class="emph">gcfn</em> and <em class="emph">gcda</em> data stream on the target system, please have a look at the <code class="code">__gcov_filename_to_gcfn()</code> and <code class="code">__gcov_info_to_gcda()</code> functions declared in <code class="code">#include &lt;gcov.h&gt;</code>. </p>
<dl class="table"> <dt><code class="code">-v</code></dt> <dt><code class="code">--verbose</code></dt> <dd>
<p>Set the verbose mode. </p> </dd> <dt><code class="code">-w <var class="var">w1</var>,<var class="var">w2</var></code></dt> <dt><code class="code">--weight <var class="var">w1</var>,<var class="var">w2</var></code></dt> <dd><p>Set the merge weights of the profiles from the <em class="emph">gcfn</em> and <em class="emph">gcda</em> data stream and the associated profiles in the host filesystem, respectively. The default weights are 1 for both. </p></dd> </dl> </dd> <dt><code class="code">rewrite</code></dt> <dd>
<p>Read the specified profile directory and rewrite to a new directory. </p>
<dl class="table"> <dt><code class="code">-n <var class="var">long_long_value</var></code></dt> <dt><code class="code">--normalize &lt;long_long_value&gt;</code></dt> <dd>
<p>Normalize the profile. The specified value is the max counter value in the new profile. </p> </dd> <dt><code class="code">-o <var class="var">directory</var></code></dt> <dt><code class="code">--output <var class="var">directory</var></code></dt> <dd>
<p>Set the output profile directory. Default output name is <var class="var">rewrite_profile</var>. </p> </dd> <dt><code class="code">-s <var class="var">float_or_simple-frac_value</var></code></dt> <dt><code class="code">--scale <var class="var">float_or_simple-frac_value</var></code></dt> <dd>
<p>Scale the profile counters. The specified value can be in floating point value, or simple fraction value form, such 1, 2, 2/3, and 5/3. </p> </dd> <dt><code class="code">-v</code></dt> <dt><code class="code">--verbose</code></dt> <dd><p>Set the verbose mode. </p></dd> </dl> </dd> <dt><code class="code">overlap</code></dt> <dd>
<p>Compute the overlap score between the two specified profile directories. The overlap score is computed based on the arc profiles. It is defined as the sum of min (p1_counter[i] / p1_sum_all, p2_counter[i] / p2_sum_all), for all arc counter i, where p1_counter[i] and p2_counter[i] are two matched counters and p1_sum_all and p2_sum_all are the sum of counter values in profile 1 and profile 2, respectively. </p> <dl class="table"> <dt><code class="code">-f</code></dt> <dt><code class="code">--function</code></dt> <dd>
<p>Print function level overlap score. </p> </dd> <dt><code class="code">-F</code></dt> <dt><code class="code">--fullname</code></dt> <dd>
<p>Print full gcda filename. </p> </dd> <dt><code class="code">-h</code></dt> <dt><code class="code">--hotonly</code></dt> <dd>
<p>Only print info for hot objects/functions. </p> </dd> <dt><code class="code">-o</code></dt> <dt><code class="code">--object</code></dt> <dd>
<p>Print object level overlap score. </p> </dd> <dt><code class="code">-t <var class="var">float</var></code></dt> <dt><code class="code">--hot_threshold &lt;float&gt;</code></dt> <dd>
<p>Set the threshold for hot counter value. </p> </dd> <dt><code class="code">-v</code></dt> <dt><code class="code">--verbose</code></dt> <dd><p>Set the verbose mode. </p></dd> </dl> </dd> </dl> </div>  <div class="nav-panel"> <p> Previous: <a href="gcov-tool-intro">Introduction to <code class="command">gcov-tool</code></a>, Up: <a href="gcov-tool"><code class="command">gcov-tool</code>—an Offline Gcda Profile Processing Tool</a> [<a href="index#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="indices" title="Index" rel="index">Index</a>]</p> </div><div class="_attribution">
  <p class="_attribution-p">
    &copy; Free Software Foundation<br>Licensed under the GNU Free Documentation License, Version 1.3.<br>
    <a href="https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Invoking-Gcov-tool.html" class="_attribution-link">https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Invoking-Gcov-tool.html</a>
  </p>
</div>