]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
21 years agocomment wibble
Nicholas Nethercote [Mon, 2 Aug 2004 16:54:01 +0000 (16:54 +0000)] 
comment wibble

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2553

21 years agoRemoved cruft from vg_scheduler.c:
Nicholas Nethercote [Mon, 2 Aug 2004 16:27:40 +0000 (16:27 +0000)] 
Removed cruft from vg_scheduler.c:
 � things not used any more, eg. global variables
 - removed some things from vg_include.h, making them local -- functions,
   variables and macros
 - other minor clean-ups

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2552

21 years agoScheduler counts don't need to be in vg_include.h. Replace with a print
Nicholas Nethercote [Mon, 2 Aug 2004 15:27:22 +0000 (15:27 +0000)] 
Scheduler counts don't need to be in vg_include.h.  Replace with a print
function.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2551

21 years agowhoops, forgot to remove these in the last commit
Nicholas Nethercote [Mon, 2 Aug 2004 15:19:55 +0000 (15:19 +0000)] 
whoops, forgot to remove these in the last commit

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2550

21 years agosanity_*_count don't need to be in vg_include.h.
Nicholas Nethercote [Mon, 2 Aug 2004 15:17:43 +0000 (15:17 +0000)] 
sanity_*_count don't need to be in vg_include.h.

Also hide the reg-alloc counters, and replace with a printing function.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2549

21 years agoSanity counters don't need to be in vg_include.h.
Nicholas Nethercote [Mon, 2 Aug 2004 15:07:57 +0000 (15:07 +0000)] 
Sanity counters don't need to be in vg_include.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2548

21 years agoTweak to remove another global variable from vg_include.h
Nicholas Nethercote [Mon, 2 Aug 2004 13:15:26 +0000 (13:15 +0000)] 
Tweak to remove another global variable from vg_include.h

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2547

21 years agoMake VG_(n_errs_found) local; replace globally with a 'get' function. Renamed
Nicholas Nethercote [Mon, 2 Aug 2004 12:36:01 +0000 (12:36 +0000)] 
Make VG_(n_errs_found) local;  replace globally with a 'get' function.  Renamed
vg_n_errs_suppressed too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2546

21 years agoMake the Supp and Error types local to vg_errcontext.h; they don't need to be
Nicholas Nethercote [Mon, 2 Aug 2004 12:21:09 +0000 (12:21 +0000)] 
Make the Supp and Error types local to vg_errcontext.h;  they don't need to be
global.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2545

21 years agoFold VG_(send_signal_to_thread)() into vg_scheduler.c, so it doesn't need to be
Nicholas Nethercote [Mon, 2 Aug 2004 12:10:01 +0000 (12:10 +0000)] 
Fold VG_(send_signal_to_thread)() into vg_scheduler.c, so it doesn't need to be
exported any more.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2544

21 years agoFactor out commonality between VG_(synth_fault*)().
Nicholas Nethercote [Sun, 1 Aug 2004 23:06:22 +0000 (23:06 +0000)] 
Factor out commonality between VG_(synth_fault*)().

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2543

21 years agoReplaced three global variables in vg_include.h with a single global function;
Nicholas Nethercote [Sun, 1 Aug 2004 22:59:18 +0000 (22:59 +0000)] 
Replaced three global variables in vg_include.h with a single global function;
much neater.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2542

21 years agoCleaned up vg_include.h:
Nicholas Nethercote [Sun, 1 Aug 2004 22:36:40 +0000 (22:36 +0000)] 
Cleaned up vg_include.h:
- removed various things that are no longer used
- made (module-)local some things that were global
- improved the formatting in places

Removed about 160 lines of code, and non-trivially reduced the number
of global entities.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2541

21 years agoFix bug #86254 -- symtab sorting was going array in very obscure circumstances
Nicholas Nethercote [Sun, 1 Aug 2004 20:24:46 +0000 (20:24 +0000)] 
Fix bug #86254 -- symtab sorting was going array in very obscure circumstances
due to a signed/unsigned int problem.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2540

