62 Commits

Author SHA1 Message Date
Mark Wielaard
21ceb09d5d Set refmiscinfo class to version in all manpages.
Otherwise xsltproc will complain while producing the manpage that
it doesn't know how to interpret the release string.
2020-05-14 19:11:26 +02:00
Mark Wielaard
555ddc4753 Use DTD DocBook XML V4.5 everywhere.
This makes the rule for xmllint easier since it doesn't need to
override the DTD to validate against. It also helps with other tools
tryinf to process the docbookx xml files.
2020-05-14 15:12:02 +02:00
Mark Wielaard
c0916494f6 docbook xml doesn't allow xref inside option, use link instead 2020-05-14 12:43:39 +02:00
Mark Wielaard
4cc73dcc28 cl-manual.xml: xref cannot be used inside computeroutput, use link. 2020-05-14 00:53:16 +02:00
Mark Wielaard
1922e36228 Don't use similar ids for varlistentry in cg-manual and cl-manual. 2020-05-13 23:40:51 +02:00
Nicholas Nethercote
40ab2f14db Flip the default value of --auto and --show-percs to yes.
In both `cg_annotate` and `callgrind_annotate`.
2020-02-21 09:40:23 +11:00
Julian Seward
9dcd3ab1f6 Fix some spelling errors found by Lintian. Patch from Alessandro Ghedini <ghedo@debian.org>. 2020-01-23 10:53:36 +01:00
Philippe Waroquiers
83a535e431 Enhance callgrind option --collect-system.
- 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,
    where yes is a synonym of msec.  When giving the value nsec, the
    system cpu time of system calls is also recorded.

Note that the nsec option is not supported on Darwin.
2019-10-12 18:12:04 +02:00
Philippe Waroquiers
423c754049 Update callgrind_annotate documentation.
Clarify the meaning of the threshold argument.
Document the per event thresholds that can be given as part
of the --sort option.
2019-01-27 12:32:32 +01:00
Nicholas Nethercote
e6e8377521 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.
2018-12-10 14:14:20 +11:00
Ivo Raisr
d8f648486e Fix some spelling mistakes.
Fixes BZ#374719
Patch by: klemens <ka7@la-evento.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16336
2017-05-05 22:13:20 +00:00
Josef Weidendorfer
db860c7cdc Add a format marker to callgrind files
KCachegrind currently uses a quick format detection before
actually loading a file, and checks for a line starting with
"events:" in the first 2kB for that. This obviously is fragile,
as shown by an internal bug report by Philippe: before the
"events" line, Callgrind puts a "cmd:" line with the command
line. If this is very long, the detection fails and the file
does not get loaded at all.

While KCachegrind would not need to have this quick format
check at all, it is useful if multiple input format filters
get supported at some point, to automatically select the
correct filter.

Further, for the "file" command, for file managers and
desktop environments, having an unique way to detect a
file format is important.

It is not too late to fix this issue for the callgrind format.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16196
2017-01-10 20:21:21 +00:00
Philippe Waroquiers
48d506364c Small changes in callgrind_annotate and callgrind manual
* callgrind_annotate: ignore the lines giving the long names of the
  events: such lines are used by kcachegrind for the GUI, so are better
  accepted (and ignored) by callgrind_annotate
* Document in callgrind_annotate manual that thresholds can be given
  per event kind.
* Avoid a division by zero in callgrind_annotate, for 'special data'
  such as produced by (some) xtrees.
  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16125
2016-11-11 14:22:34 +00:00
Josef Weidendorfer
b47baba217 Rephrase Callgrind manual about limiting event aggregation
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15637
2015-09-07 10:23:58 +00:00
Josef Weidendorfer
5b74bd2aee Minor shuffling in Callgrind format doc
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15360
2015-06-26 15:44:01 +00:00
Josef Weidendorfer
9cd0f4e211 Complete/Fix Callgrind format specification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15358
2015-06-26 14:05:33 +00:00
Philippe Waroquiers
231d67347f add --vgdb-prefix arg to callgrind_control
If valgrind is started with --vgdb-prefix arg, then callgrind_control
cannot find and control this valgrind.
So, add an (optional) argument to callgrind_control,
and have callgrind tool report the needed vgdb prefix argument
if the user supplied this arg.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13769
2014-01-11 13:56:48 +00:00
Philippe Waroquiers
0e086ed3b1 Fix 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Patch by Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13324
2013-03-10 16:29:02 +00:00
Josef Weidendorfer
5a2f34cff6 Fix inconsistency between callgrind and format spec
Bug found by, and fix based on a patch by Mark Wielaard

Callgrind format specification was inconsistent with
what Callgrind generates, and what callgrind_annotate
accepted. Now, callgrind_annotate accepts the examples
in the format specification.

