]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Flip the default value of `--auto` and `--show-percs` to `yes`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 16 Feb 2020 22:40:26 +0000 (09:40 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Thu, 20 Feb 2020 22:40:23 +0000 (09:40 +1100)
In both `cg_annotate` and `callgrind_annotate`.

NEWS
cachegrind/cg_annotate.in
cachegrind/docs/cg-manual.xml
cachegrind/tests/ann1.vgtest
cachegrind/tests/ann2.vgtest
callgrind/callgrind_annotate.in
callgrind/docs/cl-manual.xml
callgrind/tests/ann1.vgtest
callgrind/tests/ann2.vgtest

diff --git a/NEWS b/NEWS
index 07dd91489f9250de09f2c021951126156fa1ff64..5dbb014c402a7a06b2cf3a14a18c60592c327f5c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -35,7 +35,14 @@ support for X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux.
 
 * 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,
index 1daa15da23169264512237b6e6211d9b1eb6bb5d..fea114bf49e76ae0268e56b30b3632fb39fe086f 100644 (file)
@@ -123,11 +123,11 @@ my $default_threshold = 0.1;
 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;
@@ -152,9 +152,9 @@ usage: cg_annotate [options] cachegrind-out-file [source-files...]
     --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 
index d90a3be9c23b2b45b9654f1763417f2e374426dd..73b58b634e2c26b2e53f3a514e8035a465101f32 100644 (file)
@@ -368,16 +368,16 @@ and from libraries (e.g. <filename>getc.c</filename>)</para>
 <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 &lt;filename&gt; 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
+&lt;filename&gt; </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
 
@@ -437,7 +437,7 @@ part of a file the shown code comes from, eg:</para>
 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
@@ -946,7 +946,7 @@ small differences like these;  it works in the same way as
 
   <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.
@@ -957,7 +957,7 @@ small differences like these;  it works in the same way as
 
   <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
index 81243d3bde50cd7c3cea8cd8d978208ee8f2cef8..676fe3199660a074c210ddc0cc154170d54c096f 100644 (file)
@@ -2,5 +2,5 @@
 # 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
index b46da02602044584a880974ff074ffc7f77706e9..5acc68b8d5f0635412c5cce966db545af25895f7 100644 (file)
@@ -2,5 +2,5 @@
 # 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
index 8854aee137365826836844c4b2f879d33e4212e0..16c0edf97c547451e74405f86ee37efbc8bb5b89 100644 (file)
@@ -139,11 +139,11 @@ my $default_threshold = 99;
 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;
@@ -211,9 +211,9 @@ usage: callgrind_annotate [options] [callgrind-out-file [source-files...]]
                           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]
index 38dc73d90a426864b8ce079e0709c4accfd1a638..713c1b7453c1e9ffaaad24668586292b4e2daddf 100644 (file)
@@ -156,7 +156,7 @@ has to rely on heuristics to detect calls and returns.</para>
      </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
@@ -1307,7 +1307,7 @@ their arguments.</para>
 
   <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 
index 6b80ee3632a66ca95a5c03fd6549856a70dda2b1..4ad9ae3903ddb6aabfb3e4e87e927a1d7ba44cc4 100644 (file)
@@ -2,5 +2,5 @@
 # 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
index e92f93ac4fbe9e0f6a23d786e5835e502d8f587f..30e177907f9852cc12b5834b93be3f2934a2d611 100644 (file)
@@ -2,5 +2,5 @@
 # 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