7233 Commits

Author SHA1 Message Date
Nicholas Nethercote
97b2ffd409 Fix a problem with r10384: it was failing to read the ELF header if the
executable was less than 4096 bytes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10387
2009-06-30 06:06:14 +00:00
Josef Weidendorfer
81045dedcf Fix statistics with multiple changes of instrumentation state
This fixeds bug 150606.

When switching on instrumentation, the current function got the
wrong (too large) inclusive cost when instrumentation ever was on before.

The reason was that the global (ever increasing) event counters where
not reset on toggling instrumentation state. The global counters
are used to calculate inclusive cost of a function by getting the
difference of the global counters at leaving minus their value at
enter time. When leaving a function which was not encountered
to be entered before (a stack underrun of the shadow stack), it is
assumed that this function was entered with instrumentation switched
off. Then, the absolute value of global counters is used to calculate
the inclusive cost. Thus, these global counters have to be zeroed
at instrumentation change to allow for senseable inclusive costs
of functions which were not observed to be entered.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10386
2009-06-29 21:00:33 +00:00
Josef Weidendorfer
1191ffa0eb Change demangler to not use excessive space from stack
Replaces alloca with xmalloc calls.
This should fix bug 197988.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10385
2009-06-29 16:13:25 +00:00
Nicholas Nethercote
07a1251a20 Make the Linux launcher more like the Darwin one in how it reads the
executable headers.  This means it no longer crashes on an empty executable.
Fixes bug 156065.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10384
2009-06-29 06:57:30 +00:00
Nicholas Nethercote
a95af1babe Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10383
2009-06-29 05:19:15 +00:00
Nicholas Nethercote
0f65eba3c4 Suppression wasn't general enough. Caught by Jeroen Witmond.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10382
2009-06-27 01:06:04 +00:00
Bart Van Assche
06eb5d4a25 Applied the patch attached to http://bugs.kde.org/show_bug.cgi?id=165468: fixed some formatting inconsistencies.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10381
2009-06-26 19:03:53 +00:00
Nicholas Nethercote
363533b51b Suppress a leak in setenv(). Fixes bug 188572.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10380
2009-06-26 07:00:00 +00:00
Nicholas Nethercote
04e9b16dea An fd in the Darwin launcher wasn't being closed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10379
2009-06-26 04:35:51 +00:00
Nicholas Nethercote
512909dd91 Fix 'make check' for automake-1.7. Fixes bugs 197898 and 197901.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10378
2009-06-25 23:46:23 +00:00
Bart Van Assche
0e909781d4 Use the value set in the environment variable DRD_SEGMENT_MERGING_INTERVAL if the segment merging interval has not been specified as a command-line option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10377
2009-06-24 18:35:02 +00:00
Bart Van Assche
45c852ee2e Changed default segment merging interval from 64 to 10.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10376
2009-06-24 18:34:10 +00:00
Bart Van Assche
778094eadd Added tool option --drd-stats=yes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10375
2009-06-24 18:33:47 +00:00
Nicholas Nethercote
26daa53d28 In VG_(get_changed_segments) use dynamic memory allocation rather than
static memory allocation to avoid hardwiring an upper limit on CSS_SIZE.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10374
2009-06-24 08:32:42 +00:00
Nicholas Nethercote
389b3f02e0 Remove some unnecessary tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10373
2009-06-24 08:32:07 +00:00
Bart Van Assche
f020382a31 The previous commit broke the 32-bit build, which is now fixed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10372
2009-06-24 06:44:49 +00:00
Nicholas Nethercote
5e7562af08 Add support for various aio_*() syscalls on Darwin. With them, Quicktime
runs, albeit incredibly slowly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10371
2009-06-24 06:25:36 +00:00
Nicholas Nethercote
94cf8ddabe Suppress a Cond error in pthread_rwlock_init(). Fixes bug 196528.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10370
2009-06-24 05:01:41 +00:00
Nicholas Nethercote
511e5090ca Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10369
2009-06-24 04:40:22 +00:00
Nicholas Nethercote
7eb329d028 Support and test mincore() on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10368
2009-06-24 04:15:29 +00:00
Nicholas Nethercote
03e20d86b7 Enable mincore() on AMD64/Linux. Hopefully fixes bug 197591.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10367
2009-06-24 04:02:19 +00:00
Nicholas Nethercote
de25e03eed Abort if a dir is given to --suppressions. Fixes bug 197456.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10366
2009-06-24 03:49:19 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Bart Van Assche
e6ca73c74b Fixed typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10360
2009-06-22 18:06:29 +00:00
Bart Van Assche
2b7c54cfae Statistics: fixed bug introduced in r10356.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10359
2009-06-21 18:09:02 +00:00
Bart Van Assche
6eb83dfd22 Statistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls as level one bitmap creation events.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10358
2009-06-21 18:08:31 +00:00
Bart Van Assche
6b937d7d95 Combined DRD_(thread_new_segment)() and DRD_(thread_combine_vc_sync)()
into the function DRD_(thread_new_segment_and_combine_vc)() because
before DRD_(thread_combine_vc_sync)() was called the function
DRD_(thread_new_segment)() was always called.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10357
2009-06-21 18:07:35 +00:00
Bart Van Assche
2a99145bc2 Made --drd-stats=yes output even more verbose.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10356
2009-06-21 11:51:23 +00:00
Bart Van Assche
7c518a0c3f Merged revisions 10129:10130 from the DRDDEV branch to the trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10355
2009-06-21 10:11:15 +00:00
Bart Van Assche
725df5fb50 Updated code for statistics printed by --drd-stats=yes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10354
2009-06-21 09:26:27 +00:00
Bart Van Assche
ba31c5a104 Generalized a suppression pattern.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10353
2009-06-20 17:42:59 +00:00
Bart Van Assche
94e061bf37 Updated test plan.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10352
2009-06-20 10:56:45 +00:00
Bart Van Assche
08df3938ab Reran SPLASH-2 benchmark.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10351
2009-06-20 10:55:12 +00:00
Nicholas Nethercote
e4cbc57ed9 Make the sys_newlstat wrapper more like those of similar *stat() syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10339
2009-06-15 07:43:50 +00:00
Josef Weidendorfer
4c45289dca Callgrind: fix instrumentation for arbitrary events per guest instruction
(should fix bug 169505)

