]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
23 years agoImplement syslog() (Bill Nottingham)
Julian Seward [Fri, 10 May 2002 22:58:14 +0000 (22:58 +0000)] 
Implement syslog()  (Bill Nottingham)

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

23 years agoEven more shmctl fixings from Reuben.
Julian Seward [Fri, 10 May 2002 22:51:26 +0000 (22:51 +0000)] 
Even more shmctl fixings from Reuben.

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

23 years agoKernel 2.4 / glibc 2.2.X build fixes for recent startup changes.
Julian Seward [Fri, 10 May 2002 22:31:40 +0000 (22:31 +0000)] 
Kernel 2.4 / glibc 2.2.X build fixes for recent startup changes.

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

23 years agoNew and hopefully more reliable method for finding argc/argv/envp at
Julian Seward [Fri, 10 May 2002 21:07:22 +0000 (21:07 +0000)] 
New and hopefully more reliable method for finding argc/argv/envp at
startup, by looking for the ELF frame created on the process' stack
at startup.  This avoids having to deal with problems caused by glibc
magic offsets.

WARNING: only works for 2.2 kernels right now.  2.4 is broken.

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

23 years agoModify the startup mechanism so that any call into valgrind's libpthread.so
Julian Seward [Fri, 10 May 2002 21:03:56 +0000 (21:03 +0000)] 
Modify the startup mechanism so that any call into valgrind's libpthread.so
will start up valgrind if it is not already running.  This more or less
sidesteps the problem that sometimes valgrind.so isn't init'd first by
the dynamic linker.

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

23 years agoImplement __NR_personality.
Julian Seward [Fri, 10 May 2002 21:01:34 +0000 (21:01 +0000)] 
Implement __NR_personality.

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

23 years agoSupport _m_kind == PTHREAD_MUTEX_FAST_NP for mutexes. This was stopping
Julian Seward [Fri, 10 May 2002 21:00:19 +0000 (21:00 +0000)] 
Support _m_kind == PTHREAD_MUTEX_FAST_NP for mutexes.  This was stopping
mutexes working properly on Red Hat 6.2.

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

23 years agoFix confusing bug in printing of trace info for mutex_{try}lock.
Julian Seward [Fri, 10 May 2002 20:26:37 +0000 (20:26 +0000)] 
Fix confusing bug in printing of trace info for mutex_{try}lock.
Add a couple of other handy debug printings.

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

23 years agoInsert hacks, only partially successful, to make 'make distcheck' work
Julian Seward [Fri, 10 May 2002 03:03:57 +0000 (03:03 +0000)] 
Insert hacks, only partially successful, to make 'make distcheck' work
with the new vg_libpthread.vs linker script.  Problem is that builds
where builddir != srcdir don't work now.  Don't know how to fix.

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

23 years ago---> 20020510
Julian Seward [Fri, 10 May 2002 02:36:18 +0000 (02:36 +0000)] 
---> 20020510

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

23 years agoReturn zero to the *parent* thread when pthread_create succeeds.
Julian Seward [Fri, 10 May 2002 02:16:19 +0000 (02:16 +0000)] 
Return zero to the *parent* thread when pthread_create succeeds.
Only showed up on Red Hat 6.2.  Dunno how pth_create ever worked before.

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

23 years agoMore symbol versioning stuff
Julian Seward [Fri, 10 May 2002 01:52:58 +0000 (01:52 +0000)] 
More symbol versioning stuff

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

23 years agoAdd a version script so as to create the right versioned symbols for
Julian Seward [Fri, 10 May 2002 01:42:33 +0000 (01:42 +0000)] 
Add a version script so as to create the right versioned symbols for
libpthread.so.

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

23 years agoBuild fixes for Red Hat 6.2.
Julian Seward [Fri, 10 May 2002 00:46:59 +0000 (00:46 +0000)] 
Build fixes for Red Hat 6.2.

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

23 years agoMore IOCTL futzing from Reuben Thomas.
Julian Seward [Thu, 9 May 2002 18:40:45 +0000 (18:40 +0000)] 
More IOCTL futzing from Reuben Thomas.

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

