4199 Commits

Author SHA1 Message Date
Julian Seward
f57f6f1921 Increase buffer size, so that long debugger command lines don't crash
V.  Also add buffer overrun checks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5368
2005-12-18 03:22:50 +00:00
Julian Seward
d2de349f96 Nasty hack to stop the leak checker dying on custom-allocator example
from Ashley Pittman.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5367
2005-12-18 02:48:40 +00:00
Julian Seward
89add09cf8 When using a custom allocator that allocates with no intervening
blocks, the <= relation is the correct one.  In effect asserting <
constitutes an off-by-one error.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5366
2005-12-18 02:37:50 +00:00
Julian Seward
be18f74393 findSb: gradually rearrange the superblock list to bring frequently
accessed blocks closer to the front.  This speeds up malloc/free
intensive programs because evidently those searches cause a lot of
cache misses (so cachegrind tells us).  For perf/heap.c on P4
Northwood, this halves the run-time (!) from 85.8 to 42.9 seconds.
For "real" code (start/exit ktuberling) there is a small but
worthwhile performance gain, of about 2 seconds out of 95.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5365
2005-12-17 20:37:36 +00:00
Julian Seward
5681b27e9a Update known-bugs summary.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5364
2005-12-17 13:53:46 +00:00
Nicholas Nethercote
d7bd1688ca Add a malloc/free stress test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5362
2005-12-17 00:22:39 +00:00
Nicholas Nethercote
ad827637fd Add info about overhead in heap blocks and OSet nodes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5361
2005-12-16 17:06:37 +00:00
Julian Seward
c2a49bec4b Hold the event count in r29 rather than the count register, since the
former doesn't need to be spilled and reloaded for every bb run.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5358
2005-12-16 01:08:22 +00:00
Julian Seward
cf2cdb0269 Add missing cases in debug printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5357
2005-12-16 01:07:11 +00:00
Julian Seward
02a7e5b5d0 Rewrite ppc32 dispatch loop to avoid profiling overhead, as per
today's x86 and amd64 rewrites.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5352
2005-12-15 21:40:34 +00:00
Nicholas Nethercote
a75ddd7aaa add note about recent performance improvement
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5349
2005-12-15 19:41:14 +00:00
Nicholas Nethercote
d38a28567e Improvments to vg_perf:
- show percentage speedup over the first Valgrind when comparing multiple
  Valgrind
- don't accept --reps < 0
- avoid div-by-zero if the runtime is measured as zero



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5348
2005-12-15 17:22:37 +00:00
Julian Seward
da4b5dca48 Make this work on platforms where r != x.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5347
2005-12-15 16:11:25 +00:00
Julian Seward
bcc3feca7e Rewrite amd64 dispatch loop to add performance enhancements as per x86
reorganisation of r5345.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5346
2005-12-15 15:46:43 +00:00
Julian Seward
87e9f78e0c - Track vex r1494 (x86/amd64 change of conventions for getting
to translations and back to dispatcher, and also different arg
  passing conventions to LibVEX_Translate).

- Rewrite x86 dispatcher to not increment the profiling counters
  unless requested by the user.  This dramatically reduces the
  D1 miss rate and gives considerable performance improvement
  on x86.  Also, restructure and add comments to dispatch-x86-linux.S
  to make it much easier to follow (imo).

amd64/ppc32/ppc64 fixes to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5345
2005-12-15 14:07:07 +00:00
Cerion Armour-Brown
857aaf871f Added fp regtest
- needed some hackery to get around VEX's loss of accuracy.

------------------------------
Added test for fsqrt (fp square root)

Enabled stfs(u)(x) (fp single-precision stores)
 - VEX implementation not great: ends up rounding twice, losing
accuracy, but is good enough for this test's small fp argument array.

Changed fp arg setup
 - no denormals (for VEX inaccuracy)

All fp tests
 - don't print CR, XER flags, as VEX doesn't set them.

3 arg fp arith tests (fp 'multiply and add' etc)
 - no 'special' fp vals (for VEX inaccuracy)
 - zap lo byte (for VEX inaccuracy)

