Commit Graph

8316 Commits

Author SHA1 Message Date
Bart Van Assche
c7fc5efeb5 Updated Subversion ignore lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11585
2011-03-05 10:10:24 +00:00
Bart Van Assche
a93a5577c4 Updated Subversion ignore lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11584
2011-03-05 10:09:27 +00:00
Bart Van Assche
436556d307 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11583
2011-03-05 10:00:38 +00:00
Bart Van Assche
e783e6b342 DRD: Fixed a Darwin-specific compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11582
2011-03-05 09:05:47 +00:00
Josef Weidendorfer
094063de43 Quick fix to always correctly update <passed> in setup_bbcc
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11581
2011-03-04 17:11:35 +00:00
Bart Van Assche
c03eab7793 <valgrind/valgrind.h>: Made VALGRIND_PRINTF() and VALGRIND_PRINTF_BACKTRACE() definitions (with NVALGRIND defined) C89-compliant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11580
2011-03-04 16:55:56 +00:00
Josef Weidendorfer
2edd73cad9 Fix for bug 265771.
For calls (structure jCC), Callgrind maintains for the source
both the BBCC (counter array for the source context of the call, which
includes the BB of the source call position), as well as a jump
number in the source BB to reconstruct the guest instruction address
of the call. In setup_bbcc, this jump number is stored in <passed>, and
used when creating a new jCC on a call.

The value of <passed> got out of sync when we simulate a real jump
between different functions as return/call pair: the call source was
reset for the popped jCC, but not <passed>.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11579
2011-03-04 10:53:12 +00:00
Bart Van Assche
ab798ee7e4 DRD: avoid triggering an assertion failure if a thread is canceled while waiting inside pthread_mutex_lock(). Fixes #267413.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11578
2011-03-03 19:59:20 +00:00
Julian Seward
47be27ff77 Fix minor documentation nits (Michael Snyder, msnyder@vmware.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11577
2011-02-28 10:26:42 +00:00
Julian Seward
340237738b rm pointless comment and #define.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11576
2011-02-28 09:25:12 +00:00
Julian Seward
0e348ca961 Fix sanity check crash in Helgrind. Partial fix for #255353.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11575
2011-02-28 09:22:51 +00:00
Julian Seward
b8700810bb Don't construct the LAOG at all when --track-lockorders=no (as opposed
to previous behaviour, in which it was constructed but any resulting
errors were not shown, hence wasting CPU and memory.)  Partial fix
for #255353.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11574
2011-02-28 09:03:44 +00:00
Julian Seward
62134f346f Back out r11568 (Add a new constructor for empty XArrays,
VG_(newSizedXA)) since r11571 removes the only use of the
functionality that r11568 introduces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11573
2011-02-27 23:53:32 +00:00
Julian Seward
1cb409edef Simplify the implementation of VTS__tick. The previous version was
hard to understand, and had no comments re loop invariants etc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11572
2011-02-27 23:39:53 +00:00
Julian Seward
a3b68857f7 Change the representation of VTSs. Instead of using an XArray of
ScalarTSs, have the ScalarTS array as a trailing array directly on the
VTS structure.  This reduces the number of malloc'd blocks per VTS
from 3 to 1, since an XArray always requires 2 malloc'd blocks.  At
least for tc19_shadowmem this reduces the total amount of heap
turnover in Arena 'tool' by a factor of 3, and modestly improves
performance whilst modestly reducing overall memory use.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11571
2011-02-27 23:04:12 +00:00
Julian Seward
1f5db4cb20 Scalability fix for Helgrind: reduce the size of ScalarTS (scalar
timestamps) from 16 to 8 bytes.  This halves the size of vector
timestamps and reduces the amount of memory needed to run programs
that have many threads and/or many synchronisation events.

