]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add a --show-percs option to cg_annotate and callgrind_annotate.
authorNicholas Nethercote <nnethercote@mozilla.com>
Fri, 23 Nov 2018 04:16:02 +0000 (15:16 +1100)
committerNicholas Nethercote <nnethercote@mozilla.com>
Mon, 10 Dec 2018 03:14:20 +0000 (14:14 +1100)
commite6e837752183dd2c0ef00bf687b9fe759bd6553c
tree64aec92fe50ef0ef6f50379e80578749735e3c7b
parent0c701ba2a4b10a5f6f3fae31cb0ec6ca034d51d9
Add a --show-percs option to cg_annotate and callgrind_annotate.

Because it's very useful. As part of this, the "percentage of events
annotated" numbers at the bottom of the output is changed to "events
annotated" so that --show-percs doesn't compute a percentage of a
percentage.

Example output lines:
```
4,967,137,442 (100.0%)  PROGRAM TOTALS

4,543 (25.23%)    17,566 ( 0.43%)    47,993 ( 0.92%) /build/glibc-OTsEL5/glibc-2.27/elf/dl-lookup.c

1 ( 0.01%) 2,000,001 (49.29%) 3,000,004 (57.36%)     for (int i = 0; i < 1000000; i++) {
```

The commit also adds some much-needed tests for cg_annotate and
callgrind_annotate.
21 files changed:
NEWS
cachegrind/cg_annotate.in
cachegrind/docs/cg-manual.xml
cachegrind/tests/Makefile.am
cachegrind/tests/ann1.post.exp [new file with mode: 0644]
cachegrind/tests/ann1.stderr.exp [new file with mode: 0644]
cachegrind/tests/ann1.vgtest [new file with mode: 0644]
cachegrind/tests/ann2.post.exp [new file with mode: 0644]
cachegrind/tests/ann2.stderr.exp [new file with mode: 0644]
cachegrind/tests/ann2.vgtest [new file with mode: 0644]
cachegrind/tests/cgout-test [new file with mode: 0644]
cachegrind/tests/test.c [new file with mode: 0644]
callgrind/callgrind_annotate.in
callgrind/docs/cl-manual.xml
callgrind/tests/Makefile.am
callgrind/tests/ann1.post.exp [new file with mode: 0644]
callgrind/tests/ann1.stderr.exp [new file with mode: 0644]
callgrind/tests/ann1.vgtest [new file with mode: 0644]
callgrind/tests/ann2.post.exp [new file with mode: 0644]
callgrind/tests/ann2.stderr.exp [new file with mode: 0644]
callgrind/tests/ann2.vgtest [new file with mode: 0644]