3533 Commits

Author SHA1 Message Date
Nicholas Nethercote
d5738fd68d lots of little wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4432
2005-08-16 03:29:50 +00:00
Nicholas Nethercote
09445ab9b2 Make the nightly script say early on if the results have changed in
the last 24 hours.  This saves you from having to scroll down to
determine this when the number of failures is large (eg on PPC).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4431
2005-08-16 03:28:47 +00:00
Nicholas Nethercote
cb5f104bea update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4430
2005-08-16 02:31:08 +00:00
Nicholas Nethercote
50c158d0ef Fixes for #110657, based on Jakub Jelinek's patch:
- filter out L3 warning messages so they don't break Cachegrind's regtests
- handle lack of mq support gracefully in mq.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4429
2005-08-16 02:30:24 +00:00
Nicholas Nethercote
5bcb97f53c update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4428
2005-08-16 02:21:13 +00:00
Nicholas Nethercote
233a1fc175 How do you like this: there was no proper description in the manual
of leak error messages, nor any examples.  So I added one, and moved
what info there was about leaks out of its separate section, and into
the section describing all the kinds of error message.

BACKPORT TO 3_0_X



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4427
2005-08-16 02:20:17 +00:00
Nicholas Nethercote
38802906fd update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4426
2005-08-16 01:41:43 +00:00
Nicholas Nethercote
a539b88830 Give more info about seginfo dropping.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4425
2005-08-16 01:39:34 +00:00
Nicholas Nethercote
30e76e439a Use the right Vex command line.
BACKPORT TO 3_0_X?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4424
2005-08-15 13:29:43 +00:00
Nicholas Nethercote
cd2e9fbe4b blah
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4423
2005-08-15 04:44:26 +00:00
Nicholas Nethercote
a754ffbee4 fix line numbers
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4422
2005-08-15 04:40:57 +00:00
Nicholas Nethercote
50898b4c82 foo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4421
2005-08-15 04:37:34 +00:00
Nicholas Nethercote
5492bb9c86 some more info in the QSG
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4420
2005-08-15 04:34:20 +00:00
Nicholas Nethercote
b329702e3b A few minor manual updates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4419
2005-08-15 04:26:13 +00:00
Nicholas Nethercote
7ec1597605 Bleh, forgot this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4418
2005-08-15 02:06:39 +00:00
Nicholas Nethercote
c06b8426df wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4417
2005-08-15 02:05:21 +00:00
Nicholas Nethercote
e009050880 Whoops... I guess the regtests don't exercise that code...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4416
2005-08-15 01:54:05 +00:00
Nicholas Nethercote
fcdc60441e Something I realised recently: in C, iterators are much better than
higher-order functions for traversing data structures.  The higher-order
approach is too clumsy due to the lack of polymorphism and closures;  you
have to use void* too much and it is more verbose than it should be.

Hence, I replaced all the uses of HT_first_match() and
HT_apply_to_all_nodes() with equivalent uses of the hashtable iterator.
Also replaced higher-order traversal functions for Memcheck's freed-list
and the thread stacks with iterators.  That last change changes the
core/tool interface, so I've increased the version number.







git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4415
2005-08-15 01:52:02 +00:00
Nicholas Nethercote
20502a617e wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4414
2005-08-14 23:52:32 +00:00
Nicholas Nethercote
3b0f062e58 Trim some fat; removing this assertion makes Remove() about 5% faster.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4413
2005-08-14 23:00:57 +00:00
Nicholas Nethercote
756f513b51 Add a thorough unit test for m_oset. Note that this is Memcheck
testing code that's part of Valgrind, which is a good thing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4412
2005-08-14 22:43:53 +00:00
Nicholas Nethercote
9741f60c1f Forgot this file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4411
2005-08-14 22:14:55 +00:00
Nicholas Nethercote
89163ecf45 Added new module, m_oset, which provides a generic data structure, OSet,
which is a sorted set with no duplicates.  This is derived from
m_skiplist, which it will hopefully replace.  The interface has the
following improvements:

- Avoided all mention of how the data structure is implemented in the
  interface, so it could be replaced with another data structure without
  changing external code.
- Two kinds of comparison:  fast -- use the first word of each element
  for comparison;  slow -- use a custom function.  The custom function
  compares a key with an element, so non-overlapping interval lists can
  be supported easily.  m_skiplist only supports the slow variant, and it
  makes things almost 2x faster.
- Users pass in malloc() and free() functions, so m_oset.c it doesn't
  rely on any particular allocator.
- It has a Destroy() function which will deallocate all the nodes.
- It allows variable-sized nodes.
- No static constructor;  I needed the flexibility of being able to
  execute arbitrary code in the constructor.  This also means no type
  internals are exposed.

No part of Valgrind actually uses OSet yet, although I've privately
converted several data structures, and so I'm confident that the
interface is basically sound.  Some functions may be added later.
  
The implementation uses AVL trees, and has the following
characteristics:

- Lookup is much faster than for skiplists -- around 3x.  This is
  because the inner lookup loop is much tighter.
- Insertion and removal is similar speed to skiplists, maybe a little
  slower, but there's still some fat to be trimmed.
- The code is a bit longer and more complex than the skiplist code.

