Commit Graph

5199 Commits

Author SHA1 Message Date
Julian Seward
0e70d01bdd Changes to m_hashtable:
Allow hashtables to dynamically resize (patch from Christoph
Bartoschek).  Results in the following interface changes:

* HT_construct: no need to supply an initial table size.
  Instead, supply a text string used to "name" the table, so
  that debugging messages ("resizing the table") can say which
  one they are resizing.

* Remove VG_(HT_get_node).  This exposes the chain structure to 
  callers (via the next_ptr parameter), which is a problem since
  callers could get some info about the chain structure which then
  changes when the table is resized.  Fortunately is not used.

* Remove VG_(HT_first_match) and VG_(HT_apply_to_all_nodes) as
  they are unused.

* Make the iteration mechanism more paranoid, so any adding or
  deleting of nodes part way through an iteration causes VG_(HT_next)
  to assert.

* Fix the comment on VG_(HT_to_array) so it no longer speaks 
  specifically about MC's leak detector.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6778
2007-08-25 07:19:08 +00:00
Julian Seward
57793cffdc gcc-4.3 compile fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6777
2007-08-24 20:37:09 +00:00
Julian Seward
9546ed460c Dynamically expand the ExeContext hash table, rather than using a
fixed size.  Partial commit of a patch from Christoph Bartoschek.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6776
2007-08-23 10:24:30 +00:00
Julian Seward
3773a4d6c2 The drastic increase in the number of per-arena freelists in r6771
exposes a performance problem with doing m_mallocfree.c sanity checks
(at --sanity-level=3, at least), caused by slowness in
listNo_to_pszB_min.  This commit fixes the problem by caching the
results of queries to listNo_to_pszB_min.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6775
2007-08-23 10:22:44 +00:00
Julian Seward
7315effc53 Make the ExeContext hash table a whole lot bigger.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6774
2007-08-22 23:51:33 +00:00
Dirk Mueller
652a7b0f5a update suppressions
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6772
2007-08-21 20:28:34 +00:00
Julian Seward
f65fd40ae0 Previously, each Arena has a linked list of Superblocks, which can
make VG_(arena_free) expensive if many superblocks have to be checked
before the right one is found.  This change gives the arena a
dynamically expanding sorted array of superblocks, so that finding the
superblock containing an about-to-be-freed block (findSb) is now
O(log2 n) rather than linear in the number of superblocks in the
arena.  Patch from Christoph Bartoschek.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6771
2007-08-21 10:55:26 +00:00
Julian Seward
0f312746f1 Some improvements for malloc/free intensive programs, inspired by
performance studies by Christoph Bartoschek:

* Increase the number of freelists per arena from 18 to 112, so as
  to (drastically) cut down on the amount of freelist searching that
  happens.

* Increase the size of the client and tool arenas, so as to reduce
  the cost of finding arenas during freeing.  This is a kludge; a
  better solution would be to use binary search on superblocks, as
  Christoph's patches do.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6770
2007-08-20 22:57:56 +00:00
Dirk Mueller
e916eeef5b suppression update for 10.3/glibc 2.6
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6768
2007-07-23 14:31:55 +00:00
Dirk Mueller
c01cc403f1 add glibc-2.6.supp to the distribution list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6767
2007-07-14 22:43:25 +00:00
Julian Seward
20a7edbd06 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6766
2007-07-11 23:10:05 +00:00
Julian Seward
3d25b440fe All platforms: make it clearer that missing syscalls constitute
reportable bugs.