This uses the same event queue scheme as cachegrind and lackey, and
same kind of helpers (1/2/3 Ir events, Ir+Dr, Dr, Ir+Dw, Dw).
Note that in contrast to Cachegrind, Callgrind interpretes a modify event
as Dw (otherwise the cache model generating write back events would not work).

Callgrind uses per-(guest)instruction event sets for cost counters.
An per-instruction eventset is incrementally extended as events for the
same guest instruction are flushed. Event sets always start with Ir counters,
but depending on Dr/Dw order afterwards, there exist IrDr(Dw) and IrDw(Dr).
Per-instruction event sets now are consistently named according to event ordering.
Event set "sim" is a subset of "full", was never used and was removed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10321
2009-06-15 00:16:36 +00:00
Josef Weidendorfer
7f5d884fe9 Avoid variable name "new", use more concrete name instead
Also confusing for syntax highlighter/indexer of some editors/IDEs

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10320
2009-06-15 00:16:32 +00:00
Bart Van Assche
3d7dbdb790 Added #include <stdint.h>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10319
2009-06-14 08:18:44 +00:00
Bart Van Assche
462e24e5ff Skip the pth_create_chain test on ppc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10318
2009-06-13 08:58:20 +00:00
Nicholas Nethercote
fb0ebe0dfe Tweak the README -- make its text match the website, get rid of some of the
more detailed explanation (if they're reading the README, we probably don't
need to convince them about Valgrind's wonderfulness).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10313
2009-06-12 23:40:04 +00:00
Nicholas Nethercote
c019d97d9d Get rid of ACKNOWLEDGEMENTS, because it overlaps hugely with AUTHORS.
Improve AUTHORS a bit at the same time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10309
2009-06-12 07:38:24 +00:00
Nicholas Nethercote
7f3bdeb30e Add some cases to darwin/scalar.c, and tweak the macros used a little.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10298
2009-06-11 00:59:06 +00:00
Nicholas Nethercote
d48af010b9 Add wrappers for shmat() and shmdt() on Darwin. Fixes bug 191271.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10297
2009-06-10 23:26:13 +00:00
Nicholas Nethercote
a391386bc6 Move the Darwin _nocancel tests to a different file so they can be tested
properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10296
2009-06-10 23:09:40 +00:00
Nicholas Nethercote
7a095f31f3 Added a wrapper and test for exchangedata() on Darwin. Fixes bug 195860.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10295
2009-06-10 22:58:27 +00:00
Bart Van Assche
64ffae8a11 - Added more comments in DRD's malloc wrappers.
- Fixed memory allocation counters.
- Client memory is now freed in the realloc() wrapper in all cases where
  it should be freed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10294
2009-06-10 19:24:20 +00:00
Bart Van Assche
39be00f029 Updated ignore list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10293
2009-06-10 17:52:10 +00:00
Bart Van Assche
31fd94279e Added test code for realloc().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10292
2009-06-10 17:51:52 +00:00
Nicholas Nethercote
a048647a9a Implement and test wrappers for lstat_extended, stat64_extended,
lstat64_extended, and improve the existing wrapper for stat_extended.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10291
2009-06-10 06:13:34 +00:00
Nicholas Nethercote
aa21ae3de1 Darwin syscall wrapper cleanups:
- Put Darwin syscall DECL_TEMPLATEs in syscall order.
- Removed the "sys_" prefix from Darwin-specific wrappers, it's not
  necessary.  Renamed a couple of other wrappers similarly.
- Removed the sys_fcntl64 Darwin wrapper, it was unused.
- Improved some code layout.
Overall this removes 6 "DDD"/"GrP" fixme comments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10290
2009-06-10 04:11:56 +00:00
Nicholas Nethercote
517e9ae831 Update scalar.stderr.exp; this should have gone in with r10288.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10289
2009-06-10 03:30:07 +00:00