fctiw, fctiwz (fp convert to int)
 - zap high 32bits of result (is undefined)




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5344
2005-12-14 22:24:45 +00:00
Cerion Armour-Brown
8cbc827d9f Changed jm_insns.c usage to use one of flags 'i|f|a' to run int|fp|av insns respectively.
Removed integer test insns for jm-vmx.vgtest - already tested in jm-int.vgtest



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5343
2005-12-14 17:59:35 +00:00
Cerion Armour-Brown
0641a24c3d svn:ignores
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5342
2005-12-14 13:30:44 +00:00
Nicholas Nethercote
49f8ec5fad Added a stress test which measures the cost of translation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5341
2005-12-14 05:33:35 +00:00
Nicholas Nethercote
53297cb180 Ensure that f() doesn't get inlined.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5340
2005-12-14 05:33:17 +00:00
Nicholas Nethercote
b8922da7a0 Add --vg option to vg_perf, which lets you specify one or more Valgrinds
to time, and presents their timings in an easy-to-compare way.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5339
2005-12-14 02:58:23 +00:00
Nicholas Nethercote
cb30dfe2ba whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5338
2005-12-13 22:00:17 +00:00
Cerion Armour-Brown
4d00629c04 Added some more svn:ignores.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5337
2005-12-13 21:58:29 +00:00
Nicholas Nethercote
9a24d17e62 Added a --reps option to control how many times each program is run.
Also added a better help message.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5336
2005-12-13 21:55:16 +00:00
Nicholas Nethercote
7de9c0e307 remove bogus whitespace
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5335
2005-12-13 21:53:39 +00:00
Nicholas Nethercote
12dde1f51d Die if a performance benchmark is missing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5334
2005-12-13 21:44:48 +00:00
Nicholas Nethercote
7eb82ccaa9 Use user time instead of wall-clock time.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5332
2005-12-13 20:23:38 +00:00
Nicholas Nethercote
0bea14f4f1 Improve vg_SP_update_pass() to catch more constant offset cases. Improves
performance by 1--3% on several programs on my machine.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5331
2005-12-13 20:05:00 +00:00
Nicholas Nethercote
d5c8f18d4a File recording info about each performance benchmark.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5330
2005-12-13 17:20:24 +00:00
Julian Seward
c8e82f70e6 Remove nanosleep and adjust iteration count and array size accordingly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5329
2005-12-13 17:13:39 +00:00
Nicholas Nethercote
b676c5925b Abort the performance timings if any of the programs fail,
and record info in perf.{cmd,stdout,stderr} to allow diagnosis.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5328
2005-12-13 16:54:58 +00:00
Nicholas Nethercote
87def42dc3 Make sarp return zero.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5327
2005-12-13 16:38:55 +00:00
Nicholas Nethercote
689e02aae2 Add two new programs to the performance suite.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5326
2005-12-13 04:06:29 +00:00
Nicholas Nethercote
a52e4734eb Make it clearer that internal errors are Valgrind's fault.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5325
2005-12-12 15:54:50 +00:00
Robert Walsh
dae59e3eec Update ignores.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5324
2005-12-10 23:46:11 +00:00
Nicholas Nethercote
49db1b68a8 First attempt at some performance tracking tools. Includes a script vg_perf
(use "make perf" to run) that executes test programs and times their
slowdowns under various tools.  It works a lot like the vg_regtest script.
It's a bit rough around the edges -- eg. you can't currently directly
compare two different versions of Valgrind, which would be useful -- but it
is a good start.

There are currently two test programs in perf/.  More will be added as time
goes on.  This stuff will be built on so that performance changes can be
tracked over time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5323
2005-12-10 23:11:28 +00:00
Nicholas Nethercote
6fd30a473c Remove dead line.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5322
2005-12-09 21:01:46 +00:00
Nicholas Nethercote
5fb8f6840d Add missing declaration.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5321
2005-12-09 19:30:02 +00:00
Nicholas Nethercote
ac3c9c7f27 Fix minor Cachegrind bug that was occasionally causing misattributions of
counts when a function name was used in more than one module.  This showed
up for "???" functions when profiling Valgrind itself.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5319
2005-12-08 23:18:50 +00:00
Nicholas Nethercote
bf86440453 Fail gracefully if 'make check' hasn't been run.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5317
2005-12-08 22:39:04 +00:00
Cerion Armour-Brown
0d3d66a4ac More V setup for ppc64
- client stack setup
 - init_thread1state: set TOC ptr



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5314
2005-12-08 03:24:37 +00:00
Julian Seward
7f34452f65 On ppc64-linux, the entry point address is a function descriptor, not
a function address.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5301
2005-12-06 21:47:38 +00:00
Cerion Armour-Brown
b714685c63 Take ppc64 startup further along the road
- fixed launcher.c to recognise ppc32/64-linux platforms properly
 - lots of assembly fixes to handle func descriptors, toc references, 64bit regs.
 - fixed var types in vki-ppc64-linux

Now gets as far as VG_(translate), but dies from a case of invalid orig_addr.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5299
2005-12-06 19:07:08 +00:00
Dirk Mueller
d8c7166c26 more syscalls for PPC32
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5289
2005-12-05 22:11:02 +00:00
Nicholas Nethercote
fe3cc3bdf9 Change hp2ps to output .ps files in the same dir that the .hp input files
are in.  This fixes bug #117686.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5287
2005-12-05 20:45:59 +00:00
Julian Seward
07f008c0f2 Defensive hacks to detect cases where V corrupts its own heap and/or
uses memory after freeing.  Check the redzones for all non-client
frees, and fill all non-client freed areas with garbage.  Unroll
VG_(memset) as a precautionary measure against performance lossage.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5283
2005-12-04 23:27:14 +00:00
Nicholas Nethercote
8a17ca2276 add comment from log message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5281
2005-12-04 19:33:03 +00:00
Nicholas Nethercote
a86ed4ea7d clarify
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5280
2005-12-04 19:26:00 +00:00
Julian Seward
06f53b15e8 Now that the man page is built from the XML documentation masters, it
has to have the same status as the HTML/PDF/PS docs, that is, not
built by default because it depends on the ultra-fragile XML
toolchain.  So make it use the same hacks, that is, build only at
'make dist' time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5279
2005-12-04 15:00:06 +00:00
Julian Seward
7e63a350bb Fix typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5278
2005-12-04 14:54:31 +00:00