21 years agoRemove redundant duplicates of stuff in vg_kerneliface.h.
Nicholas Nethercote [Fri, 30 Jul 2004 23:44:30 +0000 (23:44 +0000)] 
Remove redundant duplicates of stuff in vg_kerneliface.h.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2539

21 years agoRemoved unused VG_AR_CLIENT_STACKBASE_REDZONE_SZW.
Nicholas Nethercote [Fri, 30 Jul 2004 23:36:37 +0000 (23:36 +0000)] 
Removed unused VG_AR_CLIENT_STACKBASE_REDZONE_SZW.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2538

21 years agoRestructured the as_*() functions so they are simpler and there is no implicit
Nicholas Nethercote [Fri, 30 Jul 2004 21:50:15 +0000 (21:50 +0000)] 
Restructured the as_*() functions so they are simpler and there is no implicit
global state -- the state is threaded explicitly through via function arguments
and return values.  ume.c now has no global variables, which is nice.

Also removed a redundant as_pad() call in stage2's main() which meant
layout_client_space() could be merged with layout_remaining_space().

Also removed a couple of no-longer-used variables and #defines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2537

21 years agoModify the ipc system call so that only those calls which may block
Tom Hughes [Thu, 29 Jul 2004 22:40:07 +0000 (22:40 +0000)] 
Modify the ipc system call so that only those calls which may block
are treated as blocking.

This fixes bug #86000 because shmat is no longer treated as blocking
and it is therefore no longer possible for two threads to try and use
the same address for the shared memory segment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2536

21 years agoModified the fcntl system call so that only those reason codes which
Tom Hughes [Thu, 29 Jul 2004 21:20:11 +0000 (21:20 +0000)] 
Modified the fcntl system call so that only those reason codes which
can block (ie F_SETLKW) are treated as blocking.

This resolves the F_SETOWN problem described in bug #85969.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2535

21 years agoAdd support for allowing the POST function for a system call to be called
Tom Hughes [Thu, 29 Jul 2004 17:44:23 +0000 (17:44 +0000)] 
Add support for allowing the POST function for a system call to be called
even when the system call fails, and allow the PRE function to modify the
system call flags.

Also fix nanosleep so that it only marks the returned time as defined
if the system call exited with EINTR due to be interrupted.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2534

21 years agoMerge equivalent if statements.
Nicholas Nethercote [Wed, 28 Jul 2004 16:03:29 +0000 (16:03 +0000)] 
Merge equivalent if statements.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2533

21 years agoFix the skiplist brokenness Nick found:
Jeremy Fitzhardinge [Tue, 27 Jul 2004 21:49:23 +0000 (21:49 +0000)] 
Fix the skiplist brokenness Nick found:
 - use a simple memset to initialize the next pointer vector
 - fix some previously unexercised code as a result of the above
Still haven't verified we're actually getting skipping, but it doesn't
crash with a make regtest.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2532

21 years agoAdded some comments.
Nicholas Nethercote [Mon, 26 Jul 2004 15:43:57 +0000 (15:43 +0000)] 
Added some comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2531

21 years agoRename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
Nicholas Nethercote [Mon, 26 Jul 2004 15:32:47 +0000 (15:32 +0000)] 
Rename 'argv0' and 'argv1' to the more meaningful 'interp_name' and
'interp_args'.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2530

21 years agoNeaten up ume.h: don't export readelf(), mapelf, and struct elfinfo; improve
Nicholas Nethercote [Mon, 26 Jul 2004 15:28:33 +0000 (15:28 +0000)] 
Neaten up ume.h:  don't export readelf(), mapelf, and struct elfinfo;  improve
formatting too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2529

21 years agoRemove accidental double assignment. Also don't assume that VG_(client_base)
Nicholas Nethercote [Mon, 26 Jul 2004 12:44:35 +0000 (12:44 +0000)] 
Remove accidental double assignment.  Also don't assume that VG_(client_base)
is zero.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2528

21 years agoEr, actually make this test meaningful. It now aborts correctly if you try to
Nicholas Nethercote [Mon, 26 Jul 2004 11:11:56 +0000 (11:11 +0000)] 
Er, actually make this test meaningful.  It now aborts correctly if you try to
launch stage2 directly, rather than giving an obscure error about the tool
later on.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2527

