49 Commits

Author SHA1 Message Date
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
439594978f Various fix-ups for Memcheck's manual chapter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10716
2009-08-05 06:34:27 +00:00
Nicholas Nethercote
8da3d6fbc0 Move command-line option details after the description of Memcheck's error
messages, since that's an order that will make more sense for a newbie.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10715
2009-08-05 05:11:02 +00:00
Nicholas Nethercote
ec073bad3d Added documentation for --ignore-ranges. It's not very good, though, if
anyone can explain clearly why it's useful and wants to add that information
that would be helpful.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10713
2009-08-05 04:57:44 +00:00
Nicholas Nethercote
e06d3b4893 Put Memcheck's command line options in the manual in the same order as its
usage message.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10712
2009-08-05 04:54:51 +00:00
Nicholas Nethercote
daa35cac73 Various clean-ups, mostly in chapter 3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10705
2009-08-04 05:24:46 +00:00
Nicholas Nethercote
d5b384f852 Various manual fix-ups:
- Use "heap blocks" rather than "malloc'd blocks" as heap blocks covers
  calloc, realloc, new, new[], memalign, etc.

- Used "GDB" and "GCC" throughout rather than "gcc" and "gdb".

- Made various tag uses more consistent.

- Greatly clarified the instructions on --xml=yes and its friends.

- Lots of other little improvements and fixes to out-of-date things and
  Linux-centric things, mostly in Section 2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10701
2009-08-04 01:16:01 +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
Bart Van Assche
b83aa02475 Fixed XML syntax.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10487
2009-07-19 09:19:58 +00:00
Nicholas Nethercote
3758ff85e8 Add details about an interior-pointer case that can occur with C++.
Addresses bug 136230.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10462
2009-07-15 07:18:16 +00:00
Nicholas Nethercote
7e075c243f Make --leak-resolution=high the default. Fixes bug 197929.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10423
2009-07-10 08:16:29 +00:00
Bart Van Assche
06eb5d4a25 Applied the patch attached to http://bugs.kde.org/show_bug.cgi?id=165468: fixed some formatting inconsistencies.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10381
2009-06-26 19:03:53 +00:00
Nicholas Nethercote
7f0f76c228 Fix some broken XML tags.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9901
2009-05-18 23:03:52 +00:00
Nicholas Nethercote
28084aaff9 Tweak the Memcheck manual, fixing bug #157154 in the process.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9341
2009-03-10 21:40:46 +00:00
Nicholas Nethercote
bafed25ae9 This commit completely overhauls the leak checker. In particular:
- It heavily refactors the code:  uses better names for things, splits up
  complex functions that behaved very differently depending on how they were
  called, removes some redundancies, and generally makes it much simpler and
  easier to follow.

- It adds lots of comments, both inline, and also a big explanatory one at
  the top which makes it clear exactly how the leak checker works and also
  exactly what is meant by definite, possible, and indirect leaks.  It also
  has some ideas for future improvements.

- All tabs have been converted to spaces.

It also improves the functionality:

- Previously if you did --leak-check=summary, indirect and suppressed
  blocks were counted as definite leaks.  Now they are done properly, and so
  the summary results from --leak-check=summary match those from
  --leak-check=yes.

- Previously, some possibly reachable blocks were miscategorised as
  definitely reachable, because only the pointer to the block itself was
  considered, not any preceding pointers in the chain.  This is now fixed.

- Added memcheck/tests/leak-cases, which fully tests all the possible
  combinations of directly/indirectly reachable and possibly/definitely
  reachable.

And it improves the manual quite a bit, and the FAQ a little bit.

This doesn't fix the leak checker to handle MALLOCLIKE_BLOCK works that have
been taken from within malloc'd blocks, but I think I know how to do it and
hope to do so in a subsequent commit.

It also changes all instances of "<constant>memcheck</constant>" in the
Memcheck manual to "Memcheck", for consistency and because "Memcheck" is
easier to write.  There's one similar case for DRD but I didn't change that.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9330
2009-03-09 22:52:24 +00:00
Nicholas Nethercote
e97076e0f3 Merge r9299..r9303 (various leak-check test fixes) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9304
2009-03-02 05:11:06 +00:00
Nicholas Nethercote
3dfc8932ae Changed the way files are installed. Instead of going into
$INSTALL/<platform>/<filename>, they go to $INSTALL/<filename>-<platform>.
These filenames match those built in the build tree, and so simplifies the
build system signficantly and avoids the horrible sed renamings that were
previously required.  This will also help greatly with the treatment of
.dSYM debug directories in the DARWIN branch.

Files affected include:
- preload libraries such as vgpreload_core-<platform>.so and
  libmpiwrap-<platform>.so
- libraries such as libcoregrind_<platform>.a
- executables such as memcheck-<platform>