The tradeoff is that Helgrind must abort the run if the program
creates more than 2^20 (1.0e+6) threads or performs more than 2^44
(1.76e+13) synchronisation events.  Neither of these seem like a
significant limitation in practice.  It's easy to argue that a limit
of 2^44 synch events would take at a minimum, several CPU months on a
very fast machine.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11570
2011-02-24 15:25:24 +00:00
Julian Seward
a18fd89fb7 A scalability fix for Helgrind for running large workloads. When
creating new vector timestamps (VTSs) via tick and join operations,
preallocate the underlying XArray of ScalarTSs (scalar timestamps) at
the likely final size, using new function VG_(newSizedXA) introduced
in r11558.  This reduces overall heap turnover (in VG_AR_TOOL) by a
factor of several.  Together with revs 11567 and 11568, it mitigates
the worst-case performance falloff in long runs that involve lots of
threads and lots of synchronisation events (a.k.a Vector timestamps).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11569
2011-02-23 13:30:53 +00:00
Julian Seward
0c2371837b Add a new constructor for empty XArrays, VG_(newSizedXA). This is
identical to VG_(newXA) but allows passing in a size hint.  In the
case where the likely final size of the XArray is known at creation
time, this allows avoiding the repeated (implicit) resizing and
copying of the array as elements are added, which can save a vast
amount of dynamic memory allocation turnover.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11568
2011-02-23 13:22:24 +00:00
Julian Seward
0e228dac5d Fix a scalability problem observed whilst running Helgrind on a large
workload: when scanning a freelist of a given size for a big-enough
block (to allocate), don't scan all the way around the list.  Instead
give up after 100 blocks and try the freelist above.  The pathological
case (as observed) is that the freelist contains tens of thousands of
blocks, but all are too small for the current request, hence they are
all visited pointlessly.  If the new heuristic is used, the freelist
start point is moved along by one block, so that future searches
eventually inspect the entire freelist, just very slowly.