21 years agoRemove unused global variable.
Nicholas Nethercote [Mon, 26 Jul 2004 10:22:33 +0000 (10:22 +0000)] 
Remove unused global variable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2526

21 years agomake non-exported function static
Nicholas Nethercote [Mon, 26 Jul 2004 10:05:55 +0000 (10:05 +0000)] 
make non-exported function static

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2525

21 years agoMove the decoding of SFENCE out of the SSE only part of disInstr as it
Tom Hughes [Sun, 25 Jul 2004 15:43:00 +0000 (15:43 +0000)] 
Move the decoding of SFENCE out of the SSE only part of disInstr as it
exists on Athlon's that have MMXEXT support and those don't have SSE state
so won't decode it where it was.

CCMAIL: 85947-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2524

21 years agoAdd instruction tests for the LFENCE/MFENCE/SFENCE instructions.
Tom Hughes [Sun, 25 Jul 2004 15:18:21 +0000 (15:18 +0000)] 
Add instruction tests for the LFENCE/MFENCE/SFENCE instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2523

21 years agoClarify error msgs
Nicholas Nethercote [Thu, 22 Jul 2004 12:41:12 +0000 (12:41 +0000)] 
Clarify error msgs

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2522

21 years agoIn response to bug #85665, clarify what --trace-children=yes does.
Nicholas Nethercote [Thu, 22 Jul 2004 08:57:50 +0000 (08:57 +0000)] 
In response to bug #85665, clarify what --trace-children=yes does.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2521

21 years agoFix checking of execve() when argv is a null pointer.
Tom Hughes [Wed, 21 Jul 2004 16:23:38 +0000 (16:23 +0000)] 
Fix checking of execve() when argv is a null pointer.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2520

21 years agoCorrect Cachegrind changes; better late than never.
Nicholas Nethercote [Wed, 21 Jul 2004 10:37:31 +0000 (10:37 +0000)] 
Correct Cachegrind changes;  better late than never.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2519

21 years agoType name wibble
Nicholas Nethercote [Wed, 21 Jul 2004 08:49:02 +0000 (08:49 +0000)] 
Type name wibble

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2518

21 years agoFix scary bug causing mis-identification of SSE stores vs loads.
Julian Seward [Tue, 20 Jul 2004 23:49:22 +0000 (23:49 +0000)] 
Fix scary bug causing mis-identification of SSE stores vs loads.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2517

21 years agoRemove duplicate suppressions for SuSE 9.0 (section appeared twice)
Julian Seward [Tue, 20 Jul 2004 22:42:44 +0000 (22:42 +0000)] 
Remove duplicate suppressions for SuSE 9.0 (section appeared twice)
and add one for SuSE 9.1.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2516

21 years agotypo
Nicholas Nethercote [Tue, 20 Jul 2004 14:18:51 +0000 (14:18 +0000)] 
typo

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2515

21 years agocomment typo
Nicholas Nethercote [Tue, 20 Jul 2004 13:29:02 +0000 (13:29 +0000)] 
comment typo

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2514

21 years agoFix extremely obscure bug in xadd picked up by QEMU's test suite. The
Julian Seward [Tue, 20 Jul 2004 12:24:53 +0000 (12:24 +0000)] 
Fix extremely obscure bug in xadd picked up by QEMU's test suite.  The
(almost useless) instruction "xadd %reg,%reg" gave the wrong answer
due to a subtlety of the order in which the destination registers are
PUTted to.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2513

21 years agogcc sometimes generates "sbbl %reg,%reg" to convert the carry flag
Julian Seward [Tue, 20 Jul 2004 11:42:24 +0000 (11:42 +0000)] 
gcc sometimes generates "sbbl %reg,%reg" to convert the carry flag
into 0 or -1 in reg.  This has no actual dependency on reg, but
memcheck can't see that, and so will yelp if reg contains garbage.  A
simple fix is to put zero into reg before we start, zapping any
undefinedness it might otherwise contain.

Hopefully fixes #84978 (unconfirmed)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2512

