Commit Graph

2908 Commits

Author SHA1 Message Date
Julian Seward
04fc4caed2 Get rid of the unused --model-pthreads flag.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6584
2007-02-12 08:39:54 +00:00
Julian Seward
517d5c52e8 Fix ppc64-linux dispatcher following r6582.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6583
2007-02-11 09:09:20 +00:00
Julian Seward
79f854bc29 Redo the dispatcher's fast-cache mechanism (VG_(tt_fast) et al) to be
more cache friendly.  This changes the mechanism from being a table of
pointers to (guest address, translated code pairs) to being a table of
pairs (guest address, pointer to translated code).  The effect ranges
from zero up to about 20% performance improvement on memcheck, the
biggest effects being seen for programs which jump around a large
number of blocks of code and whose data set does not fit in L2.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6582
2007-02-11 05:08:06 +00:00
Julian Seward
73a17ab6f3 Oops; make declarations match definitions. So much for C's type system.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6580
2007-02-09 17:45:09 +00:00
Julian Seward
9943647c57 Unbreak aix build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6578
2007-02-09 02:11:06 +00:00
Julian Seward
56b4de0b8b Specialise VG_(ssort) for 4-word elements. This removes about 80% of
all calls to VG_(memcpy).  Thanks to cachegrind for showing somebody
was calling VG_(memcpy) a huge number of times, and to callgrind for
finding out who :-)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6577
2007-02-08 16:25:56 +00:00
Julian Seward
ae7b3f3305 Make VG_(clo_log_file_qualifier) tool-visible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6571
2007-02-07 19:50:55 +00:00
Dirk Mueller
ac2bbadda5 implement support for AT_FDCWD in openat()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6566
2007-01-31 23:06:08 +00:00
Julian Seward
967cd7b6fd Enable the pselect6 wrapper on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6530
2007-01-18 00:13:24 +00:00
Julian Seward
e71365244a When '-d' (one or more) is specified, disallow the client from closing
fd 2 (stderr) since that's what m_debuglog writes to, and the
resulting disappearance of the debug log can be confusing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6519
2007-01-13 22:27:51 +00:00
Nicholas Nethercote
824abc79ce Fix a bug reported by Bruce Lowekamp involving the interaction of
--gen-suppressions with leak checking.  Added a regtest for it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6514
2007-01-12 23:59:50 +00:00
Julian Seward
20ce1d0a81 Handle DW_CFA_undefined (produced by PathScale 2.4 on amd64-linux)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6510
2007-01-12 19:21:22 +00:00
Julian Seward
c8bb92ec69 ML_(read_callframe_info_dwarf2): deal better with CIEs with no
augmentation (has to do with read_encoded_Addr).  This "fix" is a
kludge and may be replaced in future by something cleaner.  See
extensive comment addition for the whole sorry tale.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6509
2007-01-12 19:03:19 +00:00
Julian Seward
471585d496 In struct _SegInfo, rename field 'size' to 'text_size' so as to be
consistent with all the other 'foo_start_avma'/'foo_size' pairings.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6508
2007-01-11 21:56:20 +00:00
Julian Seward
1b7dd32e8f In struct _SegInfo, rename field 'offset' to 'text_bias'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6507
2007-01-11 20:11:51 +00:00
Julian Seward
00c15317cc Non-functional change: rename a bunch of variables and field names
that hold various kinds of addresses during debuginfo reading, so as
to make it easier to understand.  See comment at top of debuginfo.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6506
2007-01-11 19:42:11 +00:00
Julian Seward
afb082acc7 Generate valid XML even for very long fn names - always ensure tags
have matching closing tags.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6502
2007-01-10 15:42:15 +00:00
Julian Seward
20a55a1469 ML_(generic_PRE_sys_mmap): In the case of a hinted mapping (for the
client) which aspacemgr accepts at the hint address but the kernel
declines, try again as a non-hinted mapping.  Fixes ld.so mapping
failures observed on ppc32-linux, although the problem potentially
applies to all Linux targets.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6495
2007-01-09 16:47:20 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
019520f7a8 Merge r6480 (parse_procselfmaps: don't hand zero-length mappings to
*record_mapping)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6481
2007-01-07 02:03:01 +00:00
Julian Seward
3b34ac0468 Pass CC and AR to vex's Makefile here too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6475
2007-01-05 23:50:45 +00:00
Julian Seward
169129638f Remove redundant \n
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6460
2006-12-30 17:56:32 +00:00
Julian Seward
37c3d2ead6 Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6459
2006-12-30 17:45:08 +00:00
Julian Seward
10c505c003 Get rid of the core-tool events pre_mutex_lock, post_mutex_lock and
post_mutex_unlock.  The core can't detect them anyway any more, so
there's no point in having them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6456
2006-12-28 20:26:08 +00:00
Julian Seward
e2430de731 Print a marginally more helpful error message if UME (ELF loading) fails.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6444
2006-12-27 05:18:33 +00:00
Nicholas Nethercote
cadc28816d Split the thread_runstate event into two, start_client_code and
stop_client_code, which is a bit clearer and easier to work with.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6418
2006-12-24 07:51:17 +00:00
Julian Seward
009697dfe4 Always ensure that the output buffer is zero-terminated, even if it is
already full.  (Nick N)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6417
2006-12-24 03:02:18 +00:00
Julian Seward
1083ded7e2 Non-functional commit: track IR renaming in vex r1689.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6416
2006-12-24 02:24:11 +00:00
Julian Seward
806c8b17b3 Change the core-tool interface 'thread_run' event to be more useful:
- Rename the event to 'thread_runstate'.