23 years agoMinor ioctl fixes from Reuben Thomas.
Julian Seward [Thu, 9 May 2002 17:56:57 +0000 (17:56 +0000)] 
Minor ioctl fixes from Reuben Thomas.

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

23 years agoMake sense of, and clean up, shmctl wrapper. (Reuben Thomas).
Julian Seward [Thu, 9 May 2002 17:45:06 +0000 (17:45 +0000)] 
Make sense of, and clean up, shmctl wrapper.  (Reuben Thomas).

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

23 years agoRemove valgrind's use of libc-supplied stat() and sbrk(). Now the only
Julian Seward [Thu, 9 May 2002 17:38:13 +0000 (17:38 +0000)] 
Remove valgrind's use of libc-supplied stat() and sbrk().  Now the only
sysbols we need from libc are __umoddi3 and __udivdi3 ; other than that
valgrind.so is completely self-contained.

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

23 years agoMinor corrections about cache profiling cost centres.
Nicholas Nethercote [Thu, 9 May 2002 15:43:33 +0000 (15:43 +0000)] 
Minor corrections about cache profiling cost centres.

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

23 years agoReinstate a condition in the IPCOP_shmctl wrapper without which the
Julian Seward [Thu, 9 May 2002 12:01:14 +0000 (12:01 +0000)] 
Reinstate a condition in the IPCOP_shmctl wrapper without which the
system dies to the recently-rejuvenated
first-and-last-secondaries-look-plausible assertions around syscalls.

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

23 years agoFix assertions.
Julian Seward [Thu, 9 May 2002 11:03:57 +0000 (11:03 +0000)] 
Fix assertions.

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

23 years ago---> 20020509
Julian Seward [Thu, 9 May 2002 02:38:18 +0000 (02:38 +0000)] 
---> 20020509

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

23 years agoFix off-by-one error in definition of MAX_LINENO and MAX_LOC_SIZE.
Julian Seward [Thu, 9 May 2002 01:32:57 +0000 (01:32 +0000)] 
Fix off-by-one error in definition of MAX_LINENO and MAX_LOC_SIZE.

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

