Commit Graph

10 Commits

Author SHA1 Message Date
Florian Krohm
7d59048401 This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031
2012-10-07 21:59:42 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Julian Seward
9c6d0dc9c9 Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673
2011-03-28 16:26:42 +00:00
Julian Seward
28e09daf10 Only show per-offset access counts for allocations up to 1024 bytes,
to avoid producing ridiculous amounts of output.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11493
2011-01-10 14:56:59 +00:00
Julian Seward
45c678fc20 Speedups and fixes:
* (speedup) addMemEvent: generate inline code to check whether a
  memory access is within 16k of the stack pointer, and if so
  don't bother to call the helper

* (speedup) find_Block_containing: cache the most recently seen 2
  blocks, and check new references in them first.  This gives a
  worthwhile speedup.

* (fix) at the end of the run, merge stats from un-freed blocks
  back into APs.  This fixes misleading stats that cause un-freed
  blocks to appear to not have been accessed at all.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11480
2010-12-06 10:56:09 +00:00
Julian Seward
32dd8e857c Add documentation for exp-dhat.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11438
2010-10-13 14:06:00 +00:00
Julian Seward
9a9190f918 * cosmetic output changes
* add an assertion that the core block lookup routine works sanely


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11436
2010-10-13 14:04:25 +00:00
Julian Seward
ecf76d8b09 Minimal fixes needed to make this tool actually usable:
* change the per-block-byte freq count type from 8- to 16-bit
  so as to reduce the misleadingness of eventual numbers for
  frequently accessed blocks

* disable debug printing

* add command line parameters to control the number of APs shown
  in the final output, and to control the sorting order

* show average block size for each AP

* avoid possible problems when retiring a block and merging its
  per-byte access counts into the AP's counts

* add a trailer message giving some important hints to the user



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11434
2010-10-12 18:08:33 +00:00
Julian Seward
230002ce29 Add DHAT as an experimental tool. DHAT (a Dynamic Heap Analysis Tool)
is a heap profiler that is complementary to Massif.  DHAT tracks heap
allocations, and connects which memory accesses are to which blocks.
It can find the following information:

* total allocation and max liveness

* average block lifetime (# instructions between allocation and
  freeing)

* average number of reads and writes to each byte in the block
  ("access ratios")

* average of longest interval of non-access to a block, also 
  measured in instructions

* which fields of blocks are used a lot, and which aren't
  (hot-field profiling)

Using these stats it is possible to identify allocation points with
the following characteristics:

* potential process-lifetime leaks (blocks allocated by the point just
  accumulate, and are freed only at the end of the run)

* excessive turnover: points which chew through a lot of heap, even if
  it is not held onto for very long

* excessively transient: points which allocate very short lived blocks

* useless or underused allocations: blocks which are allocated but not
  completely filled in, or are filled in but not subsequently read.

* blocks which see extended periods of inactivity.  Could these
  perhaps be allocated later or freed sooner?

* blocks with inefficient layout (hot fields spread out over
  multiple cache lines), or with alignment holes



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11431
2010-10-12 10:09:15 +00:00