In both `cg_annotate` and `callgrind_annotate`.
* Cachegrind:
+ - cg_annotate's --auto and --show-percs options now default to 'yes', because
+ they are usually wanted.
+
* Callgrind:
+
+ - callgrind_annotate's --auto and --show-percs options now default to 'yes',
+ because they are usually wanted.
+
- The command option --collect-systime has been enhanced to specify
the unit used to record the elapsed time spent during system calls.
The command option now accepts the values no|yes|msec|usec|nsec,
my $single_threshold = $default_threshold;
# If on, show a percentage for each non-zero count.
-my $show_percs = 0;
+my $show_percs = 1;
# If on, automatically annotates all files that are involved in getting over
# all the threshold counts.
-my $auto_annotate = 0;
+my $auto_annotate = 1;
# Number of lines to show around each annotated line.
my $context = 8;
--sort=A,B,C sort columns by events A,B,C [event column order]
--threshold=<0--20> a function is shown if it accounts for more than x% of
the counts of the primary sort event [$default_threshold]
- --show-percs=yes|no show a percentage for each non-zero count
+ --show-percs=yes|no show a percentage for each non-zero count [yes]
--auto=yes|no annotate all source files containing functions
- that helped reach the event count threshold [no]
+ that helped reach the event count threshold [yes]
--context=N print N lines of context before and after
annotated lines [8]
-I<d> --include=<d> add <d> to list of directories to search for
<sect2 id="cg-manual.line-by-line" xreflabel="Line-by-line Counts">
<title>Line-by-line Counts</title>
-<para>There are two ways to annotate source files -- by specifying them
-manually as arguments to cg_annotate, or with the
-<option>--auto=yes</option> option. For example, the output from running
-<filename>cg_annotate <filename> concord.c</filename> for our example
-produces the same output as above followed by an annotated version of
-<filename>concord.c</filename>, a section of which looks like:</para>
+<para>By default, all source code annotation is also shown. (Filenames to be
+annotated can also by specified manually as arguments to cg_annotate, but this
+is rarely needed.) For example, the output from running <filename>cg_annotate
+<filename> </filename> for our example produces the same output as above
+followed by an annotated version of <filename>concord.c</filename>, a section
+of which looks like:</para>
<programlisting><![CDATA[
--------------------------------------------------------------------------------
--- User-annotated source: concord.c
+-- Auto-annotated source: concord.c
--------------------------------------------------------------------------------
Ir I1mr ILmr Dr D1mr DLmr Dw D1mw DLmw
controlled by the <option>--context</option>
option.</para>
-<para>To get automatic annotation, use the <option>--auto=yes</option> option.
+<para>Automatic annotation is enabled by default.
cg_annotate will automatically annotate every source file it can
find that is mentioned in the function-by-function summary.
Therefore, the files chosen for auto-annotation are affected by
<varlistentry>
<term>
- <option><![CDATA[--show-percs=<no|yes> [default: no] ]]></option>
+ <option><![CDATA[--show-percs=<no|yes> [default: yes] ]]></option>
</term>
<listitem>
<para>When enabled, a percentage is printed next to all event counts.
<varlistentry>
<term>
- <option><![CDATA[--auto=<no|yes> [default: no] ]]></option>
+ <option><![CDATA[--auto=<no|yes> [default: yes] ]]></option>
</term>
<listitem>
<para>When enabled, automatically annotates every file that
# the post-processing of the cgout-test file.
prog: ../../tests/true
vgopts: --cachegrind-out-file=cachegrind.out
-post: perl ../../cachegrind/cg_annotate --show=Ir,I1mr,ILmr --auto=yes cgout-test
+post: perl ../../cachegrind/cg_annotate --show=Ir,I1mr,ILmr --show-percs=no cgout-test
cleanup: rm cachegrind.out
# the post-processing of the cgout-test file.
prog: ../../tests/true
vgopts: --cachegrind-out-file=cachegrind.out
-post: perl ../../cachegrind/cg_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes --show-percs=yes cgout-test
+post: perl ../../cachegrind/cg_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes cgout-test
cleanup: rm cachegrind.out
my $single_threshold = $default_threshold;
# If on, show a percentage for each non-zero count.
-my $show_percs = 0;
+my $show_percs = 1;
# If on, automatically annotates all files that are involved in getting over
# all the threshold counts.
-my $auto_annotate = 0;
+my $auto_annotate = 1;
# Number of lines to show around each annotated line.
my $context = 8;
Each event can optionally be followed by a :
and a threshold percentage. If some event specific
threshold are given, --threshold value is ignored.
- --show-percs=yes|no show a percentage for each non-zero count
+ --show-percs=yes|no show a percentage for each non-zero count [yes]
--auto=yes|no annotate all source files containing functions
- that helped reach the event count threshold [no]
+ that helped reach the event count threshold [yes]
--context=N print N lines of context before and after
annotated lines [8]
--inclusive=yes|no add subroutine costs to functions calls [no]
</listitem>
</itemizedlist>
- <para>Use <option>--auto=yes</option> to get annotated source code
+ <para>By default, you will also get annotated source code
for all relevant functions for which the source can be found. In
addition to source annotation as produced by
<computeroutput>cg_annotate</computeroutput>, you will see the
<varlistentry>
<term>
- <option><![CDATA[--auto=<yes|no> [default: no] ]]></option>
+ <option><![CDATA[--auto=<yes|no> [default: yes] ]]></option>
</term>
<listitem>
<para>Annotate all source files containing functions that helped
# the post-processing of the cgout-test file.
prog: ../../tests/true
vgopts: --callgrind-out-file=callgrind.out
-post: perl ../../callgrind/callgrind_annotate --show=Ir,I1mr,ILmr --auto=yes --include=../../cachegrind/tests ../../cachegrind/tests/cgout-test
+post: perl ../../callgrind/callgrind_annotate --show=Ir,I1mr,ILmr --show-percs=no --include=../../cachegrind/tests ../../cachegrind/tests/cgout-test
cleanup: rm callgrind.out
# the post-processing of the cgout-test file.
prog: ../../tests/true
vgopts: --callgrind-out-file=callgrind.out
-post: perl ../../callgrind/callgrind_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes --include=../../cachegrind/tests --show-percs=yes ../../cachegrind/tests/cgout-test
+post: perl ../../callgrind/callgrind_annotate --sort=Dr --show=Dw,Dr,Ir --auto=yes --include=../../cachegrind/tests ../../cachegrind/tests/cgout-test
cleanup: rm callgrind.out