23 years agoYesterday's push/pop merging optimisations break the cache profiler:
Julian Seward [Wed, 8 May 2002 21:26:01 +0000 (21:26 +0000)] 
Yesterday's push/pop merging optimisations break the cache profiler:
    vg_cachesim.c:536 (vgPlain_cachesim_instrument):
    Assertion `instr_size >= 1 && instr_size <= 16' failed.
so disable them when cache profiling.

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

23 years agoChange _pthread_cleanup_push and _pthread_cleanup_pop into no-ops
Julian Seward [Wed, 8 May 2002 14:08:22 +0000 (14:08 +0000)] 
Change _pthread_cleanup_push and _pthread_cleanup_pop into no-ops
rather than aborts.

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

23 years agoDo __pthread_initialize.
Julian Seward [Wed, 8 May 2002 02:01:14 +0000 (02:01 +0000)] 
Do __pthread_initialize.

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

23 years agoComplain about NVidia's libGL.so also when an 0x8C opcode is encountered.
Julian Seward [Wed, 8 May 2002 01:58:18 +0000 (01:58 +0000)] 
Complain about NVidia's libGL.so also when an 0x8C opcode is encountered.

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

23 years agoImplement SBB Ib, AL.
Julian Seward [Wed, 8 May 2002 01:44:03 +0000 (01:44 +0000)] 
Implement SBB Ib, AL.

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

23 years agoDo LODSW / LODSL. (Sami Farin)
Julian Seward [Wed, 8 May 2002 01:38:43 +0000 (01:38 +0000)] 
Do LODSW / LODSL.  (Sami Farin)

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

23 years agoMore shmctl() fixes. (Helge Deller)
Julian Seward [Wed, 8 May 2002 01:31:15 +0000 (01:31 +0000)] 
More shmctl() fixes. (Helge Deller)

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

23 years ago--> 20020508
Julian Seward [Wed, 8 May 2002 01:29:53 +0000 (01:29 +0000)] 
--> 20020508

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

23 years agoOnly show the giant-basic-block message at verbosity >= 2.
Julian Seward [Wed, 8 May 2002 00:42:25 +0000 (00:42 +0000)] 
Only show the giant-basic-block message at verbosity >= 2.

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

23 years agoImprovements to the error-collecting machinery:
Julian Seward [Wed, 8 May 2002 00:32:50 +0000 (00:32 +0000)] 
Improvements to the error-collecting machinery:

- Don't waste a potentially huge amount of time calling describe_addr
  on addresses in errors we aren't going to show.

- If an invalid address is just below %ESP, say that it might be due
  to a gcc bug.  Increase the window in which this is allowed to
  1024 bytes below %ESP.

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

23 years agoActually call VG_(first_and_last_secondaries_look_plausible) and make
Julian Seward [Tue, 7 May 2002 23:45:03 +0000 (23:45 +0000)] 
Actually call VG_(first_and_last_secondaries_look_plausible) and make
assertions about the return value, rather than asserting the
non-NULL-ness of the function's address :) Classic beginner's mistake,
compounded by C's crappy (non-existent) type system, which allows me
to silently confuse Bool with Pointer-to-Function.  What a great
programming language.  Come back Haskell, all is forgiven.

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

23 years agoGenerate better ucode for back-to-back sequences of register pushes and
Julian Seward [Tue, 7 May 2002 23:38:30 +0000 (23:38 +0000)] 
Generate better ucode for back-to-back sequences of register pushes and
pops, as appear at function prologues/epilogues.  Specifically, update %ESP
just once for the whole sequence.  This reduces by about 20% the number
of calls to handle_esp_assignment (for kate in KDE 3.0, -O), which is a
good thing since that is quite expensive.

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

23 years agovg_symtab2.c:
Nicholas Nethercote [Tue, 7 May 2002 10:26:57 +0000 (10:26 +0000)] 
vg_symtab2.c:
    - No longer aborting when encountering a N_SOL symbol after the 65535th
      line in a file, just printing a warning/apology that annotations/messages
      might be wrong.

      This is a pain to fix properly, since it requires first guessing when a
      line number overflow happens, then switching to one or more other files,
      then switching back.

manual: wibble

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

23 years agoMinor profiling improvements. Add a couple of cost centers.
Julian Seward [Tue, 7 May 2002 09:25:30 +0000 (09:25 +0000)] 
Minor profiling improvements.  Add a couple of cost centers.

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

23 years ago---> 20020305b
Julian Seward [Sat, 4 May 2002 19:49:49 +0000 (19:49 +0000)] 
---> 20020305b

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

23 years agoFix from Lionel Ulmer to not have an infinite loop/stack overflow
Julian Seward [Sat, 4 May 2002 19:49:21 +0000 (19:49 +0000)] 
Fix from Lionel Ulmer to not have an infinite loop/stack overflow
with sigaction on glibc 2.1.3.

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

23 years agoFix really stupid use of uninitialised value introduced in rev 1.8.
Julian Seward [Sat, 4 May 2002 12:59:03 +0000 (12:59 +0000)] 
Fix really stupid use of uninitialised value introduced in rev 1.8.
Basically this bug invalidates all snapshots from 0501 until now.

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

23 years agoglibc 2.1.3 compile fixes (Lionel Ulmer).
Julian Seward [Sat, 4 May 2002 10:28:17 +0000 (10:28 +0000)] 
glibc 2.1.3 compile fixes (Lionel Ulmer).

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

23 years agoExternal namespace cleanup.
Julian Seward [Fri, 3 May 2002 22:29:04 +0000 (22:29 +0000)] 
External namespace cleanup.

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

23 years ago---> 20020503
Julian Seward [Fri, 3 May 2002 21:29:55 +0000 (21:29 +0000)] 
---> 20020503

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

23 years agoImplement sched_setparam(), sched_getparam() and sched_yield()
Julian Seward [Fri, 3 May 2002 21:18:11 +0000 (21:18 +0000)] 
Implement sched_setparam(), sched_getparam() and sched_yield()
(Helge Deller)

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

23 years agoImplement chroot(). (Paul Fox)
Julian Seward [Fri, 3 May 2002 21:07:55 +0000 (21:07 +0000)] 
Implement chroot().  (Paul Fox)

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

23 years agoFrom: Tom Hughes <thh@i'm sure he doesn't want to be spammed.com>
Julian Seward [Fri, 3 May 2002 21:01:35 +0000 (21:01 +0000)] 
From: Tom Hughes <thh@i'm sure he doesn't want to be spammed.com>

The attached patch improves the validation done on sockaddr structures
passed to systems calls by extending the existing code for AF_UNIX to
cover AF_INET and AF_INET6 as well so that errors are not raised when
an unused part of the sockaddr structure is not filled in.

It also applies this new code to bind and sendto as well as connect.

Tom

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

23 years agoImprove accuracy of simulation of bsf/bsr instructions when the word
Julian Seward [Fri, 3 May 2002 20:52:53 +0000 (20:52 +0000)] 
Improve accuracy of simulation of bsf/bsr instructions when the word
being scanned is zero.  (Zoltan Hidvegi)

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

23 years agoVarious cleanups following earlier exit fixes. Also add boilerplate
Julian Seward [Fri, 3 May 2002 20:43:10 +0000 (20:43 +0000)] 
Various cleanups following earlier exit fixes.  Also add boilerplate
copyright notices.

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

23 years agoChange the way Valgrind exits.
Julian Seward [Fri, 3 May 2002 19:09:05 +0000 (19:09 +0000)] 
Change the way Valgrind exits.

Until now, valgrind waited for ld.so to call the .fini code in
valgrind.so, and took this as its cue to switch back to the real CPU
for the rest of the journey.

This is a problem if ld.so subsequently calls other .so's .fini code
and threading is in use, because they do pthread_* calls which cannot
be handled by valgrind's libpthread.so without valgrind actually being
active.

So we ignore the call to valgrind's .fini code, and run the program
all the way up to the point where it calls syscall exit() to
disappear.  This makes the order in which the .fini sections are run
irrelevant, since Valgrind has control during all of them, and so
threading facilities are still available for all of them.

This change means Mozilla 1.0RC1 now exits a lot more cleanly than it
did.

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

23 years agoReduce TT size to 32M (was 40M for Mozilla's benefit). 40 M is just
Julian Seward [Fri, 3 May 2002 18:59:21 +0000 (18:59 +0000)] 
Reduce TT size to 32M (was 40M for Mozilla's benefit).  40 M is just
ridiculous overkill for most "normal" apps.

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

23 years agoRemoved description of cachegrind.out file format, since it's now in the tech
Nicholas Nethercote [Fri, 3 May 2002 17:54:51 +0000 (17:54 +0000)] 
Removed description of cachegrind.out file format, since it's now in the tech
docs.

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

23 years agoAdded section to tech docs on how cachegrind works, including the
Nicholas Nethercote [Fri, 3 May 2002 17:51:10 +0000 (17:51 +0000)] 
Added section to tech docs on how cachegrind works, including the
cachegrind.out file format.

Tiny change in user manual.

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

23 years agovg_symtab2.c:
Nicholas Nethercote [Fri, 3 May 2002 16:41:05 +0000 (16:41 +0000)] 
vg_symtab2.c:
    - Can now handle file sizes > 65536 lines, despite the stabs format only
      storing line numbers in a short.  Do this heuristically, by looking for
      line number sequences that go from 65000-odd to 0-odd within the same
      file.

      This required changing the RiLoc.lineno field to 20 bytes, which gives a
      maximum file length of 1,000,000-odd lines, whichs seems reasonable.

      In order to keep RiLoc at 12 bytes (important because there are lots of
      them) this required stealing four bits from the RiLoc.size field,
      reducing it to 12 bits.  This isn't too bad because the size is unlikely
      to be larger than 4096 bytes -- we were already ignoring any ones larger
      than 10,000 bytes because they were suspicious anyway (and see next
      point).

    - Tightened up the sanity checking on line address ranges.  Previously any
      range that looked suspicious (eg. > 10000 bytes, or not within the bound
      of the segment info) was simply ignored(!)  Now it prints a warning when
      this happens and truncates the size to 1 to be safe;  also there are some
      extra assertions for totally space-cadet numbers.

      (At first these checks were all assertions, but I tried a version of GNU
      gas that produces a small handful of dodgy stabs entries;  warnings
      seemed a reasonable compromise.)

vg_cachesim.c:
    - Removed the requirement that both types of cost centre (iCC, idCC) have
      instr_addr as their second word.  Less fragile -- now the only
      requirement is that they both have their type tag as their first byte.

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

23 years agoAdded "L2 refs line" (an oversight).
Nicholas Nethercote [Thu, 2 May 2002 13:56:34 +0000 (13:56 +0000)] 
Added "L2 refs line" (an oversight).
Fixed minor output summary spacing wibble.

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

23 years agoRemove comments about Mozilla 1.0RC1 crashing, since that's not a Valgrind
Julian Seward [Thu, 2 May 2002 03:57:00 +0000 (03:57 +0000)] 
Remove comments about Mozilla 1.0RC1 crashing, since that's not a Valgrind
bug, and explain, for the benefit of Mozilla hackers, how to make 1.0RC1
work on Valgrind.

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

23 years ago---> 20020502
Julian Seward [Thu, 2 May 2002 03:47:32 +0000 (03:47 +0000)] 
---> 20020502

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

23 years agoJack up the size of the translation cache from 16 MB to 40 MB (!).
Julian Seward [Thu, 2 May 2002 03:47:01 +0000 (03:47 +0000)] 
Jack up the size of the translation cache from 16 MB to 40 MB (!).
This is needed to give reasonable behaviour for the insanity of a
Mozilla debug build, apparently even worse than the insanity of a
KDE 3 debug build.  Change some limit calculations to use double
rather than int, so as to avoid overflows.

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

23 years agoImprove my implementations of strcmp() and memcpy() since Nick's profiler
Julian Seward [Wed, 1 May 2002 23:05:12 +0000 (23:05 +0000)] 
Improve my implementations of strcmp() and memcpy() since Nick's profiler
indicates that KDE apps spend 20% of their simulated insns in these two
functions alone.

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

23 years agofix for auto-annotating C++ method names (they have :'s in it)
Dirk Mueller [Wed, 1 May 2002 21:52:05 +0000 (21:52 +0000)] 
fix for auto-annotating C++ method names (they have :'s in it)

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

23 years agoFix free and free-mismatch err so the top frame in the bt isn't skipped.
Julian Seward [Wed, 1 May 2002 21:46:38 +0000 (21:46 +0000)] 
Fix free and free-mismatch err so the top frame in the bt isn't skipped.
Put a better example of free-mismatch error in the manual.

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

23 years agoBring manual up-to-date and add stuff about pthread support.
Julian Seward [Wed, 1 May 2002 12:38:06 +0000 (12:38 +0000)] 
Bring manual up-to-date and add stuff about pthread support.

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

23 years ago---> 20020501
Julian Seward [Wed, 1 May 2002 12:37:24 +0000 (12:37 +0000)] 
---> 20020501

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

23 years agoChange "argh" to something more confidence-inspiring.
Julian Seward [Wed, 1 May 2002 09:25:56 +0000 (09:25 +0000)] 
Change "argh" to something more confidence-inspiring.

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

23 years agoAdded N_GSYM case to stabs handler.
Nicholas Nethercote [Wed, 1 May 2002 08:25:03 +0000 (08:25 +0000)] 
Added N_GSYM case to stabs handler.

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

23 years agoEnsure that values returned to the client from pthread operations are
Julian Seward [Wed, 1 May 2002 03:24:23 +0000 (03:24 +0000)] 
Ensure that values returned to the client from pthread operations are
marked as defined, so as to avoid spurious uninit-value errors.

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

23 years agoDon't want to see these guys with just -v. There get to be bazillions
Julian Seward [Wed, 1 May 2002 02:32:10 +0000 (02:32 +0000)] 
Don't want to see these guys with just -v.  There get to be bazillions
of them after a while.

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

23 years agoIncrease default thread stack size to 64k and institute crude
Julian Seward [Wed, 1 May 2002 02:28:01 +0000 (02:28 +0000)] 
Increase default thread stack size to 64k and institute crude
overflow checks in scheduler_sanity().

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

23 years agoReinstate use of VG_(do_sanity_checks), although at a lower frequency
Julian Seward [Wed, 1 May 2002 01:58:35 +0000 (01:58 +0000)] 
Reinstate use of VG_(do_sanity_checks), although at a lower frequency
than before.  Turns out they were wasting 25-50% of total execution
time in valgrinds of the 200203XX vintage.  Apologies, KDE hackers!

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

23 years agoBuild and install 'cachegrind' along with 'valgrind'.
Julian Seward [Wed, 1 May 2002 01:25:45 +0000 (01:25 +0000)] 
Build and install 'cachegrind' along with 'valgrind'.

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

23 years agoEdit cache stuff, minorly.
Julian Seward [Wed, 1 May 2002 01:24:52 +0000 (01:24 +0000)] 
Edit cache stuff, minorly.

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

23 years agoWeaken assertion on calloc.
Julian Seward [Wed, 1 May 2002 00:10:28 +0000 (00:10 +0000)] 
Weaken assertion on calloc.

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

23 years agoAdd debugging hooks, currently disabled.
Julian Seward [Wed, 1 May 2002 00:05:27 +0000 (00:05 +0000)] 
Add debugging hooks, currently disabled.

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

23 years agoFix typo to do with rwlock aliasing.
Julian Seward [Wed, 1 May 2002 00:03:16 +0000 (00:03 +0000)] 
Fix typo to do with rwlock aliasing.

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

23 years agovg_symtab2.c:
Nicholas Nethercote [Tue, 30 Apr 2002 13:44:01 +0000 (13:44 +0000)] 
vg_symtab2.c:
    Discovered sometimes a SLINE stabs entry is the last one (which broke an
    assertion).  In such a case, we must guess the line's instruction address
    range -- I've guessed 4, arbitrarily.

vg_cachegen.in, vg_cachesim_{I1,D1,L2}.c:
    Discovered a bad bug in the cache simulation:  when determining if a
    references straddles two memory blocks, to find the end of the range I was
    adding 'size' to the base address, rather than 'size - 1'.  This was
    causing way too many straddled references, which would inflate the miss
    counts.

vg_cachesim.c:
    Minor stuff

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

23 years agoAdded note about bts/btr/btc causing bogus cache read counts.
Nicholas Nethercote [Tue, 30 Apr 2002 12:46:22 +0000 (12:46 +0000)] 
Added note about bts/btr/btc causing bogus cache read counts.
Added to todo list note about files with > 65536 lines.

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

23 years agoRight-justifying event names instead of left-justifying; easier to read when
Nicholas Nethercote [Tue, 30 Apr 2002 11:34:54 +0000 (11:34 +0000)] 
Right-justifying event names instead of left-justifying;  easier to read when
large numbers are involved and the columns are wide.

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

23 years ago---> 20020430
Julian Seward [Tue, 30 Apr 2002 11:12:00 +0000 (11:12 +0000)] 
---> 20020430

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

23 years agoMake pthread_mutexattr_setkind_np be an alias of__pthread_mutexattr_settype.
Julian Seward [Tue, 30 Apr 2002 10:20:10 +0000 (10:20 +0000)] 
Make pthread_mutexattr_setkind_np be an alias of__pthread_mutexattr_settype.

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

23 years agoRelax assertion to avoid this: vg_cachesim.c:402
Julian Seward [Tue, 30 Apr 2002 10:18:48 +0000 (10:18 +0000)] 
Relax assertion to avoid this: vg_cachesim.c:402
(compute_BBCC_array_size): Assertion `!is_STORE && !is_FPU_R &&
!is_FPU_W' failed.

