Julian Seward [Fri, 7 Aug 2009 15:46:56 +0000 (15:46 +0000)]
Tidy up of messaging:
* For all tools and the core, don't show statistics when -v is in
effect. Instead, try to restrict -v to mostly user-useful
stuff.
* A new flag --stats=no|yes [no] produces statistics output instead.
* Fix longstanding problem in that Memcheck's leak checker ran after
the core's error manager module shut down, thereby not showing use
counts of leak suppressions. This fixes #186790.
* As a consequence, the leak checker text output of Memcheck has
changed a bit -- leak check is done before the final error
summary is done (much more logical), and the output has been
tidied up a bit.
* Helgrind, Drd and Ptrcheck now also print "For counts of
detected and suppressed errors, rerun with: -v", which makes
them consistent with Memcheck in this regard. These are
filtered out by the regtest filter scripts.
For all tools except Memcheck, the regtests are unchanged. On
Memcheck regtests still fail due to rearrangements of the leak
checker output. This will be fixed by a followup commit.
Install all the new man pages. Include them in 'make dist' too (even if
BUILD_ALL_DOCS is false; we've built them anyway). Delete them with 'make
distclean' too (and FAQ.txt).
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.
- Documented callgrind_{annotate,control} in the Callgrind manual chapter
and created man pages for them. Renamed the XML files in the process for
consistency.
- Added docs/xml/manpages-index.xml, which is just used as a convenient
single file to hang all the man pages off so they can be generated in a
single command.
- Added facility whereby manpage generation will attempt to find the
stylesheet in multiple places. This means I don't have to constantly edit
XSL_MAN_STYLE to build manpages on my machine.
- Changed vg-docs-path to start with $INSTALL instead of /usr/, because we
can't assume that's the installation dir.
- Rejigged Lackey's manual
- Made it count calls to main() by default, since _dl_runtime_resolve() no
longer appears to exist.
- A couple of other minor Lackey things.
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.
- Match the ordering of the non-tool-specific options in the usage message
with the order in the user manual. As a result, we now always print
--alignment and --trace-malloc in the core's usage messages, which saves
malloc-replacing tools from doing it themselves (and brings it in line
with options that only apply to error-collecting tools).
- Improved the presentation of the Vex options with --help-debug.
- Removed documentation of -d in the manual because it's a debugging-only flag.
- Documented --read-var-info in the manual. This fixes bug 201169.
- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
message.
Don't wrap the "Command:" line, as doing so makes cutting-and-pasting the
command difficult. Also, when wrapping I was failing to factor in the
escape chars needed for chars like ' '; now I don't need to. And this
means the 'long-command' test is no longer necessary. In other words,
favour utility and simplicity over aesthetics.
Also, the "Command:" line wasn't being wrapped in <line></line> in XML
output. It now is.
Tom Hughes [Mon, 3 Aug 2009 14:39:54 +0000 (14:39 +0000)]
Ignore structure members with no location - thiscan happen with static
const members in C++ code which are compile time constants that do no
exist in the class. They're not of any interest to us so we ignore them.
Julian Seward [Mon, 3 Aug 2009 13:47:04 +0000 (13:47 +0000)]
Patch to remember/restore CFA state on DW_CFA_{remember,restore}_state.
In addition to that it fixes a bug in restore_ctx handling, where it
was restoring the state from the same stack level in restore_ctx
context as is current in ctx, which is wrong, the CIE likely has no
DW_CFA_remember_state at all, while the FDE could have one.
(Jakub Jelinek). This is #200029, patch in comment #2.
With the recent VG_(message) change,
VALGRIND_{PRINTF,PRINTF_BACKTRACE,INTERNAL_PRINTF} were no longer appending
newlines. This meant that --trace-malloc=yes spewed everything onto a
single line, among other things.
Rather than adding the newline back in, I chose to offically change their
behaviour to not add the newlines, as this is more flexible (and the reason
for the underlying VG_(message) change). I updated all the relevant places
I could find.
Julian Seward [Sun, 2 Aug 2009 12:21:31 +0000 (12:21 +0000)]
Reinstating a heavily modified version of r10402. This is to do
with #190429.
This patch (originally from Jakub Jelinek) makes the redir of strlen
in ld.so on amd64-linux ld.so mandatory, but only for glibc 2.10 and
above. For glibc-2.2 (our earliest supported version) to glibc-2.9
it is still optional.
Also, makes more verbose, the message that is printed if a mandatory
ld.so redirection on Linux cannot be set up.
Bart Van Assche [Sun, 2 Aug 2009 07:46:43 +0000 (07:46 +0000)]
Cleaned up DRD's Linux suppression patterns:
- Grouped the three suppression patterns for ld into a single suppression
pattern.
- Assigned more descriptive names to the suppression patterns.
- Improved suppression pattern documentation.
- Removed suppression patterns that were added before VEX supported atomic
instructions and that are no longer necessary with the current version
of VEX.
Added an output variant for the pth_cancel_locked regression test.
Apparently when canceling a thread waiting inside pthread_cond_wait()
on Linux the specified mutex is left unlocked while on Darwin the
mutex specified in the pthread_cond_wait() call is reacquired before
the thread is terminated.
Implemented a more systematic approach for intercepting POSIX threads
functions: for each function name to intercept, intercept the function
name itself, the function name with @* appended (versioned symbols on
Linux) and the function name with $* appended (versioned symbols on
Darwin). Updated filter_stderr such that symbol versions are removed.
Updated the expected output files that contain names of intercepted
functions.
* VG_(find_seginfo): incrementally rearrange the DebugInfo list, like
most of the other list-searching functions do.
* rename all VG_(*seginfo*) functions exported from m_debuginfo to
VG_(*DebugInfo*). "seginfo" was a historical name which was mostly
but not completely, done away with some time back.
Don't instrument any code in ld.so. Doing so merely generates a large
number of races which have to be expensively suppressed, so it's
better not to do so.
Only consider two error contexts as equivalent if the contexts have another
type than "data race error" or if both data race error contexts refer to the
same access type and the same access size.
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.
Tom Hughes [Wed, 29 Jul 2009 11:09:01 +0000 (11:09 +0000)]
Improve futex system call support. Patch from BZ#201757 which I have
attempted to cross check against current kernel code. Reading the
futex system call code mostly just made my head hurt however...
Don't include "how to write a tool" in the user manual -- it's in the tech
docs, and the chapter/section numbering doesn't match the rest of the
numbering in the user manual.
Also change some of the names of the links in that file to match the
filename.