I updated the manual and added a note to the NEWS file about the change,
because it will affect a small number of users.

I did my best to update the AIX launcher/initimg correctly, but it hasn't
been tested.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9135
2009-02-11 00:35:45 +00:00
Julian Seward
edb789f73a Add documentation on the new --track-origins=no|yes [no] flag.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8006
2008-05-04 23:06:28 +00:00
Julian Seward
59b2716959 * document gcc code generation shenanigans on ppc32-linux
* add docs for --malloc-fill and --free-fill


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7262
2007-12-02 02:01:09 +00:00
Julian Seward
755bc0ea22 Make the freed-block-queue volume metrics 64-bit throughout, to avoid
any wierdness on very large machines in the future.  Also, double the
default size from 5MB to 10MB, on the basis that programs are now on
average twice as lardy as they were when it was set to 5MB, whenever
that was.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7256
2007-11-30 17:19:36 +00:00
Julian Seward
9101880b1f Update documents in preparation for 3.3.0, and restructure them
somewhat to move less relevant material out of the way to some extent.
The main changes are:

* Update date and version info

* Mention other tools in the quick-start guide

* Document --child-silent-after-fork

* Rearrange order of sections in the Valgrind Core chapter, to move
  advanced stuff (client requests) to the end, and compact stuff
  relevant to the majority of users towards the front

* Move MPI debugging stuff from the Core manual (a nonsensical place
  for it) to the Memcheck chapter

* Update the manual's introductory chapter a bit

* Connect up new tech docs summary page, and disconnect old and
  very out of date valgrind/memcheck tech docs