I don't know if this is correct, but I can run kate having done so.

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

23 years agovg_improve() -- the ucode optimiser: consistently apply the
Julian Seward [Tue, 30 Apr 2002 00:29:36 +0000 (00:29 +0000)] 
vg_improve() -- the ucode optimiser: consistently apply the
no-deferred-updates of %ESP rule, regardless of end use of the ucode.
This seems more consistent, and was exposed following examination of
code causing an assertion failure in the cache profiler.  Added an
assertion to check this too, and was surprised I hadn't had an
assertion there in the first place.

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

23 years agoConfig/build/install vg_annotate and vg_cachegen correctly.
Julian Seward [Mon, 29 Apr 2002 17:27:07 +0000 (17:27 +0000)] 
Config/build/install vg_annotate and vg_cachegen correctly.

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

23 years agoNew files:
Nicholas Nethercote [Mon, 29 Apr 2002 16:03:24 +0000 (16:03 +0000)] 
New files:
  - vg_cachesim.c
  - vg_cachesim_{I1,D1,L2}.c
  - vg_annotate.in
  - vg_cachegen.in

Changes to existing files:

  - valgrind/valgrind.in, added option:

        --cachesim=no|yes       [no]

  - Makefile/Makefile.am:
        * added vg_cachesim.c to valgrind_so_SOURCES var
        * added vg_cachesim_I1.c, vg_cachesim_D1.c, vg_cachesim_L2.c to
          noinst_HEADERS var
        * added vg_annotate, vg_cachegen to 'bin_SCRIPTS' var, and added empty
          targets for them

  - vg_main.c:
        * added two offsets for cache sim functions (put in positions 17a,17b)
        * added option handling (detection of --cachesim=yes which turns off of
          --instrument);
        * added calls to cachesim initialisation/finalisation functions

  - vg_mylibc: added some system call wrappers (for chmod, open_write, etc) for
    file writing

  - vg_symtab2.c:
        * allow it to read symbols if either of --instrument or --cachesim is
          used
        * made vg_symtab2.c:vg_what_{line,fn}_is_this extern, renaming it as
          VG_(what_line_is_this) (and added to vg_include.h)
        * completely rewrote the read loop in vg_read_lib_symbols, fixing
          several bugs.  Much better now, although probably not perfect.  It's
          also relatively fragile -- I'm using the "die immediately if anything
          unexpected happens" approach.

  - vg_to_ucode.c:
        * in VG_(disBB), patching in x86 instruction size into extra4b field of
          JMP instructions at the end of basic blocks if --cachesim=yes.
          Shifted things around to do this;  also had to fiddle around with
          single-step stuff to get this to work, by not sticking extra JMPs on
          the end of the single-instruction block if there was already one
          there (to avoid breaking an assertion in vg_cachesim.c).  Did a
          similar thing to avoid an extra JMP on huge basic blocks that are
          split.

  - vg_translate.c:
        * if --cachesim=yes call the cachesim instrumentation phase
        * made some functions extern and renamed:
                allocCodeBlock() --> VG_(allocCodeBlock)()
                freeCodeBlock()  --> VG_(freeCodeBlock)()
                copyUInstr()     --> VG_(copyUInstr)()
          (added to vg_include.h too)

  - vg_include.c: declared
        * cachesim offsets
        * exports of vg_cachesim.c
        * added four new profiling events (increasing VGP_M_CCS to 24 -- I kept
          the spare ones)
        * added comment about UInstr.extra4b field being used for instr size in
          JMPs for cache simulation

  - docs/manual.html:
        * Added --cachesim option to section 2.5.
        * Added cache profiling stuff as section 7.

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

