Julian Seward [Thu, 17 Jan 2008 23:19:54 +0000 (23:19 +0000)]
Allow a WordFM iterator to be initialised so as to exclude all key
values below a given value. This allows efficiently iterating over
small subsets of a mapping. Use this in Helgrind to avoid a
performance bad case. Patch from Konstantin Serebryany.
Julian Seward [Thu, 17 Jan 2008 14:37:24 +0000 (14:37 +0000)]
Fix inconsistent order of fields. I think this is purely aesthetic
since nothing depends on the actual layout of this struct, but anyway.
Noticed by Vinay Nallamothu.
Julian Seward [Mon, 14 Jan 2008 11:54:56 +0000 (11:54 +0000)]
DRD updates (Bart Van Assche):
- Updated copyright statement: replaced 2006-2007 by 2006-2008.
- Added copyright statement in the files where it was missing
(drd_track.h and drd_clientreq.c)
- Eliminated dependencies on core header files -- there are no more
#include "pub_core....h" directives in the exp-drd source code.
- Added semaphore support.
- Added barrier support.
- Added pthread_mutex_timedlock() support.
- Stack depth of stack traces printed by exp-drd can now be set via
--num-callers=...
- Added command-line option --trace-barrier=[yes|no].
- Added regression test for pthread_barrier() (matinv, a program that
performs matrix inversion).
- Added regression test sem_as_mutex, which tests whether race
detection works correctly when a semaphore is used to ensure mutual
exclusion of critical sections.
- Some of helgrind's regression tests are now used to test both
helgrind and exp-drd: tc17_sembar and tc18_semabuse.
- Cleaned up bitmap implementation code now that the const keyword has
been added to the declarations of the OSet functions.
- Cleaned up exp-drd/Makefile.am
- Updated exp-drd/TODO.txt
Julian Seward [Wed, 9 Jan 2008 21:03:43 +0000 (21:03 +0000)]
Make a new regtest target, "all-regtest", being the union of "make
regtest" and "make exp-regtest". Then change the nightly build system
to run all-regtest instead of exp-regtest.
Tom Hughes [Tue, 8 Jan 2008 17:44:04 +0000 (17:44 +0000)]
If we don't find the address in the segInfo list that ask the address
space manager for the name of the file it was mapped from as a fallback
solution.
This allows us to print the names of exe/dll files in the stack trace
when running programs under wine.
Tom Hughes [Tue, 8 Jan 2008 16:48:30 +0000 (16:48 +0000)]
Made the argument to VG_(am_get_filename) const as it doesn't need
to be modified and the routine to find the segment for an address now
returns a const pointer.
Tom Hughes [Wed, 2 Jan 2008 10:13:04 +0000 (10:13 +0000)]
Mark the main thread as running while the initial memory declarations
are made to the tool so that the tool can associate that memory with
the main thread if it wishes.
Also cleanup existing hacks in the drd tool which worked around the
fact that the core did not set the current thread while declaring the
initial memory.
Path from Bart Van Assche <bart.vanassche@gmail.com>.
Tom Hughes [Fri, 21 Dec 2007 10:24:24 +0000 (10:24 +0000)]
Propagate the ucontext information with a received signal to the
signal frame constructors and use it (on x86 and amd64) to fill in
the trap number in the signal context information.
Needed for wine which likes to look at the trap number...
Julian Seward [Fri, 21 Dec 2007 01:24:59 +0000 (01:24 +0000)]
Add a new method VG_(record_depth_1_ExeContext), a trivial derivative
of VG_(record_ExeContext), which just records the first stack frame
but does not attempt to unwind the (guest) stack. This is useful in
situations where we suspect unwinding the stack might cause a
segfault.
Use this in m_signals, when getting a backtrace following a guest
segfault.
Julian Seward [Tue, 18 Dec 2007 01:49:23 +0000 (01:49 +0000)]
Improve handling of programs which require very large main thread
stacks. Instead of hardwiring the main thread stack to a max of 16MB
and segfaulting the app beyond that point, allow the user to specify
the main stack size using the new flag --main-stacksize=<number>.
If said flag is not present, the current default, which is "MIN(16GB,
current ulimit -s value)", is used.
Julian Seward [Sat, 15 Dec 2007 22:13:05 +0000 (22:13 +0000)]
When allocating space for the client stack on Linux, take notice of
the --max-stackframe value. This makes it possible to run programs
with very large (primary) stack requirements simply by specifying
--max-stackframe.
Julian Seward [Sun, 9 Dec 2007 02:14:35 +0000 (02:14 +0000)]
Don't do comparisons of (signed) Words by merely subtracting them, as
this does not always produce correct results. Instead use a slower
but correct method. Analogous fix to that applied to m_oset.c by
r7283.
Julian Seward [Sun, 9 Dec 2007 02:08:42 +0000 (02:08 +0000)]
Don't do comparisons of (signed) Words by merely subtracting them, as
this does not always produce correct results. Instead use a slower
but correct method. Fixes #147545. (Nick Nethercote, Tom Hughes et
al)
Julian Seward [Tue, 4 Dec 2007 21:27:18 +0000 (21:27 +0000)]
DRD changes (Bart Van Assche)
* Add docs: exp-drd/docs/README.txt
* Added one drd suppression pattern, and cleaned up the suppression file.
* All regression tests now pass on x86_64 and i386, including sigalrm.
* Updated TODO.txt file.
* pth_create_chain test is now started with 100 threads instead of 10
-- 10 was not enough.
* DRD no longer exits on PPC32 and PPC64 but just prints a warning
message before it starts.
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.
Two changes:
- Be more robust in the face of malformed stack traces. This avoids some
potential assertion errors (which have affected prior versions of Massif),
but unfortunately reduces the amount of sanity-checking that can be done
on XTrees.
- Get white-space printing right in output file. Non-functional change,
just makes output files easier to read.
Julian Seward [Sun, 2 Dec 2007 22:03:43 +0000 (22:03 +0000)]
Back out r7210 ("Fix completely bogus implementation of
VG_(seginfo_sect_kind).") as it breaks DRD and possible Callgrind.
The segment kind identification code is basically broken for non-text
segments, but requires fixing at a higher level than this. See
discussion on valgrind-developers, 20 March 07, "Bug in
VG_(seginfo_sect_kind) ?"
Julian Seward [Fri, 30 Nov 2007 21:41:40 +0000 (21:41 +0000)]
New options for Memcheck, --malloc-fill=<hexnumber> and
--fill-free=<hexnumber>, which cause malloc'd(etc) and free'd(etc)
blocks to be filled with the specified value. This can apparently be
useful for shaking out hard-to-track-down memory corruption. The
definedness/addressability of said areas is not affected -- only the
contents. Documentation to follow.
Julian Seward [Fri, 30 Nov 2007 17:19:36 +0000 (17:19 +0000)]
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.
Julian Seward [Thu, 29 Nov 2007 03:06:25 +0000 (03:06 +0000)]
Don't be confused by archive (.a) files which contain both a 32-bit
and a 64-bit version of the same object (with the same name). Prior
to this, it would sometimes attempt to read debug info from the wrong
version of the object, complain that the magic number wasn't right,
and so end up reading nothing at all for that object.
Julian Seward [Tue, 27 Nov 2007 11:42:47 +0000 (11:42 +0000)]
Make Memcheck work sanely on AIX5.3 (again):
* Don't intercept putenv/getenv/setenv. Causes a lot of whinging
about missing TOC pointers.
* Add 'strcmp' to the bundle of 4 functions intercepted in all
objects.
* xlc now seems to route calls through to malloc_common, free_common,
calloc_common, realloc_common, memalign_common in libc. Intercept
those names too.
Add Massif bugs fixed by the rewrite. I added them to the top part of the
file, not the "after 3.2.3" section, I hope this is the right place for
them.
- Rewrote documentation.
- Added a new time unit, instructions executed, and made it the default -- it's
much more reproducible and consistent than milliseconds. Requires IRSB
instrumentation and so slows down some programs (malloc-light ones such as
bzip2) by about 20%, others by less.
- ms_print now doesn't overwrite the x-axis in the graphs.
- Added a test for --detailed-freq and --max-snapshots