* Add section tags to the Cachegrind manual, to stop xsltproc
  complaining about their absence



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7199
2007-11-22 01:21:56 +00:00
Julian Seward
5e2a8da202 Spelling fixes and misc tidying for the manual. (Brian Gough)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7173
2007-11-17 09:43:25 +00:00
Julian Seward
b91b51b42b Merge (from 3.2 branch) r6743 (Edit the manual to bring it up to date
and make some of the wording a bit more professional sounding.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6745
2007-05-23 21:58:33 +00:00
Nicholas Nethercote
d162731a2c Completely overhauled the internals of Memcheck's error handling. All the
different error kinds were reusing the same struct for storing their
details.  Each one used some but not all the fields, and the AddrInfo was
similar, and it was very confusing.

So I changed MC_Error and AddrInfo to be tagged unions, like Vex's IRExpr and
IRStmt types.  The resulting code is a little more verbose but much easier
to understand.  I also split up several error kinds, which also made things
simpler.  The user-visible behaviour is identical except for a couple of
very minor things that I've documented in the NEWS file for the 3.3.0
release.

Ideally I'd get rid of the Addr and Char* fields in the core Error type,
which are not always used, and do them similarly within tools.  But that
would require changing the core/tool interface, so I'm leaving it for the
moment.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6402
2006-12-16 00:54:12 +00:00
Nicholas Nethercote
0399584b08 Fix a man page bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6345
2006-11-03 19:54:21 +00:00
Julian Seward
afc64cc112 Expand the first para of the custom-allocator section so it says what
this section actually describes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6199
2006-10-06 11:47:01 +00:00
Julian Seward
68a0c28d67 Excellent documentation from Graydon Hoare on his mempool
client-request work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6196
2006-10-05 17:56:14 +00:00
Nicholas Nethercote
3d12e0e9db Terminology change: previously in Memcheck we had the four states:
noaccess, writable, readable, other

Now they are:

   noaccess, undefined, defined, partdefined

As a result, the following names:

   make_writable, make_readable,
   check_writable, check_readable, check_defined

have become:

   make_mem_undefined, make_mem_defined,
   check_mem_is_addressable, check_mem_is_defined, check_value_is_defined

(and likewise for the upper-case versions for client request macros).
The old MAKE_* and CHECK_* macros still work for backwards compatibility.

This is much better, because the old names were subtly misleading.  For
example:

  - "readable" really meant "readable and writable".
  - "writable" really meant "writable and maybe readable, depending on how
    the read value is used".
  - "check_writable" really meant "check writable or readable"

The new names avoid these problems.

The recently-added macro which was called MAKE_DEFINED is now
MAKE_MEM_DEFINED_IF_ADDRESSABLE.

I also corrected the spelling of "addressable" in numerous places in
memcheck.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5802
2006-03-31 11:57:59 +00:00
Nicholas Nethercote
991367c922 Merge in the COMPVBITS branch to the trunk. This is a big change to
Memcheck, replacing the 9-bits-per-byte shadow memory representation to a
2-bits-per-byte representation (with possibly a little more on the side) by
taking advantage of the fact that extremely few memory bytes are partially
defined.

For the SPEC2k benchmarks with "test" inputs, this speeds up Memcheck by a
(geometric mean) factor of 1.20, and reduces the size of shadow memory by a
(geometric mean) factor of 4.26.

At the same time, Addrcheck is removed.  It hadn't worked for quite some
time, and with these improvements in Memcheck its raisons-d'etre have
shrivelled so much that it's not worth the effort to keep around.  Hooray!

Nb: this code hasn't been tested on PPC.  If things go wrong, look first in
the fast stack-handling functions (eg. mc_new_mem_stack_160,
MC_(helperc_MAKE_STACK_UNINIT)).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5791
2006-03-27 11:37:07 +00:00
Donna Robinson
9888e86b06 Tidying up stuff re generating manpage from *.xml docs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5277
2005-12-03 23:02:33 +00:00
Donna Robinson
81d6ed4433 Minor doc tweaks, mostly white space
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5201
2005-11-18 22:09:58 +00:00
Julian Seward
d07dbe4a52 Complete documentation trawl for 3.1.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5137
2005-11-15 20:56:23 +00:00
Julian Seward
57e70cee23 Get rid of old flags that memcheck no longer has.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5039
2005-11-08 14:10:24 +00:00
Julian Seward
7f31b1528f memcheck: make --partial-loads-ok=yes work again, but now make it
the non-default (it's a hack after all).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5035
2005-11-08 02:25:37 +00:00
Julian Seward
5be669c562 In the spirit of other changes over the past month aimed at supporting
monster-sized programs better, increase the default freelist volume
from 1M to 5M.  Maybe even that is too small.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4954
2005-10-20 00:31:31 +00:00
Nicholas Nethercote
39589630bf minor fixes (probably not worth backporting)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4434
2005-08-16 03:42:44 +00:00
Nicholas Nethercote
233a1fc175 How do you like this: there was no proper description in the manual
of leak error messages, nor any examples.  So I added one, and moved
what info there was about leaks out of its separate section, and into
the section describing all the kinds of error message.

BACKPORT TO 3_0_X



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4427
2005-08-16 02:20:17 +00:00
Nicholas Nethercote
b329702e3b A few minor manual updates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4419
2005-08-15 04:26:13 +00:00
Nicholas Nethercote
63f82da63d fix breakage/wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4261
2005-07-25 23:30:24 +00:00
Nicholas Nethercote
a269d9cb78 Clean up command-line args info in the manual and man page for 3.0.0
release.  



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4259
2005-07-25 23:18:44 +00:00
Nicholas Nethercote
1f14543221 Update docs for 3.0.0 release. Still to do: update command line options.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4246
2005-07-25 00:12:19 +00:00
Nicholas Nethercote
93634bbe44 Add note about justified pedantry of overlap checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4174
2005-07-19 00:48:55 +00:00
Donna Robinson
23523d0ca9 Added some more targets to the docs.
Removed 'the' from 'the default' in 'parial' opt to be consistent
Added opt info for --avoid-strlen-errors (was missing)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4017
2005-06-25 14:43:05 +00:00
Nicholas Nethercote
b2f4f4cba0 Get "make dist" closer to working again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3946
2005-06-19 05:43:21 +00:00
Donna Robinson
ff4eb2863e mc-tech-docs.xml:
- fixed link to comply with house-style
mc-manual.xml:
- rm'd unhelpful sentence + it's footnote
quick-start-guide.xml:
- fixed up some section ids + xreflabels 
  so we don't get cool filenames like 'bk01s02.html'.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3898
2005-06-12 10:23:23 +00:00
Nicholas Nethercote
6c7e08a8f5 Documentation update. This should bring the core of the documentation
up to date with reality.  Please give this a proofread.

I ran out of steam at memcheck/docs/mc_techdocs.html, which is even more
hopelessly out of date.  I will note that cacheprof.org is some kind of
dental insurance company now...

MERGED, PAINFULLY, FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3321
2005-03-12 22:14:42 +00:00
Nicholas Nethercote
71525a2d57 Updated docs with all the changes that I'm aware of that happened since
Donna converted them to XML.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3173
2004-12-01 00:02:36 +00:00
Nicholas Nethercote
7a75a9f583 Overhauled the docs. Removed all the HTML files, put in XML files as
converted by Donna.  Hooked it into the build system so they are only
built when specifically asked for, and when doing "make dist".

They're not perfect;  in particular, there are the following problems:
- The plain-text FAQ should be built from FAQ.xml, but this is not
  currently done.  (The text FAQ has been left in for now.)

- The PS/PDF building doesn't work -- it fails with an incomprehensible
  error message which I haven't yet deciphered.

Nonetheless, I'm putting it in so others can see it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3153
2004-11-30 10:43:45 +00:00