23 years ago---> 20020429
Julian Seward [Mon, 29 Apr 2002 12:39:17 +0000 (12:39 +0000)] 
---> 20020429

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

23 years agoFix really stupid error in computation of timeout point in nonblocking
Julian Seward [Mon, 29 Apr 2002 12:20:34 +0000 (12:20 +0000)] 
Fix really stupid error in computation of timeout point in nonblocking
poll().  After this change, Mozilla-0.9.2.1 and Galeon 0.11.3 finally
behave reasonably on my box.

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

23 years agoFix a subtle (?) bug in sched_do_syscall to with read/write calls for
Julian Seward [Mon, 29 Apr 2002 01:58:08 +0000 (01:58 +0000)] 
Fix a subtle (?) bug in sched_do_syscall to with read/write calls for
which the client has already got the fd in nonblocking mode.  In such
cases, do not wait for an IO completion -- since the client presumably
handles that somehow.

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

23 years agoCDROM ioctls. (Lionel Ulmer)
Julian Seward [Sat, 27 Apr 2002 02:28:19 +0000 (02:28 +0000)] 
CDROM ioctls.  (Lionel Ulmer)

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

23 years agoioctls for /dev/rtc (Fredrik Kuivinen)
Julian Seward [Sat, 27 Apr 2002 02:20:14 +0000 (02:20 +0000)] 
ioctls for /dev/rtc (Fredrik Kuivinen)

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