* Callgrind writes 'cfi=' lines for when a call target goes
  into another source file. According to the spec, 'cfl=' is
  used for this. Change the spec to allow both, and change
  callgrind_annotate to accept both.
* The spec requires just an "events:" line as minimum header
  to render the file as correct according to the specification.
  callgrind_annotate also expected a 'cmd=' line. Fixed.
* The 'summary:' line is optional in the spec. Fixed in
  callgrind_annotate. If not provided, summary is calculated
  from all cost lines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13310
2013-03-04 17:02:35 +00:00
Julian Seward
9461b8012f Doc updates for 3.8.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12838
2012-08-05 13:44:15 +00:00
Josef Weidendorfer
5c36030d9f Make some vgdb interface to callgrind_control internal
The vgdb "status" monitor command is still available, but
used for pretty printing of status information now (acutally,
just some place holder for real information up to now: just
number of running threads). The internal interface used by
callgrind_control to provide stack traces and event counts
is using "status internal", and is not documented, as the
format is not for human consumption.

This also adds some documentation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12014
2011-09-06 19:08:35 +00:00
Julian Seward
97c113e7e0 valgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
--cmd-time-out

* changed prefixes of Valgrind core monitor commands from vg. to v.
* removed prefixes of Tool monitor commands
* memcheck leak_check 'leakpossible' arg renamed to 'possibleleak'
* memcheck make_memory 'ifaddressabledefined' arg renamed to
'Definedifaddressable'
    (with uppercase D to avoid confusion with 'defined' arg).
* vgdb options
  - Some doc updates : more logical option order documentation,
       specify 'standalone' for options aimed at standalone usage.
  - added option --cmd-time-out for standalone vgdb
     (comment of Josef Weindendorfer, needed to interface with a callgrind GUI)
* updated tests according to the above.
* updated documentation according to the above.
* some additional minor doc fixes/clarifications

