Julian Seward [Sun, 7 Dec 2008 01:41:46 +0000 (01:41 +0000)]
* In the conflicting-event mechanism, also record the size and
read-or-writeness of each access, so that these can be displayed in
error messages.
* Use recorded read-or-writeness info to avoid producing error
messages that claim claim two reads race against each other -- this
is clearly silly. For each pair of racing accesses now reported, at
least one of them will (should!) always now be a write, and (as
previously ensured) they will be from different threads.
* Lookups in the conflicting-access map is expensive, so don't do that
as soon as a race is detected. Instead wait until the update_extra
method is called.
Julian Seward [Sat, 6 Dec 2008 22:10:54 +0000 (22:10 +0000)]
Use the new SparseWA data type, rather than WordFM, to implement the
(primary) mapping of the conflicting-access mechanism. This speeds
up Helgrind by 0% to 30% depending on the workload.
Julian Seward [Sat, 6 Dec 2008 22:07:35 +0000 (22:07 +0000)]
Add a new container data type, a Sparse Word Array: an array of UWord
which is also indexed by UWord. This can be used as a replacement for
WordFM with unboxed keys, when the key ranges are dense. It is
implemented as a 256-way radix tree (4-deep on 32-bit platforms,
8-deep on 64-bit platforms).
Julian Seward [Wed, 3 Dec 2008 11:39:37 +0000 (11:39 +0000)]
Change the memory allocation strategy used by the conflicting-access
machinery, so as to allocate fewer chunks of memory. This increases
the speed of Helgrind by about 10% on some apps, which probably means
the conflicting-access machinery itself is about 20% faster.
Julian Seward [Thu, 20 Nov 2008 23:17:01 +0000 (23:17 +0000)]
event_map_maybe_GC: use a flat array when computing the distribution
(counts) of generation numbers in the oldrefTree, instead of using a
WordFM as an associative array. This significantly accelerates the
event map garbage collector.
Julian Seward [Thu, 20 Nov 2008 11:20:50 +0000 (11:20 +0000)]
Re-set constraints in 'consistent' style after a race is detected,
instead of the more aggressive setting, which appeared to cause a
large number of extra race reports.
Julian Seward [Wed, 19 Nov 2008 16:35:15 +0000 (16:35 +0000)]
Don't put raced-on locations in an (E)rror state; instead leave them
in a (C)onstraint state. The former approach can cause races to be
missed. Also, update state machine slightly following re-analysis
thereof.
Julian Seward [Wed, 19 Nov 2008 10:40:56 +0000 (10:40 +0000)]
* Update Qt4 interceptors and add, as comments, findings of analysis
of Qt4 threading functions.
* Add a bunch of replacements for strlen etc, to avoid races from
optimised glibc versions that overread memory. Copied directly from
memcheck/mc_replace_strmem.c.
Julian Seward [Tue, 18 Nov 2008 23:40:00 +0000 (23:40 +0000)]
event_map_maybe_GC: handle corner case that was previously simply
asserted on: if all the entries in the event map are in the same
generation, then we have no LRU information at all with which to
decide which entries to discard. So in this case throw away half of
them randomly -- there's nothing better we can do.
Julian Seward [Sun, 16 Nov 2008 21:40:54 +0000 (21:40 +0000)]
Handle sys_lookup_dcookie on amd64-linux (Andrew Haley). Also take
the opportunity to move the handlers from syswrap-generic.c (which
they certainly aren't) to syswrap-linux.c. Fixes #175044.
Julian Seward [Mon, 10 Nov 2008 15:05:30 +0000 (15:05 +0000)]
Adjust sed scripts used to generate the linker scripts on Linux, so as
to delete everything after the trailing ======. This apparently makes
the system buildable with icc 9.1. (patch from Philip Blakely).
Fixes #173099.
Julian Seward [Sun, 9 Nov 2008 23:31:19 +0000 (23:31 +0000)]
Move the conflicting accesses in each thread earlier, so that pure h-b
is not fooled by the locking on non-conflicted parts of the arrays.
(Not really sure what's going on here, but DRD and Helgrind behave
identically, so I'm not too concerned.)
Julian Seward [Sat, 8 Nov 2008 15:22:19 +0000 (15:22 +0000)]
When trying to establish whether or not debuginfo should be read from
a file, first the mapping permissions _before_ peering at the file's
header, rather than afterwards. This changes the logic to behave more
like it does in 3.3.x. Fixes #164669, although really it is all still
rather fragile. The bug report,
http://bugs.kde.org/show_bug.cgi?id=164669, contains a detailed
explanation.
Julian Seward [Sat, 8 Nov 2008 15:17:50 +0000 (15:17 +0000)]
Add a second expected output. It appears that a recent glibcs print
one (or a value near it) as "+1.0000e+00" instead of "+1.0000e-00".
Or it could be a rounding issue .. I dunno.
Julian Seward [Sat, 8 Nov 2008 15:14:01 +0000 (15:14 +0000)]
Use a "sided" comparison rather than a "point" comparison, so as to
ensure that gcc generates only one conditional jump per conditional
expression, not two.
Julian Seward [Sat, 8 Nov 2008 15:11:03 +0000 (15:11 +0000)]
Sigh: /bin/sh on Ubuntu is not bash, it is dash (what a nuisance) and
it doesn't do the "[ ]" thing itself; instead it hands it off to
/usr/bin/[. And that doesn't understand "==" on strings; it wants "="
instead.
Julian Seward [Sat, 8 Nov 2008 15:06:57 +0000 (15:06 +0000)]
Add a new expected output for this test. Really it's a bad test,
in the sense that there are a huge number of valid outcomes, but
I'm not sure how to test it better.
Julian Seward [Sat, 8 Nov 2008 15:04:58 +0000 (15:04 +0000)]
Run this test -q, so as to remove the variance in outputs exhibited as
different numbers of blank lines than expected. I assume this
signifies that different numbers of forked-but-not-exec'd processes
are exiting, but I'm not sure.
Bart Van Assche [Tue, 4 Nov 2008 17:49:58 +0000 (17:49 +0000)]
Make sure that $d is always an absolute path, even if vg-in-place has been started without specifying a path. Furthermore, vg-in-place now also works when started from a path containing spaces.
Julian Seward [Mon, 3 Nov 2008 23:10:25 +0000 (23:10 +0000)]
Improvements to the suppression mechanism:
* Allow frame-level wildcarding in suppressions. Based on a patch by
Akos PASZTORY. Fixes #151612. With this change, a line "..." in a
suppression stacktrace matches any number of frames, including zero.
* Show line numbers in syntax errors when parsing supp files.
Julian Seward [Sun, 2 Nov 2008 23:46:32 +0000 (23:46 +0000)]
Add summaries for more than 60 bugs logged in bugzilla since 3.3.1 was
released. Looking at this lot, you'd get the impression the system is
so bug-riddled it's amazing it works at all.
Julian Seward [Thu, 30 Oct 2008 13:08:31 +0000 (13:08 +0000)]
Origin tracking: handle 16-bit excess in guest state reads/writes.
This gets rid of the messages "Approx: do_origins_Dirty(R): missed %d
bytes\n" and "Approx: do_origins_Dirty(W): missed %d bytes\n".
Julian Seward [Mon, 27 Oct 2008 09:54:14 +0000 (09:54 +0000)]
Fix #includes in some more libiberty files that seem to have been
forgotten about in r8710. This should _really_ make the revised
demangler independent of any system installed libiberty.