313 Commits

Author SHA1 Message Date
Donna Robinson
9888e86b06 Tidying up stuff re generating manpage from *.xml docs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5277
2005-12-03 23:02:33 +00:00
Julian Seward
f75620d58a Add directories missed in r5250 (ppc64 first checkin).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5251
2005-11-29 13:53:48 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Donna Robinson
81d6ed4433 Minor doc tweaks, mostly white space
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5201
2005-11-18 22:09:58 +00:00
Nicholas Nethercote
f21af77397 document
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5175
2005-11-17 19:32:59 +00:00
Nicholas Nethercote
bc6e62240e Change the cannot-detect-cache-config message on PPC32 so we can filter
for it more precisely and thus tell if the auto-detection ever fails on
x86/AMD64.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5173
2005-11-17 19:28:18 +00:00
Julian Seward
847c90dbfd Filter out I-have-no-idea-what-your-caches-are message, so these tests
don't fail on ppc32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5159
2005-11-17 10:56:08 +00:00
Julian Seward
d07dbe4a52 Complete documentation trawl for 3.1.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5137
2005-11-15 20:56:23 +00:00
Nicholas Nethercote
3ef437fe82 Inline cachesim_*_doref(). This gains about 5--10% in speed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5117
2005-11-13 17:57:32 +00:00
Nicholas Nethercote
a47e49800f Remove commented-out x86/AMD64 stuff from PPC32 file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5103
2005-11-12 21:57:09 +00:00
Tom Hughes
0d655cf263 Add -m32 for assembly code when possible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5089
2005-11-11 14:57:12 +00:00
Tom Hughes
8cc5ae14db Allow 32 bit x86 tests to run on amd64 machines.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5087
2005-11-11 14:33:43 +00:00
Nicholas Nethercote
3035e5abee Cachegrind was aborting if it hit a client request. Now it doesn't.
This fixes #116057, I think.  I added a regtest so it won't regress again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5072
2005-11-10 15:20:37 +00:00
Tom Hughes
b5c033e906 Dual architecture support - this commit is a major rework of the build
system that allows multiple copies of valgrind to be built so that we
can build both x86 and amd64 versions of the tools on amd64 machines.

The launcher is then modified to look at the program being run and
decide which tool to use to run it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5027
2005-11-07 15:24:38 +00:00
Julian Seward
d5afec1f4b Make ULong_width(0) return 1 instead of 1431655765. This stops
cachegrind segfaulting if it can't open its output file.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4973
2005-11-01 02:20:19 +00:00
Julian Seward
ebb032b983 Don't assume the first statement is an IRMark, since it could instead
be part of a self-check.  Instead, copy verbatim any IR preamble
preceding the first IMark.  This stops cachegrind asserting on
self-checking translations.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4967
2005-10-23 12:06:55 +00:00
Julian Seward
1a90cce793 Oops, un-break cachegrind regtesting following r4951.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4953
2005-10-20 00:30:30 +00:00
Julian Seward
9f24dcde2a Clarify the P4 warning message a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4951
2005-10-19 23:49:45 +00:00
Julian Seward
fb8743cd20 rm unused var
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4950
2005-10-19 23:49:20 +00:00
Julian Seward
1813e8fdcd Change the core-tool interface so that tools are fully aware of both
the guest extents for the presented translation and also its original
un-redirected guest address.  These changes are needed in particular
to make cachegrind's code cache management work properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4943
2005-10-18 12:04:18 +00:00
Nicholas Nethercote
953321d26a A small Cachegrind cleanup: previously it was copying some things (eg.
instr_size and instr_addr) into Ir events, then later copying those into
instrInfo nodes.  Now it just allocates the instrInfo nodes earlier and
copies them in directly.  This is a bit more concise and easier to
understand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4937
2005-10-16 00:17:37 +00:00
Nicholas Nethercote
4d3a1be8d1 Cachegrind cleanups:
- Remove some unnecessary assertions.
- Add in some new ones.
- Make things more concise and readable by factoring out things like
  "cgs->events[i+1]" into things like "ev2" in flushEvents().



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4936
2005-10-15 22:07:28 +00:00
Nicholas Nethercote
c3302079e9 OSet-ified Cachegrind:
- The instrInfoTable was a VgHashTable, now it's an OSet.  
- The CC table was a custom 3-level hash table, now it's an OSet.  This
  is easier to understand and there's no worrying about whether the hash
  array sizes are big enough.  It also has the nice property that the
  results in the cachegrind.out.<pid> file are now sorted, so they're a bit
  easier to read.

I did some testing and the performance difference appears to be negligible;
CC table and InstrInfo table lookups and traversal aren't that critical.
  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4933