Also, some improvements to stats gathering, and rename of some
existing stats fields in struct Arena.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11567
2011-02-23 13:18:56 +00:00
Julian Seward
a34e53eb92 Record the repo-mangling magic invokations needed for a minor release.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11565
2011-02-17 12:20:59 +00:00
Julian Seward
c8a079f79d Sync w/ 3_6_BRANCH.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11564
2011-02-17 12:20:19 +00:00
Bart Van Assche
626fe3372c Reverted r11536 because it didn't have the desired effect - changing the behavior of DRD on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11539
2011-02-13 07:55:36 +00:00
Julian Seward
46bbd35ea3 Make ld.so:index redir mandatory for glibc-2.12 and later, on x86-linux.
Also, improve the failure message a bit, so as to tell people what package
they need to install, in at least some cases.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11538
2011-02-11 16:47:03 +00:00
Bart Van Assche
b3f1163f39 Removed an unused variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11537
2011-02-10 21:09:25 +00:00
Bart Van Assche
b640febb3e DRD: don't inline pthread intercepts because in combination with the current fragile implementation of the CALL_FN_* macros inlining intercepts can easily trigger stack alignment errors on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11536
2011-02-10 21:03:47 +00:00
Bart Van Assche
d282cac7dc Refined a comment in the NEWS file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11535
2011-02-10 20:59:51 +00:00
Tom Hughes
65b4c42beb Add glibc 2.13 support. Patch from Dmitry Djachenko in bug #265964.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11534
2011-02-10 09:09:09 +00:00
Julian Seward
452a8046df _pre_mem_asciiz handlers in both tools: don't segfault if passed an
obviously invalid address.  Fixes #255009.  Investigation & initial
patch by Philippe Waroquiers (philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11533
2011-02-09 12:47:23 +00:00
Bart Van Assche
2ca0b1b5d1 DRD: handle fork() in processes with detached threads correctly (see also #255355).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11532
2011-02-09 11:55:12 +00:00
Bart Van Assche
c45fda60bf Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11531
2011-02-09 11:32:58 +00:00
Bart Van Assche
f6676e5fd7 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11530
2011-02-09 11:32:34 +00:00
Bart Van Assche
4410d07af2 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11529
2011-02-09 11:32:02 +00:00
Bart Van Assche
6ef338a462 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11528
2011-02-09 11:31:35 +00:00
Bart Van Assche
029e2bf3a6 Updated Subversion ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11527
2011-02-09 11:30:10 +00:00
Bart Van Assche
673552571f DRD: added a test program that forks a process containing a detached thread.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11526
2011-02-09 11:29:11 +00:00
Julian Seward
8598cd5e69 Don't assert in the child after a threaded program does fork().
Fixes #255355 (helgrind part).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11525
2011-02-09 10:34:00 +00:00
Josef Weidendorfer
923b3fc185 Fix bug 246152
When unwinding needs to be done because the stack pointer is reset
(e.g. by a longjmp), it makes no sense to interprete the control
flow change as call, but should be seen as a return.

This indirectly fixes bug 246152. Unwinding potentially changes the
exec state, which is unique for threads, but also for signal handlers.
E.g. this is true for a longjmp out of a signal handler. Exec state
changes modify members of struct CLG_(current_state), such as
CLG_(current_state).bbcc and CLG_(current_state).jmps_passed, which
are backed in CLG_(setup_bbcc)() by last_bbcc and passed, respectivly.
On a exec state change, these local vars go out of sync, and lead
to invalid data passed to CLG_(push_call_stack)() for handling a call,
which triggered data corruption, and the symptoms seen in bug 246152.
As in the given situation, there is no call anymore, there is no call
into CLG_(push_call_stack)(), and the corruption (or since last commit
the failed assertion) is not triggered any more.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11524
2011-02-04 20:50:58 +00:00
Josef Weidendorfer
9aad4ba3d5 Better failed assertion then silent data corruption
This is part 1 of the fix to bug 246152, and makes the bug
reproducable as failed assertion also on Ubuntu 10.10 on 64bit
machines. However, the test needs to be compiled 32bit (-m32).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11523
2011-02-04 19:55:25 +00:00
Bart Van Assche
fb1e012ed0 DRD: removed command-line option --free-is-write again since it is impossible
to implement this functionality reliably.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11522
2011-02-04 19:07:11 +00:00
Bart Van Assche
93f6b2653b vg-in-place: made sure that soft links to this script work fine too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11521
2011-02-03 17:49:07 +00:00
Bart Van Assche
79f1b01520 DRD: do not assert() upon fork(). Fixes the DRD part of #255355.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11520
2011-02-03 17:47:50 +00:00
Julian Seward
fc17442b9a Add suppressions for __setenv leak. Fixes #188572.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11519
2011-02-02 17:16:48 +00:00
Julian Seward
cf593e897e Do the -m32 vs -m64 thing correctly for these tests. Fixes some very
strange failures on 64-bit OSX 10.6.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11518
2011-02-02 17:08:27 +00:00
Julian Seward
afa6fa71cb Handle Dwarf3 types created by GNAT. Fixes #255130.
(Philippe Waroquiers <philippe.waroquiers@skynet.be>)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11517
2011-02-01 23:10:14 +00:00
Julian Seward
30c3aef64f x86: get_otrack_shadow_offset_wrk: handle guest_NRADDR. Fixes #257276.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11516
2011-01-28 00:53:37 +00:00
Julian Seward
3bb7892440 Don't produce suppression stack pseudo-traces with more than
VG_MAX_SUPP_CALLERS entries in them.  Fixes #255822.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11515
2011-01-28 00:44:52 +00:00
Julian Seward
6904ae851c In 3 error-path cases, place the closing </valgrindoutput> on the
correct stream (XML instead of plain-text).  Fixes #255888.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11514
2011-01-28 00:19:25 +00:00
Julian Seward
da68954f7a Somewhat reduce the amount of mempool sanity checking, so as to avoid
rendering the mempool machinery impossibly slow for pools containing
many blocks.  Fixes #255966.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11513
2011-01-27 23:56:36 +00:00
Nicholas Nethercote
c3ae8f0ad3 If Massif's --threshold value was less than 1.0, in lines like this:
->00.00% (0B) in 11 places, all below massif's threshold (00.00%)

the threshold would always be incorrectly printed as 00.00%.  This was
because the percentage printing was broken for percentages less than 1.0.
This change fixes this problem, and modifies a test to check for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11511
2011-01-27 23:07:56 +00:00
Julian Seward
4e4990009a Add a new mempool test resulting from work on #254420, and update
expected output for an existing test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11510
2011-01-23 20:47:26 +00:00