This was intended to replace the need for the VgHashTable type.  But my
experiments have shown that VgHashTable is really fast, faster than both
AVL trees and skiplists in all but extreme cases (eg. if the hashtable
becomes way too full):  insertion takes constant time, because you always
prepend to chains;  lookup depends on chain length, but the inner loop
is so tight that you need about 20 elements per chain before it gets
worse than the AVL tree;  removal is similar to lookup.  And because
insertion uses prepending, any locality in accesses will help things.  If
VgHashTable had its interface cleaned up to look like OSet's, and was made
to auto-resize when it got too full, it might be a better OSet (although
it's not sorted).

So, it's currently unclear exactly how the AVL tree OSet will be used.
The skiplist could be converted to the new interface (I have a 90%
complete version which I used in the comparison experiments).  If
VgHashTable was converted to the same interface (or as close as
possible) it would make direct comparison of important places (eg.
Memcheck's malloc_lists) simple.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4410
2005-08-14 22:13:00 +00:00
Nicholas Nethercote
7062ca6bc7 Remove more now-unnecessary casts, thanks to the recent VgHashTable changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4409
2005-08-14 18:32:16 +00:00
Nicholas Nethercote
8028d5a979 Remove ancient backwards compatibility code which is no longer needed, since
backwards compatibility was broken in various other ways by 3.0.0.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4408
2005-08-14 18:24:44 +00:00
Nicholas Nethercote
4f064ec81b Added an iterator to VgHashTable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4407
2005-08-14 17:42:35 +00:00
Nicholas Nethercote
c1719a4c98 Clarify comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4406
2005-08-14 17:36:07 +00:00
Nicholas Nethercote
d16a4d9638 Update for Vex.
BACKPORT TO 3_0_X?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4405
2005-08-14 17:25:28 +00:00
Nicholas Nethercote
5d07a9ad26 Changed many, but not all, of the VgHashNode* parameters and return
types in m_hashtable.c to void*.  This requires no changes to code
already using VgHashTables, but it allows some previously-required casts
to be removed.  I also changed Memcheck and Massif by removing some of
these now-unnecessary casts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4404
2005-08-14 06:24:20 +00:00
Nicholas Nethercote
81903d273f Compactify unload_symbols().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4403
2005-08-14 04:29:12 +00:00
Nicholas Nethercote
af90765263 Partially evaluate m_stacks.c to simplify and shrink it a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4402
2005-08-14 04:12:40 +00:00
Julian Seward
7c26ef016c Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4401
2005-08-14 00:59:45 +00:00
Julian Seward
c38761cc3f Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4400
2005-08-14 00:31:26 +00:00
Julian Seward
96e1fc25ec Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4399
2005-08-13 23:38:26 +00:00
Dirk Mueller
19183e0892 update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4398
2005-08-13 20:31:18 +00:00
Dirk Mueller
b7b7ba2f66 update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4396
2005-08-13 19:47:57 +00:00
Dirk Mueller
ba73cd172e update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4394
2005-08-13 19:46:18 +00:00
Julian Seward
173befe53d Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4392
2005-08-13 00:33:08 +00:00
Nicholas Nethercote
ec77b92b98 Cachegrind should not assert when it encounters a client request.
BACKPORT TO 3_0_X



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4391
2005-08-12 23:47:51 +00:00
Julian Seward
76cfc4175d Add regtest for x86 cmpxchg8b.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4390
2005-08-12 23:40:55 +00:00
Julian Seward
7bfa28e29c Oops, recover from race condition in updating this file :-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4389
2005-08-12 19:41:06 +00:00
Julian Seward
dd664d30ed Track recently-arrived bugs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4388
2005-08-12 19:27:21 +00:00
Tom Hughes
3567cb76b9 Update some bug statuses.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4387
2005-08-12 19:26:00 +00:00
Tom Hughes
9631a40eb7 Make sure we have enough space for the name if the path is empty. Patch
from Jakub Jelinek to fix bug #110656.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4386
2005-08-12 19:21:29 +00:00
Nicholas Nethercote
b0887d95d2 Give informative failure messages if you try to use Helgrind or
Addrcheck.  As a results, we are now building Addrcheck again, which
required commenting out lots of code.

BACKPORT TO 3_0_X, AND POSSIBLY TO 2_4_X (the Helgrind part, with
    modifications)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4384
2005-08-12 15:23:57 +00:00
Nicholas Nethercote
c37f2349c6 fix an output for xml1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4383
2005-08-11 02:48:11 +00:00
Nicholas Nethercote
220b4e8224 Tighten up update_extra() for Memcheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4382
2005-08-11 02:46:54 +00:00
Nicholas Nethercote
024036d095 Massif cleanups.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4381
2005-08-11 02:17:07 +00:00
Nicholas Nethercote
d892f660ec Streamline handling of realloc() in Memcheck and Massif by using
the newly added VgHashTable functions.  Also some other minor changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4380
2005-08-11 02:09:25 +00:00
Nicholas Nethercote
8515143ce8 Get rid of some stupidity:
- Added some useful hash table functions (vanilla lookup() and remove()).
  [Actually, I accidentally added them with my previous commit]
  
  Replaced various simple uses of VG_(HT_get_node) with these new functions. 

- Passing record_freemismatch_error() the MAC_Chunk of the freed heap block.
  So now we don't need to call describe_addr() to re-find that block, which
  means that we can remove the MAC_Chunk from the malloc_list earlier, rather
  than having to do a lookup and then later remove it with the stupid removal
  handle returned by VG_(HT_get_node)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4379
2005-08-11 00:47:10 +00:00