- Add arguments: pass also a boolean indicating whether the thread
  is running or stopping, and a 64-bit int showing how many blocks
  overall have run, so tools can make a rough estimate of workload.

  The boolean allows tools to see threads starting and stopping.
  Prior to this, de-schedule events were invisible to tools.

- Call the callback (hand the event to tools) just before client
  code is run, and again immediately after it stops running.  This
  should give correct sequencing w.r.t posting of thread creation/
  destruction events.

In order to make callgrind work without complex changes, I added a
simple impedance-matching function 'clg_thread_runstate_callback' 
which hands thread-run events onwards to CLG_(thread_run).

Use this new 'thread_runstate' with care: it will be called before
and after every translation, which means it will be called ~500k
times in a startup of firefox.  So the callback needs to be fast.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6413
2006-12-23 01:21:12 +00:00
Tom Hughes
141bfac9cf Add support for some USB ioctls. Based on patches from Jon Burgess and
Marcus Meissner in bugs #136059 and #138896.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6411
2006-12-18 16:48:10 +00:00
Tom Hughes
69c8af5179 Improve prctl support - based on patch from Eric Pouech in bug #138627.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6410
2006-12-18 15:22:46 +00:00
Julian Seward
34198cf597 Rename VG_(get_lwp_tid) to VG_(lwpid_to_vgtid).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6409
2006-12-17 19:36:06 +00:00
Julian Seward
a96416a3e2 A naming-only change: rename VG_(set_running) to VG_(acquire_BigLock)
and VG_(set_sleeping) to VG_(release_BigLock).  And some other minor
renamings to the thread locking stuff, to make it easier to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6408
2006-12-17 18:58:55 +00:00
Nicholas Nethercote
d162731a2c Completely overhauled the internals of Memcheck's error handling. All the
different error kinds were reusing the same struct for storing their
details.  Each one used some but not all the fields, and the AddrInfo was
similar, and it was very confusing.

So I changed MC_Error and AddrInfo to be tagged unions, like Vex's IRExpr and
IRStmt types.  The resulting code is a little more verbose but much easier
to understand.  I also split up several error kinds, which also made things
simpler.  The user-visible behaviour is identical except for a couple of
very minor things that I've documented in the NEWS file for the 3.3.0
release.

Ideally I'd get rid of the Addr and Char* fields in the core Error type,
which are not always used, and do them similarly within tools.  But that
would require changing the core/tool interface, so I'm leaving it for the
moment.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6402
2006-12-16 00:54:12 +00:00
Nicholas Nethercote
033e3bd4e9 Removed the unused pthread_model and thread_model modules.
Mostly commented out the unused stuff relating to ThreadErrs and MutexErrs,
which no longer exist.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6399
2006-12-14 02:55:58 +00:00
Julian Seward
52cf6ff843 Tidy fd-leak stuff a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6391
2006-12-11 01:11:02 +00:00
Julian Seward
abce15a799 Only read $HOME/.valgrindrc if HOME is actually set.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6380
2006-12-06 17:38:32 +00:00
Julian Seward
771e4abcc9 When generating suppressions, remember to Z-demangle function names,
since the suppression-matching machinery does the same.  Not doing so
causes auto-generated suppressions involving Z-mangled fn names to not
work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6377
2006-12-06 03:35:38 +00:00
Julian Seward
5246f753ff When failing, fail a bit more informatively.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6376
2006-12-01 18:48:56 +00:00
Julian Seward
d1034ee415 When being an 'inner valgrind' on 64-bit platforms, ensure the stack
is allocated below the magic 32G mark as it would be normally.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6375
2006-12-01 02:35:02 +00:00
Julian Seward
4bcb6276b1 Minor tidying: make initial_client_SP be a mandatory field in struct
_IIFinaliseImageInfo.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6359
2006-11-18 14:32:30 +00:00
Julian Seward
d4577533d1 Redo the interface to m_initimg (module for setting up the initial
client image) so it's less of an incomprehensible mess.  Basically the
idea is to have two standard functions, VG_(ii_create_image) and
VG_(ii_finalise_image), which communicate using the structure types
IICreateImageInfo and IIFinaliseImageInfo.  The types hold various
OS-specific bits of info.  A nice side effect is that m_main is tidied
up somewhat.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6357
2006-11-17 20:00:57 +00:00
Julian Seward
cf7e9dbc05 CFI reader: when decoding the single (address) argument to
DW_CFA_set_loc, take into account any encoding info conveyed by the
augmentation string.  See big comment in the code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6356
2006-11-16 12:21:52 +00:00
Dirk Mueller
6662c989dc change void* to Addr in mutex helpers. patch by Bard Van Assche.
I've bumped the tool interface version because it seems binary
incompatible.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6350
2006-11-14 14:32:46 +00:00
Julian Seward
2040c9cd05 Syscall tidying.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6349
2006-11-10 22:47:27 +00:00
Julian Seward
e962ad7da5 signedness wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6347
2006-11-04 18:18:14 +00:00
Julian Seward
b2c70d2846 Make the hashing in VG_(record_ExeContext) 64-bit clean and more
robust.  Also incrementally rearrange the hash chains during searches.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6341
2006-10-24 21:43:38 +00:00
Julian Seward
fb8234c9d4 Move a couple of functions out of tool view.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6324
2006-10-19 17:31:37 +00:00
Julian Seward
639f06a928 Fix regression caused by recent merging, picked up by none/tests/shell.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6316
2006-10-18 00:34:21 +00:00
Julian Seward
fc0903793a Use house types.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6315
2006-10-18 00:33:46 +00:00