When reporting an error about an attempt to re-lock an already-locked
lock, also report the stack where the lock was previously locked.
This makes it easier to diagnose deadlocks.
pdb_ds_read: if the presented size is implausibly huge (> 512MB),
ignore it on the assumption that the .pdb is corrupt, rather than
running the system out of memory by trying to allocate a chunk of that
size.
Add a fix equivalent to r10751 for amd64-darwin: Resync after
{wq,p}thread_hijack rather than merely doing a check. Also, some
whitespace changes that make it easier to diff by eye relative to the
x86-darwin versions. "Fixes" the problem reported at
https://bugs.kde.org/show_bug.cgi?id=205241#c74
Support sys_audit_session_self on MacOSX 10.6 (Dave MacLachlan,
dmaclach@gmail.com). Fixes #244670. I'm assuming this also compiles
on 10.5 but haven't tried it.
Increase Valgrind's (per-thread) stack size from 64kB to 1MB,
so as to avoid demangler crashes on very long names. Fixes
#197988 (possibly only temporary; the demangler could overflow
the stack again, given extremely long names.)
Make error messages at start-up more consistent. Every line of such
messages now begin with "valgrind: ", and they're more often printed before
the preamble. This required introducing a new message kind, Vg_FailMsg, and
functions VG_(fmsg) and VG_(fmsg_bad_option), and removing
VG_(err_bad_option).
Where we used to have horrible output like this:
[ocean:~/grind/ws2] vg5 --tool=massif --threshold=101 date
==31877== Massif, a heap profiler
==31877== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote
==31877== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
==31877== Command: date
==31877==
==31877== --threshold must be between 0.0 and 100.0
valgrind: Bad option '--threshold'; aborting.
valgrind: Use --help for more information.
We now have nice output like this:
[ocean:~/grind/ws2] vg2 --tool=massif --threshold=101 date
valgrind: Bad option: --threshold=101
valgrind: --threshold must be between 0.0 and 100.0
valgrind: Use --help for more information or consult the user manual.
Convert x86-darwin to amd64-darwin at configure time, because Macs report as
32-bit even though almost all of them support 64-bit as well. A hack, but
one that will make just about everyone's lives easier.
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.
Don't assert when trying to show a Darwin syscall number in an unknown
syscall class. This stops Valgrind asserting when doing
--trace-syscalls=yes and a sys_syscall is encountered, in 64-bit mode.
I don't know if this is a correct fix or whether it merely hides
symptoms of logic handling problems for sys_syscall on Darwin.
Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT. I just
overwrote the trunk versions with the branch versions.
Allow negative numbers in the cachegrind.out.* file. Also protect against
division-by-zero. Both are required for cg_diff (not yet committed) to work
properly.
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.
Callgrind: make globals for log_* helpers visible outside sim.c
At beginning of each BB, Callgrind inserts a call to setup_bbcc,
which (among a lot other things), sets global vars needed for
the log_* helpers called afterwards in this BB.
These globals, bb_base and cost_base, previously we static declared
and only visible in sim.c. Make them visible also in the rest of
callgrind to allow for log_* handlers outside sim.c.
Offsets of groups within event sets are now
stored in a offset table as part of the event set, and
can be accessed directly. Before, offsets were hardcoded
all over the place. This should make addition of further
event groups much simpler.
Julian Seward [Wed, 2 Jun 2010 00:31:34 +0000 (00:31 +0000)]
Add a new program (link_tool_exe.c) and use this to link the tool
executables. Gets rid of the linker script kludgery and uniformly
uses -Ttext=0x38000000 (or whatever) on Linux, so as to accomodate
both traditional ld and gold. Should fix #193413 although I have
been unable to test it. Using a whole new program seems like
overkill, but this is infrastructure to support static linking of
the tool executables on MacOS too.
Bart Van Assche [Thu, 13 May 2010 06:32:36 +0000 (06:32 +0000)]
Added support for glibc 2.12.
Note: many Helgrind and DRD regression tests still fail on Fedora 13 because
of differences in the call stacks of error reports compared to earlier
glibc/gcc combinations.
Julian Seward [Sun, 9 May 2010 22:30:43 +0000 (22:30 +0000)]
New flag --require-text-symbol=:sopatt:fnpatt, to be used to check
that specified shared objects contain specified symbols. Along with a
couple of regtests that unfortunately will fail on MacOSX.
Tom Hughes [Fri, 7 May 2010 15:32:04 +0000 (15:32 +0000)]
Add support for some EVIO ioctls. These are a bit abnormal because
the length part of the ioctl is not fixed so they are essentially
families of ioctls.
Based on patch from Peter Korsgaard. Fixes #235642.
Julian Seward [Wed, 5 May 2010 09:34:42 +0000 (09:34 +0000)]
Rollup changes for Helgrind:
* Add new client request VALGRIND_HG_CLEAN_MEMORY_HEAPBLOCK. This is
like VALGRIND_HG_CLEAN_MEMORY but doesn't take an address range.
Instead it takes a single argument which is supposed to be a pointer
to the start of, or anywhere within, a heap allocated block.
Helgrind then finds the block and paints it as belonging to the
calling thread. This is needed for correctly describing the
behaviour of threadsafe reference counting when applied to classes
involving inheritance of release methods or involving multiple
inheritance.
* Add statistics counters for all basic VTS operations (tick, join,
cmpLEQ, cmp_structural).
Julian Seward [Wed, 5 May 2010 09:23:41 +0000 (09:23 +0000)]
Add a method to get the contents of an XArray so we can index in
it really fast, or iterate over it. This is dangerous and breaks
the nice abstraction (sigh).