AIX only: print name of missing syscall as well as number -- important
because there is no fixed name/number binding.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6765
2007-07-10 00:18:46 +00:00
Julian Seward
32a6fb4fec Get rid of VG_(getcwd) and replace it with a pair of functions,
VG_(record_startup_wd) which records the working directory at startup,
and VG_(get_startup_wd) which later tells you what value was recorded.
This works because all uses of VG_(getcwd) serve only to record the
directory at process start anyway.  The motivation is that AIX does
not support sys_getcwd directly, so it's easier for the launcher to
ship in the required value using an environment variable.  On Linux
sys_getcwd is used as before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6764
2007-07-09 23:13:07 +00:00
Dirk Mueller
e8e2a97ae1 update bugstatus
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6763
2007-07-03 10:38:03 +00:00
Julian Seward
4ab7e54154 VG_(needs_shadow_memory) does not exist; remove prototype for it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6761
2007-06-23 16:03:05 +00:00
Julian Seward
466b2ab809 Apparently 'index' shadows a global decl on some targets; therefore rename.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6759
2007-06-05 20:48:54 +00:00
Julian Seward
397511f653 Handle a whole bunch of obscure types.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6758
2007-06-05 19:51:35 +00:00
Julian Seward
65cb8fdd6a Test a whole bunch of obscure types.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6757
2007-06-05 19:51:02 +00:00
Julian Seward
274558de6d Merge (from branch) r6755 (Handle MPI_DOUBLE_PRECISION).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6756
2007-06-04 21:14:36 +00:00
Dirk Mueller
16b394f042 update bugstatus
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6754
2007-06-04 09:47:36 +00:00
Dirk Mueller
21ed87da2b update suppression file. Patch by Diego Petteno from Gentoo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6753
2007-06-04 09:43:39 +00:00
Josef Weidendorfer
8b63e43cf3 Update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6752
2007-06-02 21:51:12 +00:00
Josef Weidendorfer
2cf8b61901 callgrind: fix build with srcdir != builddir
Thanks to Diego 'Flameeyes' Pettenò for noting and providing the patch



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6751
2007-06-02 21:36:26 +00:00
Nicholas Nethercote
250dd17646 Add a comment with a definitive account of when Memcheck does (and does not,
but should do) undefined value checks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6750
2007-05-24 23:14:41 +00:00
Josef Weidendorfer
af3e00ab6f callgrind_annotate: Fix a warning
Port a fix for ""Possible precedence problem" from
cachegrind/cg_annotate, see r1713.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6749
2007-05-24 20:47:10 +00:00
Josef Weidendorfer
a09042a627 Callgrind manual: Fix typo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6748
2007-05-24 20:42:41 +00:00
Josef Weidendorfer
833c095f5c Callgrind manual: rewriting start of section about avoding cycles
This hopefully makes the whole issue with cycles easier to understand.
And no, this does not get rid of the description of cycles, carefully
crafted by Julian ;-)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6747
2007-05-24 19:24:23 +00:00
Josef Weidendorfer
6575e93f46 Callgrind format: Note about event names in the example
The added paragraph was triggered by a question on the mailing list.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6746
2007-05-24 18:04:42 +00:00
Julian Seward
b91b51b42b Merge (from 3.2 branch) r6743 (Edit the manual to bring it up to date
and make some of the wording a bit more professional sounding.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6745
2007-05-23 21:58:33 +00:00
Dirk Mueller
527df75cde glibc 2.6 support
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6744
2007-05-23 17:39:08 +00:00
Nicholas Nethercote
dea2377dd9 Clarify --trace-children a little.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6741
2007-05-15 03:59:23 +00:00
Robert Walsh
31d177f747 Update svn:ignore properties.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6739
2007-05-14 01:55:34 +00:00
Josef Weidendorfer
e4e5c8487a Update
Not really a bug, but the callgrind doc improvement is useful
on the 3.2 branch as well.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6735
2007-05-08 12:07:52 +00:00
Josef Weidendorfer
db1e230c31 Callgrind: improve documentation
* Looks a little bit more like the Cachegrind manual
  (at least in front)
* Removed the out-of-place general section about profiling
  and gprof. Perhaps something like this can be put at
  another place
* Notes about Callgrinds problems with call tracing on PPC
* Include usage of callgrind_annotate, and note its lack of
  cycle detection


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6734
2007-05-08 11:58:23 +00:00
Julian Seward
e16417ddf7 Add branch-misprediction profiling to Cachegrind. When the (new) flag
--branch-sim=yes is specified, Cachegrind simulates a simple indirect
branch predictor and a conditional branch predictor.  The latter
considers both the branch instruction's address and the behaviour of
the last few conditional branches.  Return stack prediction is not
modelled.

The new counted events are: conditional branches (Bc), mispredicted
conditional branches (Bcm), indirect branches (Bi) and mispredicted
indirect branches (Bim).  Postprocessing tools (cg_annotate, cg_merge)
handle the new events as you would expect.  Note that branch
simulation is not enabled by default as it gives a 20%-25% slowdown,
so you need to ask for it explicitly using --branch-sim=yes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6733
2007-05-08 09:20:25 +00:00
Julian Seward
f37ce26adb Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6730
2007-05-06 11:28:18 +00:00
Julian Seward
696fb88c46 Fix stack overflow which lead to totally mysterious .bss corruption
and hence to segfaulting in vex on ppc32/64-linux in obscure
circumstances.  VKI_MAX_PAGE_SIZE is 64k in recent Valgrinds.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6728
2007-05-05 11:40:35 +00:00
Julian Seward
7a6b2f9713 Older assemblers on amd64-linux don't do lahf/sahf; work around that.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6727
2007-05-03 21:25:37 +00:00
Julian Seward
504e19fb9d Fix regression in new/new[]/delete/delete[] intercepts for gcc-2.96.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6726
2007-05-02 16:24:30 +00:00
Julian Seward
d18e63eb42 Avoid compilation warnings with gcc-4.2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6722
2007-05-01 14:18:48 +00:00
Julian Seward
ecc35db60b If gcc supports -fno-stack-protector, use it. This should fix
compilation failures on distros where -fstack-protector is enabled by
default.  See #144112.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6721
2007-05-01 13:44:08 +00:00
Julian Seward
fed8fda1a5 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6720
2007-05-01 09:19:29 +00:00
Julian Seward
984e45e88f Add disclaimers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6709
2007-04-29 09:06:40 +00:00
Nicholas Nethercote
bb2eae844c augment previous commit
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6708
2007-04-20 02:15:28 +00:00
Nicholas Nethercote
2005fbaa40 It's generally a good idea to set call-by-reference arguments, especially
when the function comments says that they always are set.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6707
2007-04-19 23:35:42 +00:00
Dirk Mueller
40de8b88ed wrap env related functions to be able to track undefined
values better


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6706
2007-04-19 09:47:32 +00:00
Nicholas Nethercote
802b418634 Fix some copyright notices:
- extend some to 2007
- use njn@valgrind.org instead of njn25@cam.ac.uk
- use "tool" instead of "skin"


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6703
2007-04-15 22:15:57 +00:00
Julian Seward
7a897aa86d When doing 'demo' translations for --profile-flags=, make at least
some attempt to discard existing translations first.  Otherwise
Cachegrind (rightly) asserts on the basis that it is seeing duplicate
translation requests for the same entry point.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6698
2007-04-09 22:24:57 +00:00
Julian Seward
0c2bd9e01d Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6697
2007-04-07 14:46:45 +00:00
Julian Seward
5c59b39513 Fix out of date comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6696
2007-04-07 14:46:13 +00:00