21 years agoSome systems seem to need linux/netlink.h for linux/fs.h to compile
Tom Hughes [Mon, 19 Jul 2004 23:16:41 +0000 (23:16 +0000)] 
Some systems seem to need linux/netlink.h for linux/fs.h to compile
correctly, so we include it beforehand in case.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2511

21 years agoAdd another C call helper.
Nicholas Nethercote [Mon, 19 Jul 2004 08:18:00 +0000 (08:18 +0000)] 
Add another C call helper.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2510

21 years agoInclude new_override.stdout.exp in 'make dist'.
Nicholas Nethercote [Sun, 18 Jul 2004 12:05:37 +0000 (12:05 +0000)] 
Include new_override.stdout.exp in 'make dist'.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2509

21 years ago--> 2.1.3.CVS
Julian Seward [Sun, 18 Jul 2004 11:47:55 +0000 (11:47 +0000)] 
--> 2.1.3.CVS

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2508

21 years agoExtra info for FAQ.
Nicholas Nethercote [Sun, 18 Jul 2004 10:35:36 +0000 (10:35 +0000)] 
Extra info for FAQ.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2506

21 years ago--> 2.1.2
Julian Seward [Sun, 18 Jul 2004 09:25:17 +0000 (09:25 +0000)] 
--> 2.1.2

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2505

21 years agoadd #85416.
Julian Seward [Sun, 18 Jul 2004 09:24:57 +0000 (09:24 +0000)] 
add #85416.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2504

21 years agoOnly treat colons in the switch name as important when looking for a
Tom Hughes [Sun, 18 Jul 2004 08:05:44 +0000 (08:05 +0000)] 
Only treat colons in the switch name as important when looking for a
toolname to check - colons in the switch value are now ignored.

CCMAIL: 85416-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2503

21 years agoVersion wibble
Julian Seward [Sat, 17 Jul 2004 23:44:48 +0000 (23:44 +0000)] 
Version wibble

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2502

21 years agoTrack bug resolutions which happened today.
Julian Seward [Sat, 17 Jul 2004 23:44:35 +0000 (23:44 +0000)] 
Track bug resolutions which happened today.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2501

21 years agoDeltas from Jeremy.
Julian Seward [Sat, 17 Jul 2004 23:26:46 +0000 (23:26 +0000)] 
Deltas from Jeremy.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2500

21 years agoAdd a bunch of asserts to check the results of calls to system malloc().
Nicholas Nethercote [Sat, 17 Jul 2004 16:40:50 +0000 (16:40 +0000)] 
Add a bunch of asserts to check the results of calls to system malloc().

Assertions are arguably not the right thing here, but the practice is
widespread and we're not planning on making asserts optional, and it's a lot
better than no checking.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2499

21 years agoMake the _dl_relocate_object suppressions more general so that they
Tom Hughes [Sat, 17 Jul 2004 14:16:03 +0000 (14:16 +0000)] 
Make the _dl_relocate_object suppressions more general so that they
work on more systems. The glibc 2.3 suppressions are already like this.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2498

21 years agoUpdate preamble a la Nick's suggestions.
Julian Seward [Sat, 17 Jul 2004 13:38:12 +0000 (13:38 +0000)] 
Update preamble a la Nick's suggestions.

Remove duplicate re SIOCGMIIPHY.

Remove claim that it compiles with icc-8.0.  It doesn't.
(/me is confused; I thought relevant fixes had already been committed).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2497

21 years agoCheck mmap() and munmap() results at startup; they can fail if a hard memory
Nicholas Nethercote [Sat, 17 Jul 2004 12:57:44 +0000 (12:57 +0000)] 
Check mmap() and munmap() results at startup;  they can fail if a hard memory
limit is set.  This fixes bug #82722.

CCMAIL: 82722-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2496

21 years agoClarify Cachegrind changes
Nicholas Nethercote [Sat, 17 Jul 2004 12:49:53 +0000 (12:49 +0000)] 
Clarify Cachegrind changes

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2495