(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 111.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11844
2011-06-28 08:20:39 +00:00
Julian Seward
48d69a241a Move the GDBserver documentation from the "Valgrind core" chapter
to the "Valgrind core: advanced topics" chapter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11821
2011-06-17 08:31:22 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Josef Weidendorfer
c3ff44e6e9 Fix typo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11490
2011-01-04 21:09:14 +00:00
Nicholas Nethercote
60d9b410d4 Change Cachegrind/Callgrind to talk about the LL (last-level) cache instead
of the L2 cache.  This is to accommodate machines with three levels of
cache.  We still only simulate two levels, the first and the last.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11404
2010-10-06 22:46:31 +00:00
Josef Weidendorfer
b4b9af9a82 Callgrind: add branch prediction from Cachegrind
Callgrind now uses Cachegrind's command line option to switch
on simulation: "--branch-sim=yes/no" for branch prediction,
and "--cache-sim=yes/no" for cache simulation (for more
consistency and to avoid confusion). However, the previously
used "--simulate-cache=yes/no" still is supported but deprecated.

Included: according documentation and tests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11207
2010-07-02 19:56:23 +00:00
Josef Weidendorfer
c3b643bb35 Callgrind new feature: count global bus lock events "Ge"
To count global bus lock events, use "--collect-bus=yes".
For x86, this will count the number of executed instructions
with a lock prefix; for architectures with LL/SC, this will
count the number of executed SC instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11167
2010-06-09 22:33:02 +00:00
Nicholas Nethercote
4e495edf4a Make "option" terminology consistent some more. Also tweaked the mempool
Memcheck section a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10759
2009-08-10 01:29:14 +00:00
Nicholas Nethercote
0db63a66bf Remove some cross-references that are broken in the man pages because they
only include a subset of the User Manual.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10757
2009-08-10 00:42:43 +00:00
Nicholas Nethercote
c149a17389 Make usage messages given by -h and man pages consistent for the scripts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10756
2009-08-09 23:27:00 +00:00
Josef Weidendorfer
e9c296ba6d callgrind_control: be strict on parsing options
Get rid of "-v" as short form of "--version".
Also, help text for dumps/instrumentation shows only the long
versions now. However, '-i on' or '-d dump now!' is still possible.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10754
2009-08-07 23:19:09 +00:00
Nicholas Nethercote
128610128f Remove commas, for consistency with other parts of the manual.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10753
2009-08-07 22:01:49 +00:00
Josef Weidendorfer
aa85156872 callgrind_control: sync manual/man page and script help output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10750
2009-08-07 20:20:41 +00:00
Nicholas Nethercote
6fcbcab519 Add a manpage for cg_annotate. Now only valgrind-listener and cg_merge lack
a manpage, and they're so simple I can't be bothered doing ones for them
(they don't even have sections in the manual).

Also fixed a few minor things relating to manpages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10744
2009-08-07 07:56:20 +00:00
Nicholas Nethercote
a5bcb4c0dd - Documented callgrind_{annotate,control} in the Callgrind manual chapter
and created man pages for them.  Renamed the XML files in the process for
  consistency.

- Inlined cg-entities.xml into vg-entities.xml.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10742
2009-08-07 07:44:31 +00:00
Nicholas Nethercote
0278a4c81a Minor changes to Callgrind file format docs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10736
2009-08-07 05:40:26 +00:00
Josef Weidendorfer
ca4dc72ef9 Added some text for --simulate-wb/--cacheuse options of Callgrind.
For cacheuse, it actually got quite large...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10729
2009-08-06 18:13:17 +00:00
Nicholas Nethercote
d570c48793 Clean up Callgrind docs. Josef, I added brief entries for --collect-systime,
--cacheuse and --simulate-wb but you might like to expand them.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10728
2009-08-06 02:30:26 +00:00
Nicholas Nethercote
acd9f85b48 - Remove unused Callgrind documentation entities.
- Link to Cachegrind docs within the current set, not the version on the
  website.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10726
2009-08-06 00:46:59 +00:00
Nicholas Nethercote
c4dbcca8b5 Remove man-callgrind.xml, because Callgrind no longer has a separate man
page (it hasn't for a long time).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10725
2009-08-06 00:31:28 +00:00
Nicholas Nethercote
dbcea71779 More docs build tweaks:
- Actually remove the dead docs/images/massif*.png files (this was meant to
  happen in r10720).

- Inline $TOOL/docs/Makefile.am into $TOOL/Makefile.am for all 10 tools.  10
  fewer Makefile.am files FTW!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10721
2009-08-05 08:08:18 +00:00
Nicholas Nethercote
74c920d729 Overhaul Massif's manual, and a few minor related things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10706
2009-08-04 05:59:46 +00:00
Nicholas Nethercote
ac7761261a We currently use a mix of <option> and <computeroutput> tags for command
line options.  This commit changes them to all <option>.

Also make consistent how options with multiple names (eg. -h --help) are
shown.

Also, remove section describing --help and --version in Callgrind's chapter;
these aren't necessary and are presumably a hangover from when Callgrind was
a separate tool.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10659
2009-07-30 02:57:52 +00:00
Nicholas Nethercote
78b2e5c83e Started overhauling the documentation:
- There were detailed descriptions of all the tools in the Quick Start
  Guide, the Manual introduction, and the start of each tool chapter.  To
  avoid duplication/overlap, I removed these altogether from the Quick Start
  Guide, and shortened them in the intro.

- Improved the description of what errors Memcheck can find.

- Made all tool chapters start with "Overview" section, for consistency.

- Made the "run with --tool=XXX" bit consistent in each tool chapter.

- Made all tool chapter titles match the description given when running them.

- Added BBV to the User Manual intro.

- Generally clarified, updated, and future-proofed various bits of text in
  the Quick Start Guide and User Manual introduction. 

Also:
- Changed Nulgrind's start-up description to "the minimal Valgrind tool".

- Fixed some punctuation in the usage message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10652
2009-07-29 02:36:21 +00:00
Nicholas Nethercote
2913b0fa2d Remove callgrind/docs/index.xml, which is a relic from when Callgrind was
distributed by itself.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10283
2009-06-09 22:25:00 +00:00
Nicholas Nethercote
99f13531ec Remove references to the now-defunct INSTALL file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10271
2009-06-06 21:54:59 +00:00
Josef Weidendorfer
f7757e3ac6 Callgrind manual: add section on client requests and note about fork().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8705
2008-10-24 18:50:04 +00:00
Josef Weidendorfer
094c96388c Update old (and wrong) parts of callgrind documentation.
This obviously was already wrong in 3.2.x :-(

* Old --fn-recursion=... / --fn-caller=... options are called
  --separate-recs=... / --separate-callers=... since quite some
  time for consistency with e.g. --separate-threads=yes.
  Error noted from bug 153335.
* Function specifications support wildcards since quite some time;
  specification of a prefix only does not work, but the full
  function has to match. This was needed to allow to specify 'foo'
  without also specifying 'foo1'.
* The script 'callgrind' does not exist since merging into
  valgrind.
* Rename callgrind from being a 'heavyweight' to a 'call graph'
  profiler, similar to the description in the quick start overview.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7272
2007-12-04 10:09:24 +00:00
Josef Weidendorfer
1752567fb4 callgrind: support for --callgrind-out-file
This removes the --base option, which is replaced by
--callgrind-out-file.
Plus manual update.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7235
2007-11-27 01:27:12 +00:00