3838 Commits

Author SHA1 Message Date
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
958b135d6b Fix make dist (seems to work, but am unsure if this is the right fix).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4949
2005-10-19 23:38:22 +00:00
Nicholas Nethercote
f2ec4febfe Make the usage message a little neater and more self-consistent.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4948
2005-10-19 22:39:40 +00:00
Julian Seward
a55c24c5d7 Halve the size of the fast tt lookup cache. This improves ppc32
performance quite a bit, since the cache is emptied quite often on
ppc32, and a smaller cache is less intrusive in the real machine's L2
cache.  On x86 the change doesn't seem to have much effect.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4947
2005-10-19 11:23:07 +00:00
Julian Seward
073c102b95 Use standard syntax for the rlwinm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4946
2005-10-19 10:14:19 +00:00
Julian Seward
8547d43b79 Snap up some easy pickings pointed out by cachegrinding nulgrind on ppc32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4945
2005-10-19 01:32:41 +00:00
Julian Seward
d12b128625 Reenable a couple more syscalls needed for self-hosting on ppc32,
which now works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4944
2005-10-19 01:14:22 +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
Julian Seward
e5264d94c5 Add extra auxiliary data structures which make it possible to quickly
find and delete all translations intersecting with small address
ranges (8 k or less, currently).  This makes it possible to simulate
ppc32 icbi instructions in reasonable time, and finally makes the
ppc32 port run at a usable speed.

The scheme is based around partitioning translations into equivalence
classes based on address ranges.  For deletions whose range falls
within a single class, all translations intersecting it can be found
by inspecting just that class and one other.  Given that there are 256
classes, this cuts the cost, relative to scanning the entire TC, by
approximately half that factor (viz, 128), assuming the translations
are distributed evenly over the classes.

The whole business is more complex and difficult than I would like.

A detailed comment will later be added.

Very thorough sanity checking has been added
(sanity_check_eclasses_in_sector).  This is engaged at
--sanity-level=4 and above.

The TT hash function (HASH_TT) has been improved to reduce its
tendency to cluster TT entries in some circumstances.  This has
allowed the TT maximum loading factor to be increased from 66% to 80%
and so the absolute size of the TC (in each sector) to be less than
2^16 entries.  The latter change is important for the fast-deletion
changes.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4942
2005-10-18 02:30:42 +00:00
Julian Seward
6048f9c854 Add a new arena (VG_AR_TTAUX) for holding auxiliary TT/TC structures
(see next commit).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4941
2005-10-18 02:20:18 +00:00
Julian Seward
cd5eb80553 Fix socket stuff on ppc32, so that --log-socket actually works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4940
2005-10-18 02:15:39 +00:00
Nicholas Nethercote
b32a66a35f augment comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4939
2005-10-16 17:48:09 +00:00
Tom Hughes
c0c5256036 Removed remaining traces of address space padding technology as it
is not longer relevant with the new address space manager.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4938
2005-10-16 13:52:50 +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
636a65e603 update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4935
2005-10-15 17:54:35 +00:00
Nicholas Nethercote
6218bef661 Comment-only changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4934
2005-10-15 17:50:02 +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
b692589152 Clarify the disInstr message.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4932
2005-10-15 17:18:08 +00:00
Nicholas Nethercote
c489c3e3e2 update roadmap
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4931
2005-10-15 16:53:04 +00:00
Nicholas Nethercote
cf39f65c7d OSet-ify m_redir.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4930
2005-10-15 15:48:52 +00:00
Nicholas Nethercote
ddc3f8ff42 Fix 'shell' for those lacking '.' in their $PATH, hopefully.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4929
2005-10-15 15:28:31 +00:00
Tom Hughes
2b6b5f063e Filter out line numbers from shell error messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4928
2005-10-15 13:01:21 +00:00
Julian Seward
04bb445744 Various fixes to reduce noise level on SuSE 10 (PPC). Also fix some
ppc32 syscalls.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4927
2005-10-15 02:00:41 +00:00
Julian Seward
62f6e91ab4 Unfortunately gcc4 doesn't like recently added prototypes. Comment
out for the time being.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4926
2005-10-15 00:58:26 +00:00
Julian Seward
100db4b3eb Add comments re loss of pointercheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4925
2005-10-15 00:41:50 +00:00
Julian Seward
e095f8f780 Add a large comment giving an overview of what it does and how it
works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4924
2005-10-14 19:05:45 +00:00
Julian Seward
880222a537 Comment-only change: add comments re self-checking translations and
self-modifying code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4923
2005-10-14 17:22:31 +00:00
Nicholas Nethercote
297b4059a2 Choose a less-similar variable name when avoiding -Wshadow warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4922
2005-10-14 13:51:33 +00:00
Nicholas Nethercote
04d5174fd1 Avoid two compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4921
2005-10-14 13:48:54 +00:00
Julian Seward
dfc6b6ef3e Get rid of various compilation warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4920
2005-10-14 11:25:49 +00:00
Julian Seward
5efea53246 Rename a local variable so as to make -Wshadow shut up.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4919
2005-10-14 11:13:14 +00:00
Nicholas Nethercote
82c3ab0af9 Overhaul the way programs are loaded at startup and exec() works. Now the
checking of programs done in these two places are combined, which avoids
duplicate code and greatly reduces the number of cases in which exec()
fails causing Valgrind to bomb out.

Also, we can now load some programs we could not previously, such as scripts
lacking a "#!" line at the start.  Also, the startup failure messages for
bad programs match the shell's messages very closely.

And I added a whole bunch of regtests to test all this.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4918
2005-10-14 03:11:30 +00:00
Tom Hughes
698825b70d Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4917
2005-10-13 15:54:20 +00:00
Tom Hughes
014fc8c051 Use an soname of libc.so* for libc redirects so that we catch a wider
range of libc's such as uclibc as well as glibc. Fixes bug 114289.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4916
2005-10-13 15:51:12 +00:00
Tom Hughes
0e57349a13 We can print native word sized values sensibly now...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4915
2005-10-13 15:29:39 +00:00
Julian Seward
273557e5f7 C90 fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4914
2005-10-13 12:41:09 +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
00c09f8f0d Build fixes for gcc-2.96. The system now builds and regtests with the
default gcc-2.96 on Red Hat 7.3.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4911
2005-10-12 12:53:20 +00:00
Tom Hughes
771e875b85 Correct variable name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4910
2005-10-12 11:30:43 +00:00
Tom Hughes
c3b4884004 Only add -Wdeclaration-after-statement if the compiler supports it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4909
2005-10-12 11:27:33 +00:00
Julian Seward
fa41cb30d8 Notify the tool via tool_discard_basic_block_info() about translations
thrown away due to lack of space.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4908
2005-10-12 10:51:01 +00:00
Tom Hughes
fa32067e45 Fix x86 specific declaration-before-statement warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4907
2005-10-12 10:50:56 +00:00
Tom Hughes
6961dcf591 Fix statement-before-declaration warnings for the core code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4906
2005-10-12 10:45:27 +00:00
Tom Hughes
c7a4bfb614 Add -Wdeclaration-after-statement to the compiler flags so we can
catch code that will fail on older compilers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4905
2005-10-12 10:32:08 +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
Julian Seward
13e2f46531 ppc32 only: give debug info names for a couple of fns to make
cachegrind profiles more understandable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4902
2005-10-12 10:00:56 +00:00