21 years ago2.1.2 is imminent. I've tried to find all the changes since 2.1.1 and
Julian Seward [Sat, 17 Jul 2004 12:19:43 +0000 (12:19 +0000)] 
2.1.2 is imminent.  I've tried to find all the changes since 2.1.1 and
list them here.  (Reading 4 months worth of commit logs is sooo
fascinating :-) Please let me know asap of anything I've forgotten or
been erroneous on.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2494

21 years agoMake sure init_global_thread_specific_state() set the global_init_done
Tom Hughes [Sat, 17 Jul 2004 11:08:03 +0000 (11:08 +0000)] 
Make sure init_global_thread_specific_state() set the global_init_done
flag before the call to __uselocale() in order to avoid deadlock.

CCMAIL: 77952-done@bugs.kde.org

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2493

21 years agoSupport FBLD, FBSTP. Patch courtesy of Jani Monoses.
Nicholas Nethercote [Sat, 17 Jul 2004 10:01:51 +0000 (10:01 +0000)] 
Support FBLD, FBSTP.  Patch courtesy of Jani Monoses.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2492

21 years agoFix typo in comment.
Tom Hughes [Fri, 16 Jul 2004 23:07:58 +0000 (23:07 +0000)] 
Fix typo in comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2491

21 years agoBring this up to date.
Julian Seward [Fri, 16 Jul 2004 21:35:09 +0000 (21:35 +0000)] 
Bring this up to date.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2490

21 years agoSlightly change, with J's approval, startup copyright messages to better
Nicholas Nethercote [Fri, 16 Jul 2004 17:44:00 +0000 (17:44 +0000)] 
Slightly change, with J's approval, startup copyright messages to better
reflect reality.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2489

21 years agoapostrophe pedantry; comment change only
Nicholas Nethercote [Fri, 16 Jul 2004 17:32:15 +0000 (17:32 +0000)] 
apostrophe pedantry;  comment change only

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2488

21 years agoAdd comments to explain the address space padding technology.
Tom Hughes [Fri, 16 Jul 2004 15:36:45 +0000 (15:36 +0000)] 
Add comments to explain the address space padding technology.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2487

21 years agoCommit missing kernel interface definitions for async I/O calls.
Tom Hughes [Fri, 16 Jul 2004 06:03:24 +0000 (06:03 +0000)] 
Commit missing kernel interface definitions for async I/O calls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2486

21 years agoImplement support for the async I/O system calls in 2.6 kernels. This
Tom Hughes [Thu, 15 Jul 2004 23:13:37 +0000 (23:13 +0000)] 
Implement support for the async I/O system calls in 2.6 kernels. This
requires padding of the address space around calls to io_setup in order
to constrain the kernel's choice of address for the I/O context.

Based on patch from Scott Smith <scott-kde@gelatinous.com> with various
enhancements, this fixes bug #83060.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2485

21 years agoIf new/new[] fails and should throw an exception, abort instead, since we can't
Nicholas Nethercote [Thu, 15 Jul 2004 16:28:36 +0000 (16:28 +0000)] 
If new/new[] fails and should throw an exception, abort instead, since we can't
throw exceptions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2484

21 years agoThis commit fixes things so that the client stack can be easily placed
Nicholas Nethercote [Thu, 15 Jul 2004 14:58:33 +0000 (14:58 +0000)] 
This commit fixes things so that the client stack can be easily placed
anywhere, even below the client executable, just by changing a single
assignment to VG_(clstk_end).  I haven't actually moved the stack, though.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2483

21 years agoMerged Valgrind's heap and stack. This has two main advantages:
Nicholas Nethercote [Thu, 15 Jul 2004 12:59:41 +0000 (12:59 +0000)] 
Merged Valgrind's heap and stack.  This has two main advantages:

1. It simplifies various things a bit.

2. Valgrind/tools will run out of memory later than currently in many
circumstances.  This is good news esp. for Calltree.