23 years agoAdd __NR_getpriority (Richard Boulton).
Julian Seward [Sat, 27 Apr 2002 02:13:24 +0000 (02:13 +0000)] 
Add __NR_getpriority (Richard Boulton).

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

23 years agoUse safe_dereference in IPCOP_msgrcv. (Tom Hughes)
Julian Seward [Sat, 27 Apr 2002 02:06:15 +0000 (02:06 +0000)] 
Use safe_dereference in IPCOP_msgrcv.  (Tom Hughes)

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

23 years agoDo __NR_sched_get_priority_min and __NR_setpriority (Cody Russell).
Julian Seward [Sat, 27 Apr 2002 01:56:30 +0000 (01:56 +0000)] 
Do __NR_sched_get_priority_min and __NR_setpriority (Cody Russell).

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

23 years agoAllow apparently invalid keys in libc_internal_tsd_{get,set}. This
Julian Seward [Sat, 27 Apr 2002 01:35:38 +0000 (01:35 +0000)] 
Allow apparently invalid keys in libc_internal_tsd_{get,set}.  This
allows koffice-1.2beta1 to work.

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

23 years agohandle_signal_return: when a waiting read/write syscall is interrupted
Julian Seward [Fri, 26 Apr 2002 22:47:57 +0000 (22:47 +0000)] 
handle_signal_return: when a waiting read/write syscall is interrupted
by a signal which has been set to non-SARESTART, clean up the waiting_fds
table correctly.

