Commit Graph

857 Commits

Author SHA1 Message Date
Julian Seward
cac8c8a1f2 Track VG_(am_find_nsegment) const-ness change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6298
2006-10-17 02:23:23 +00:00
Julian Seward
88d3b910a2 Merge r6112:
Changes resulting from porting to AIX5:

- Auxiliary primary map handling has been redone, so that the
  performance penalty for hitting memory above the magic 32G limit is
  much reduced, and also the number of usable maps is limited only by
  how much memory is available.  The current code has been tested on
  64-bit AIX for processes up to about 8GB in size.

  The auxiliary primary maps are now stored in an OSet, "auxmap_L2".
  However, looking up in an OSet for each memory reference is
  expensive.  So the OSet is 'fronted' by 24-entry array which holds
  pointers to the 24 most recently used auxiliary primary maps.
  Accesses to this array are made faster by incrementally rearranging
  it on every lookup (if the requested map is found in the array, it
  is moved one element closer to the start of the array).

  Logically speaking, auxmap_L1 is a cache of auxmap_L2.  The L2-L1
  relationship is one of inclusion; iow L2 is not a victim cache.

  There is extensive new sanity check code for these structures.

- Along with the auxmap changes are semi-fast cases in mc_LOADVn_slow
  and mc_STOREVn_slow.  These catch naturally aligned, word-size loads
  which fall into addressible memory, and handle them directly rather
  than in a byte-by-byte fashion.

- Fix longstanding error with alignment checks in
  {new,die}_mem_stack_N.  Previously, these checked the alignment of
  the new SP value without taking the stack redzone size into account.
  This is only safe if the redzone size is 8-aligned.  The right thing
  to do is check alignment after adding on the redzone size.