Some things were going in V's 128MB heap, and some were going in V's 128MB map
segment.  Now all these things are going into a single 256MB map segment.
stage2 has been moved down to 0xb0000000, the start of the 256MB map segment.
The .so files needed by it are placed at 0xb1000000 (that's the map_base).

This required some bootstrapping at startup for memory -- we need to allocate
memory to create the segments skip-list which lets us allocate memory...
solution was to make the first superblock allocated a special static one.
That's pretty simple and enough to get things going.

Removed vg_glibc.c which wasn't doing anything anyway.

Removed VG_(brk) and associated stuff, made all the things that were calling it
call VG_(mmap)() instead.

Removed VG_(valgrind_mmap_end) which was no longer needed.

Rejigged the startup order a bit as necessary.

Moved an important comment from ume.c to vg_main.c where it should be.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2482

21 years agoIntercept 'nothrow' versions of delete and delete[].
Nicholas Nethercote [Wed, 14 Jul 2004 15:38:06 +0000 (15:38 +0000)] 
Intercept 'nothrow' versions of delete and delete[].

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2481

21 years agoMake sure the separator is restored when scan_colsep exits early. This
Tom Hughes [Mon, 12 Jul 2004 09:35:37 +0000 (09:35 +0000)] 
Make sure the separator is restored when scan_colsep exits early. This
stops the PATH variable being truncated for programs run under valgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2480

21 years agoAdd comment.
Nicholas Nethercote [Mon, 12 Jul 2004 09:01:24 +0000 (09:01 +0000)] 
Add comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2479

21 years agoUpdate VG_(mmap)() in #if'd out branch.
Nicholas Nethercote [Sun, 11 Jul 2004 18:16:36 +0000 (18:16 +0000)] 
Update VG_(mmap)() in #if'd out branch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2478

21 years agoAdd some more assertion checking where it was lacking.
Nicholas Nethercote [Sun, 11 Jul 2004 18:11:33 +0000 (18:11 +0000)] 
Add some more assertion checking where it was lacking.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2477

21 years agoRemoved some code from VG_(client_alloc)() that could be left to VG_(mmap)().
Nicholas Nethercote [Sun, 11 Jul 2004 18:01:06 +0000 (18:01 +0000)] 
Removed some code from VG_(client_alloc)() that could be left to VG_(mmap)().

Added a comment about stack extension failure.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2476

21 years agoRemoved some unnecessary is_kerror() checks.
Nicholas Nethercote [Sat, 10 Jul 2004 18:08:13 +0000 (18:08 +0000)] 
Removed some unnecessary is_kerror() checks.

Fixed nanosleep's formatting.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2475

21 years agoAdded assertion checking to a whole bunch of mmap() and munmap() calls. I used
Nicholas Nethercote [Sat, 10 Jul 2004 17:49:17 +0000 (17:49 +0000)] 
Added assertion checking to a whole bunch of mmap() and munmap() calls.  I used
assertions because if these calls fail, it's a bug in Valgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2474

21 years agoFormat wibble.
Nicholas Nethercote [Sat, 10 Jul 2004 17:36:52 +0000 (17:36 +0000)] 
Format wibble.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2473

21 years agoFormat wibble
Nicholas Nethercote [Sat, 10 Jul 2004 17:30:07 +0000 (17:30 +0000)] 
Format wibble

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2472

21 years agoWhoops, fix comment.
Nicholas Nethercote [Sat, 10 Jul 2004 17:27:20 +0000 (17:27 +0000)] 
Whoops, fix comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2471

21 years agoRemove out-of-date comment.
Nicholas Nethercote [Sat, 10 Jul 2004 17:22:27 +0000 (17:22 +0000)] 
Remove out-of-date comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2470

21 years agoA few changes:
Nicholas Nethercote [Sat, 10 Jul 2004 17:21:14 +0000 (17:21 +0000)] 
A few changes:
- removed an unnecessary VG_(unmap_range)() call in do_brk() -- the
  VG_(munmap)() just before it does it anyway.
- inlined mprotect_segment() and munmap_segment() because it's more concise and
  easier to understand that way.
- a couple of minor formatting changes
- added and cleaned up a couple of comments

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2469

21 years agoComment changes only.
Nicholas Nethercote [Sat, 10 Jul 2004 16:59:25 +0000 (16:59 +0000)] 
Comment changes only.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2468

21 years agoRemove out-of-date comment -- should have been removed when VG_(mmap)() was
Nicholas Nethercote [Sat, 10 Jul 2004 16:57:20 +0000 (16:57 +0000)] 
Remove out-of-date comment -- should have been removed when VG_(mmap)() was
changed to accept the sf_flags argument.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2467

21 years agoRemoved the 'place-holder' behaviour of VG_(mmap). Previously, VG_(mmap) would
Nicholas Nethercote [Sat, 10 Jul 2004 16:50:09 +0000 (16:50 +0000)] 
Removed the 'place-holder' behaviour of VG_(mmap).  Previously, VG_(mmap) would
add a segment mapping to the segment skip-list, and then often the caller of
VG_(mmap) would do another one for the same segment, just to change the SF_*
flags.  Now VG_(mmap) gets passed the appropriate SF_* flags so it can do it
directly.   This results in shorter, simpler code, and less work at runtime.

Also, strengthened checking in VG_(mmap), POST(mmap), POST(mmap2) -- now if the
result is not in the right place, it aborts rather than unmapping and
continuing.  This is because if it's not in the right place, something has
gone badly wrong.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2466

21 years agoChange allocation failure message which is no longer true thanks to FV.
Nicholas Nethercote [Sat, 10 Jul 2004 16:17:52 +0000 (16:17 +0000)] 
Change allocation failure message which is no longer true thanks to FV.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2465

21 years agoMinor Makefile.am fix (doesn't actually change behaviour, because automake's
Nicholas Nethercote [Sat, 10 Jul 2004 16:11:00 +0000 (16:11 +0000)] 
Minor Makefile.am fix (doesn't actually change behaviour, because automake's
default rules meant 'execve' was being built anyway... but the fix at least
avoids confusion).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2464

21 years agoDon't force tool redzones to be multiples of 8.
Nicholas Nethercote [Sat, 10 Jul 2004 16:01:52 +0000 (16:01 +0000)] 
Don't force tool redzones to be multiples of 8.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2463

21 years agoFix for bug #78048.
Nicholas Nethercote [Sat, 10 Jul 2004 14:56:28 +0000 (14:56 +0000)] 
Fix for bug #78048.

Problem was that the malloc-replacing tools (memcheck, addrcheck, massif,
helgrind) would assert if a too-big malloc was attempted.  Now they return 0 to
the client.  I also cleaned up the code handling heap-block-metadata in Massif
and Addrcheck/Memcheck a little.

This exposed a nasty bug in VG_(client_alloc)() which wasn't checking if
find_map_space() was succeeding before attempting an mmap().  Before I added
the check, very big mallocs (eg 2GB) for Addrcheck were overwriting the client
space at address 0 and causing crashes.

Added a regtest to all the affected skins for this.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2462

21 years agoFixed --sloppy-malloc and --trace-malloc, debugging options that I broke a
Nicholas Nethercote [Sat, 10 Jul 2004 13:56:19 +0000 (13:56 +0000)] 
Fixed --sloppy-malloc and --trace-malloc, debugging options that I broke a
while back (sorry).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2461

21 years agoOnly print a warning about not having identified the cache if we have
Tom Hughes [Wed, 7 Jul 2004 07:16:14 +0000 (07:16 +0000)] 
Only print a warning about not having identified the cache if we have
actually failed to recognise it...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2460

21 years agominor
Nicholas Nethercote [Tue, 6 Jul 2004 22:46:41 +0000 (22:46 +0000)] 
minor

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2459

21 years agoCompletely overhauled Cachegrind's data structures. With the new
Nicholas Nethercote [Tue, 6 Jul 2004 21:54:20 +0000 (21:54 +0000)] 
Completely overhauled Cachegrind's data structures.  With the new
scheme, there are two main structures:

1. The CC table holds a cost centre (CC) for every distinct source code
   line, as found using debug/symbol info.  It's arranged by files, then
   functions, then lines.

2. The instr-info-table holds certain important pieces of info about
   each instruction -- instr_addr, instr_size, data_size, its line-CC.
   A pointer to the instr's info is passed to the simulation functions,
   which is shorter and quicker than passing the pieces individually.

This is nice and simple.  Previously, there was a single data structure
(the BBCC table) which mingled the two purposes (maintaining CCs and
caching instruction info).  The CC stuff was done at the level of
instructions, and there were different CC types for different kinds of
instructions, and it was pretty yucky.  The two simple data structures
together are much less complex than the original single data structure.

As a result, we have the following general improvements:

- Previously, when code was unloaded all its hit/miss counts were stuck
  in a single "discard" CC, and so that code would not be annotated.  Now
  this code is profiled and annotatable just like all other code.

- Source code size is 27% smaller.  cg_main.c is now 1472 lines, down
  from 2174.  Some (1/3?) of this is from removing the special handling
  of JIFZ and general compaction, but most is from the data structure
  changes.  Happily, a lot of the removed code was nasty.

- Object code size (vgskin_cachegrind.so) is 15% smaller.

- cachegrind.out.pid size is about 90+% smaller(!)  Annotation time is
  accordingly *much* faster.  Doing cost-centres at the level of source
  code lines rather than instructions makes a big difference, since
  there's typically 2--3 instructions per source line.  Even better,
  when debug info is not present, entire functions (and even files) get
  collapsed into a single "???" CC.  (This behaviour is no different
  to what happened before, it's just the collapsing used to occur in the
  annotation script, rather than within Cachegrind.)  This is a huge win
  for stripped libraries.

- Memory consumption is about 10--20% less, due to fewer CCs.

- Speed is not much changed -- the changes were not in the intensive
  parts, so the only likely change is a cache improvement due to using
  less memory.  SPEC experiments go -3 -- 10% faster, with the "average"
  being unchanged or perhaps a tiny bit faster.

I've tested it reasonably thoroughly, it seems extremely similar result
as the old version, which is highly encouraging.  (The results aren't
quite the same, because they are so sensitive to memory layout;  even
tiny changes to Cachegrind affect the results slightly.)

Some particularly nice changes that happened:

- No longer need an instrumentation prepass;  this is because CCs are not
  stored grouped by BB, and they're all the same size now.  (This makes
  various bits of code much simpler than before).

- The actions to take when a BB translation is discarded (due to the
  translation table getting full) are much easier -- just chuck all the
  instr-info nodes for the BB, without touching the CCs.

- Dumping the cachegrind.out.pid file at the end is much simpler, just
  because the CC data structure is much neater.

Some other, specific changes:

- Removed the JIFZ special handling, which never did what it was
  intended to do and just complicated things.  This changes the results
  for REP-prefixed instructions very slightly, but it's not important.

- Abbreviated the FP/MMX/SSE crap by being slightly laxer with size
  checking -- not an issue, since this checking was just a pale
  imitation of the stricter checking done in codegen anyway.

- Removed "fi" and "fe" handling from cg_annotate, no longer needed due
  to neatening of the CC-table.

- Factorised out some code a bit, so fewer monolithic slabs,
  particularly in SK_(instrument)().

- Just improved formatting and compacted code in general in various
  places.

- Removed the long-commented-out sanity checking code at the bottom.

Phew.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2458

21 years agoRemove unused variable.
Nicholas Nethercote [Sat, 3 Jul 2004 20:27:39 +0000 (20:27 +0000)] 
Remove unused variable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2457

21 years agoFix meaningless typo.
Nicholas Nethercote [Fri, 2 Jul 2004 15:28:34 +0000 (15:28 +0000)] 
Fix meaningless typo.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2456

21 years agoClarify that you can also iterate from the result of a SkipList_Find.
Jeremy Fitzhardinge [Fri, 2 Jul 2004 00:22:36 +0000 (00:22 +0000)] 
Clarify that you can also iterate from the result of a SkipList_Find.
(Comment change only)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2455

21 years agoCouple of clarifying comments about skip lists. (Comment change only)
Nicholas Nethercote [Thu, 1 Jul 2004 12:21:03 +0000 (12:21 +0000)] 
Couple of clarifying comments about skip lists. (Comment change only)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2454

21 years agoFix confusing and wrong comment in definition of live ranges in
Julian Seward [Thu, 1 Jul 2004 11:38:36 +0000 (11:38 +0000)] 
Fix confusing and wrong comment in definition of live ranges in
reg-alloc.  (Comment change only).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2453