xemacs (cvs, --pdump only) now works.  Yay!

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

23 years agoFix more stuff broken by recent exported-symbol hackery.
Julian Seward [Fri, 26 Apr 2002 21:01:13 +0000 (21:01 +0000)] 
Fix more stuff broken by recent exported-symbol hackery.

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

23 years agoFinish first pass of the symbols cleanup. Only versioned symbols remain
Julian Seward [Fri, 26 Apr 2002 14:31:40 +0000 (14:31 +0000)] 
Finish first pass of the symbols cleanup.  Only versioned symbols remain
to do.

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

23 years agoAdministrivia.
Julian Seward [Fri, 26 Apr 2002 14:30:52 +0000 (14:30 +0000)] 
Administrivia.

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

23 years agoMess around with aliases to make the exported T/D/W syms look like those
Julian Seward [Fri, 26 Apr 2002 13:25:00 +0000 (13:25 +0000)] 
Mess around with aliases to make the exported T/D/W syms look like those
of the real libpthread.so.  This is a Good Thing, despite the fact it
temporarily breaks some threaded programs.

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

23 years agoA simple script to help me ensure that my libpthread.so looks
Julian Seward [Fri, 26 Apr 2002 11:50:43 +0000 (11:50 +0000)] 
A simple script to help me ensure that my libpthread.so looks
from the outside, to the linker, identical to the original.

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

23 years agoFix many holes and bugs in an attempt to get my libpthread.so to export
Julian Seward [Fri, 26 Apr 2002 03:28:18 +0000 (03:28 +0000)] 
Fix many holes and bugs in an attempt to get my libpthread.so to export
the same set of symbols as the real one, which I now realise is crucial
for it to work at all.

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

23 years agoFix various bugs getting in the way of licq starting up.
Julian Seward [Fri, 26 Apr 2002 00:27:53 +0000 (00:27 +0000)] 
Fix various bugs getting in the way of licq starting up.

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

23 years agoTry and give at least some minimal binding for all functions exported
Julian Seward [Thu, 25 Apr 2002 20:17:29 +0000 (20:17 +0000)] 
Try and give at least some minimal binding for all functions exported
by the real libpthread.so.  In the process fix a bunch of stuff, including
adding thread-specific h_errno and resolver state storage.  This fixes
licq crashing at startup.

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