- Add a new mechanism which allows specification, on the command line,
  of address ranges which memcheck is to 'ignore'.  Meaning that it
  regards all writes to those ranges as acceptable and all reads from
  those ranges as acceptable and returning initialised data.  This is
  done without disturbing the existing finally-balanced bitmap 
  machinery.  Instead, in mc_record_address_error, just ignore the
  error if the address falls inside an ignored-range.

  There is a new command-line flag --ignore-ranges= to specify
  the address ranges.  Currently up to 4 non-overlapping ranges may
  be specified.

  This kind of thing is useful if you want to do some strange thing
  like map a high-performance network card into memory and can't be
  bothered to tell memcheck about it through the official channels
  (intercepting syscalls/ioctls and telling aspacem about them.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6256
2006-10-17 01:28:10 +00:00
Julian Seward
3c6f899f71 Merge r6111:
AIX5 changes.  Perhaps this isn't quite the right place to add a
sqrt() replacement.  Hmm.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6255
2006-10-17 01:27:13 +00:00
Julian Seward
a48daec904 Merge r6109:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6254
2006-10-17 01:26:12 +00:00
Julian Seward
9284a14f28 Merge r6108:
Supply our own random number generator; else this test produces different
results on different platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6253
2006-10-17 01:25:13 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
03b9d0d3c4 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6235
2006-10-15 12:47:37 +00:00
Julian Seward
ae8215b3ac Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that.  Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface.  I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly.  This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86.  Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
2006-10-14 19:26:10 +00:00
Julian Seward
4b572a567e Create a new module, m_vkiscnums, and move all the system call numbers
into that.  Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224
2006-10-14 15:51:32 +00:00
Julian Seward
afc64cc112 Expand the first para of the custom-allocator section so it says what
this section actually describes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6199
2006-10-06 11:47:01 +00:00
Julian Seward
d45c6296eb Regression tests for Graydon Hoare's enhanced mempool stuff, from
Graydon himself.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6198
2006-10-06 11:45:00 +00:00
Julian Seward
a81be9f483 A memory pool update from Graydon Hoare.
Here's an update to the mempool move / change client requests and sanity 
checking. The following changes are present:

   - Added one more (hopefully last) client request, a predicate to
     test whether a mempool anchor address is currently tracked.
     It turns out mozilla's arena-using code is sufficiently inconsistent
     in its assumptions that it's very difficult to phrase the valgrind
     client-request annotations without this request. Namely: sometime
     arena-init and arena-free operations are assumed to be idempotent.

   - Fixed a very rapid tool-memory leak in the mempool sanity check
     routine. The previous version of the patch I posted would use all
     memory even on my Very Beefy Test Machine within ~15 minutes of
     browsing with firefox.

   - Added a little logging code to print the counts of pools and chunks
     active every ~10000 sanity checks, when running with -v.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6197
2006-10-05 17:59:23 +00:00
Julian Seward
68a0c28d67 Excellent documentation from Graydon Hoare on his mempool
client-request work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6196
2006-10-05 17:56:14 +00:00
Nicholas Nethercote
cd94343ee3 Add a comment about marking static memory as defined.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6083
2006-09-21 15:59:30 +00:00
Julian Seward
1213e9bcf7 Merge (from 3_2_BRANCH) r6048 (SuSE 10.1 (ppc32) minor fixes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6051
2006-09-11 20:33:55 +00:00
Julian Seward
5c4ca35185 Add a regtest for #133694 (munmapping of segments below
aspacem_minAddr).  (Tom Hughes)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6050
2006-09-11 20:14:21 +00:00
Julian Seward
ce55e7ecf3 A small fix to the "mempool trim" client request; the previous version
didn't cope with zero-sized chunks properly.  (from Graydon Hoare).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6006
2006-08-16 17:51:28 +00:00
Julian Seward
7086ee4a21 Regression test for #132146.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6000
2006-08-16 00:28:25 +00:00
Julian Seward
45f930039b Update expected output following Graydon H's leak checker fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5996
2006-08-04 12:42:06 +00:00
Julian Seward
1ef8ead90b Followup to r5991: when leak checking, treat zero-sized blocks as if
they had size one.  Otherwise they appear to cover no address space,
so no pointers to them are ever found, and so they are always
incorrectly marked as leaked.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5994
2006-07-29 09:00:25 +00:00
Julian Seward
7586467ab5 Add a mempool-trimming client request (Graydon Hoare).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5992
2006-07-28 00:06:37 +00:00
Julian Seward
013a3c24f3 Leak checking fixes from Graydon Hoare:
- fix off by one error in binary searches
- extend leak checking functionality to memory pools


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5991
2006-07-27 23:48:53 +00:00
Julian Seward
25499151ed When doing leak checks, don't poke around in device segments as this
may hang the entire machine.  (Tom Hughes).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5990
2006-07-27 23:12:17 +00:00
Julian Seward
ddbe46ba1e Fix copy-n-paste error to do with ppc64-linux stack redzone handling
(from r5791).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5973
2006-06-16 21:39:08 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Julian Seward
7091136f7f Sigh .. now fix for 32-bit targets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5936
2006-05-26 12:00:26 +00:00
Julian Seward
80ebf075c9 Fix gcc pedantry on 64-bit platforms
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5934
2006-05-26 11:29:17 +00:00
Julian Seward
3163ae8235 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5928
2006-05-25 18:33:56 +00:00
Julian Seward
84f71ab2f3 Assertion is too restrictive; it's possible to validly get an
addressibility error when MC_(clo_undef_value_errors) is True.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5922
2006-05-22 13:59:42 +00:00
Julian Seward
e7c688d4aa A 1 page stack isn't big enough for this test on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5910
2006-05-21 12:40:30 +00:00
Julian Seward
dee9992c32 Update expected output following vex r1619.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5909
2006-05-21 12:18:16 +00:00
Julian Seward
9c6a78154e Yet more messing with masking approximate results.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5902
2006-05-13 02:20:11 +00:00
Julian Seward
436b6ebcdd Apparently Intel's rcpps etc approximations are more approximate than
AMD's.  Kludge everything accordingly.  Sigh.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5900
2006-05-13 01:32:41 +00:00
Julian Seward
40f0baa4ff Update expected results following change in r5898.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5899
2006-05-13 00:34:52 +00:00
Julian Seward
11d8cd39c7 Add masking for results of rcpps/rcpss/rsqrtps/rsqrtps so as to give
consistent results on all platforms.  Expected outputs not updated
yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5898
2006-05-13 00:23:56 +00:00
Julian Seward
4950ba1806 Comprehensive tests for bt{s,r,c,}{w,l,q} on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5892
2006-05-12 19:50:44 +00:00
Julian Seward
35b78ba27f Test x86 {push,pop}{w,l}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5891
2006-05-12 14:24:18 +00:00
Julian Seward
23ad3fce2f Vectorise copy_address_range_perms for common cases. This gives about
40% speedup on artificial programs which just do realloc() and nothing
else, and about a 3-4% speedup on starting kpresenter-1.5.0 and
loading a 16-slide presentation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5880
2006-05-03 22:13:57 +00:00
Julian Seward
3f8027095c Add another test of permissions range copying (copy_address_range_perms).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5875
2006-05-03 00:43:20 +00:00
Julian Seward
914a317eb9 Get rid of executable permissions on C source file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5874
2006-05-02 13:02:01 +00:00
Nicholas Nethercote
1a7237d77b Remove tool-specific code (which says which tools allow XML) from the core
by introducing a new "need":  VG_(needs_xml_output)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5854
2006-04-16 10:25:43 +00:00
Julian Seward
c8f60db273 On x86, don't use x87 registers for 8-byte FP loads/stores; instead
use an mmx register (which is the same thing in disguise) since mmx
loads/stores are guaranteed to be the identity.  This should fix
failures of this test on x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5843
2006-04-12 11:42:54 +00:00
Nicholas Nethercote
4cae62d828 Commit a patch from Olly Betts which avoids a possible problem with
COUNT_LEAKS on 64-bit machines.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5832
2006-04-06 14:21:42 +00:00
Nicholas Nethercote
148c02054a Use better variable names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5830
2006-04-06 13:33:48 +00:00
Julian Seward
4f684ed6b9 Test program which uses templates to generate very long stabs (debug
info) strings.  This crashes 3.1.1 when the test is compiled with
-gstabs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5826
2006-04-04 17:35:48 +00:00
Julian Seward
ee0cc0f1ad Un-break make dist.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5824
2006-04-04 15:43:30 +00:00
Julian Seward
995dfd20ab Add 64-bit test output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5813
2006-04-02 02:59:35 +00:00
Julian Seward
a7a953128b Don't print an address on stdout as it doesn't get automagically
changed into 0x.........


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5812
2006-04-02 02:27:52 +00:00
Julian Seward
5d87e4e98b Another shadow memory test. This one does a huge number of loads and
stores of char/short/int/int64/double at random offsets and hence
alignments in an array.  It does it in a way in which the computation
just computes the expected V bits, and hence can check whether these
seem correct.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5811
2006-04-02 01:53:01 +00:00
Julian Seward
50dc4b58ee In check_all, allow two different acceptable byte values, so as to
cover the behaviour of all possible variants of float loads/stores.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5809
2006-04-02 00:58:01 +00:00