2005-10-15 17:46:18 +00:00
Nicholas Nethercote
e5cec4f567 Tiny comment/code layout tweaks; no functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4913
2005-10-12 16:45:17 +00:00
Julian Seward
6ae26c97c8 Get rid of bbSeenBefore and associated logic: it appears to be
irrelevant.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4912
2005-10-12 16:16:03 +00:00
Julian Seward
4a7b975b76 rm trigram stuff.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4904
2005-10-12 10:29:40 +00:00
Julian Seward
5740bf2f53 Redo the way cachegrind generates instrumentation code, so that it can
deal with any IR that happens to show up.  This makes it work on ppc32
and should fix occasionally-reported bugs on x86/amd64 where it bombs
due to having to deal with multiple date references in a single
instruction.

The new scheme is based around the idea of a queue of memory events
which are outstanding, in the sense that no IR has yet been generated
to do the relevant helper calls.  The presence of the queue --
currently 16 entries deep -- gives cachegrind more scope for combining
multiple memory references into a single helper function call.  As a
result it runs 3%-5% faster than the previous version, on x86.

This commit also changes the type of the tool interface function
'tool_discard_basic_block_info' and clarifies its meaning.  See
comments in include/pub_tool_tooliface.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4903
2005-10-12 10:09:23 +00:00
Nicholas Nethercote
e02a407d1f Convert some native types to our types.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4899
2005-10-10 16:49:01 +00:00
Nicholas Nethercote
47996d3a09 Update cache simulator for 64 bit addresses. This probably won't have
caused many inaccuracies so far because it only matters if addresses
above the 4GB line are used.  Thanks to Josef W for the patch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4898
2005-10-10 16:18:09 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
ae68dcc13f actually, they're unsigned
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4766
2005-09-25 17:59:16 +00:00
Nicholas Nethercote
531b28734e Print longs as longs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4765
2005-09-25 17:57:47 +00:00
Nicholas Nethercote
ca38159b2d Don't print the client's argv[i] if it's null, and related changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4629
2005-09-13 00:46:27 +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
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
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
Nicholas Nethercote
05cf8f1611 Replace out-of-date email address.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4322
2005-08-04 19:26:54 +00:00
Nicholas Nethercote
65ee9be4ef Fixed a bug in Cachegrind: it was adding instrumentation after
conditional jumps, so if those jumps were taken, the instrumentation
wasn't executed.  This was causing the I-cache access counts to be
underestimated.  

This commit puts the instrumentation before the jumps, except for the
odd case of REP instructions, giving the same behaviour as 2.4.0.
Based on a patch from Josef Weidendorfer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4309
2005-08-02 23:07:02 +00:00
Tom Hughes
d9d05342fb Ignore prefetch information when decoding Intel cache details. Patch
from Josef Weidendorfer <Josef.Weidendorfer@gmx.de>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4286
2005-07-27 22:59:50 +00:00
Nicholas Nethercote
63f82da63d fix breakage/wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4261
2005-07-25 23:30:24 +00:00
Julian Seward
6789f6542e A commit which is almost all trivial change.
- m_main: if --log-file-qualifier applies, do not add ".pid"
  at the end of the name

- Fix the logic which detected whether the just-devised name
  already existed.  This was broken (by me) because it could not
  distinguish the reasons for failing to open the logfile.

  Doing this required changing the return type of VG_(open)
  from Int to SysRes (to make failure reasons visible) and 
  that's the cause of most of the changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4228
2005-07-23 09:18:34 +00:00
Nicholas Nethercote
2e3199022e Add a CPUID case, thanks to Josef W.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4210
2005-07-20 04:32:44 +00:00
Julian Seward
cdf83f1302 Don't bomb cachegrind at startup.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4131
2005-07-08 09:45:43 +00:00
Nicholas Nethercote
e5ad110351 Remove dead function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4101
2005-07-03 18:45:37 +00:00
Nicholas Nethercote
e67b65d0eb Changed m_hashtable.c to allow the size of the hash table to be specified
when it is created.  Fortunately this didn't affect code outside this
module except for the calls to VG_(HT_construct)().

As a result, we save some memory because not all tables have to be as big
as the ones needed for malloc/free tracking.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4100
2005-07-03 17:53:11 +00:00
Nicholas Nethercote
fbf8653c8b Removed the remnants of the attempt at an ARM port, because it had
bit-rotted badly and was clogging up the code.

I put the useful remnants in docs/porting-to-ARM in case anyone ever
wants to try porting to ARM again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4092
2005-07-02 23:13:59 +00:00
Nicholas Nethercote
1d9d123bac Don't need a foo_SOURCES line if the program has only a single source file
named foo.c.

Now again using the right flags for building fpu_lazy_eflags.c, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4086
2005-07-02 18:24:58 +00:00
Nicholas Nethercote
d50a75cd1a Fixed 'make dist'. In particular, all the arch/platform-specific files
get included in the distro now, not just the ones for the arch/platform
that the distro tarball is built on.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4085
2005-07-02 17:36:11 +00:00
Julian Seward
1cfc0e7971 Track Vex API change (r1239, introduction of endianness-indications in
IR loads and stores.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4072
2005-06-30 23:33:37 +00:00
Julian Seward
217e0415ca Add missing #include.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4070
2005-06-30 23:20:30 +00:00