Commit Graph

4861 Commits

Author SHA1 Message Date
Julian Seward
cac8c8a1f2 Track VG_(am_find_nsegment) const-ness change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6298
2006-10-17 02:23:23 +00:00
Julian Seward
cb28dcdea2 Merge r6216:
Fix all the places where gcc complains about casts from pointers
(presumably 64 bit) to integers of different size (in this case,
32-bit int).  This makes it compile cleanly on 64-bit AIX and also
means it doesn't crash :-)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6297
2006-10-17 02:21:55 +00:00
Julian Seward
ec0dc88e98 Merge r6214 (some parts):
Futz with the estimated-translation sizes to make them more plausible [..]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6296
2006-10-17 02:21:17 +00:00
Julian Seward
c09f0d7bdb Merge from branches/AIX5:
- AIX5 support
- get rid of VG_(nanosleep)
- track SysRes changes



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6295
2006-10-17 02:16:44 +00:00
Julian Seward
12ef34f623 Track SysRes change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6294
2006-10-17 02:15:17 +00:00
Julian Seward
55f1835953 Change authorship.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6293
2006-10-17 02:11:55 +00:00
Julian Seward
ba6642f314 Final merges from branches/AIX5; mostly tracking of SysRes change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6292
2006-10-17 02:10:42 +00:00
Julian Seward
0850d32443 Merge r6217 (also comment cosmetics):
Use 'ctr' rather than 'lr' for indirect jumps, so as not to trash the
branch predictor(s) for returns from generated code.  Makes a big
difference on ppc970 (and POWER4).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6291
2006-10-17 02:08:26 +00:00
Julian Seward
cdda2b71bd Track VG_(am_find_nsegment) const-ness change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6290
2006-10-17 02:05:14 +00:00
Julian Seward
1f2fb3f158 Merge r6159 (parts of):
Minor build-system adjustments, mostly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6289
2006-10-17 02:03:11 +00:00
Julian Seward
983ded3a8e Merge r6157:
- add extra fields to ThreadOSState to make thread cancellation sort-of 
  work on AIX5

- add function VG_(count_runnable_threads)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6288
2006-10-17 02:01:12 +00:00
Julian Seward
11bd66d5d5 Merge r6156:
AIX5 support.  No changes in logic; just better factorisation of what
is already here.

- add AIX definitions for VG_UCONTEXT_INSTR_PTR et al

- add abstractions VKI_SIGINFO_si_addr and VKI_SIGINFO_si_pid
  to enable the rest of the code to be uniform

- track other minor changes: SysRes, VG_(am_find_nsegment) 
  constness, rearrangement of VG_(sigtimedwait).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6287
2006-10-17 02:00:29 +00:00
Julian Seward
f2f14c7106 Merge r6154:
Track SysRes change, and remove unused stuff in header.  Perhaps
this should be folded into m_initimg in the fullness of time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6286
2006-10-17 01:59:30 +00:00
Julian Seward
1f3fc1d2dc Merge r6153: Add client startup code for AIX5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6285
2006-10-17 01:54:54 +00:00
Julian Seward
5da1b2e810 Merge r6152: Add dummy cases for AIX5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6284
2006-10-17 01:54:20 +00:00
Julian Seward
8df1c897ec Merge r6150 and 6151:
- track SysRes changes
- add AIX support


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6283
2006-10-17 01:53:34 +00:00
Julian Seward
02adb56235 Merge r6149:
Generalise the machinery developed for function intercepts/wrapping
ppc64-linux, in which we have to deal with the big extra complexity
resulting from TOC pointers.  This generalises it to work in 32-bit
mode too.

Add helpers to deal with AIX stack redzones.

Track VG_(am_find_nsegment) constness change and other minor 
changes to the m_aspacemgr interface.

(All platforms): use the new VexMiscInfo structure to tell VEX about
host and guest ABI conventions.

This module could do with further tidying up and documentation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6282
2006-10-17 01:52:05 +00:00
Julian Seward
7e03fb712e Merge r6148:
Minor adjustments to the scheduler, mostly cosmetic.

- rename VG_(kill_thread) to VG_(get_thread_out_of_syscall), which
  is what it actually does.

- Remove 'semaphore' terminology in places and use 'lock' instead.

- Give an extra 'HChar* who' arg to VG_(set_running) and 
  VG_(set_sleeping), which is printed when --trace-sched=yes.
  This makes it easier to make sense of lock ownership changes
  from the debug output.

- various other improvements to debug printing

- add a kludge to encourage the AIX scheduler to switch threads
  more often when more than one is runnable (am not claiming to 
  understand this); otherwise CPU starvation can appear to happen

- more assertions in sema.c (the pipe-based lock); cycle the token
  through 'A' to 'Z' to make strace/truss output more understandable;
  fix longstanding bug wherein sema_down() tries to read two bytes
  even though sema_up only writes one.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6281
2006-10-17 01:51:24 +00:00
Julian Seward
b4f22c7bf9 Merge r6146:
Generally tidy up, and add bindings for both gcc and xlc's C/C++
libraries on AIX.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6280
2006-10-17 01:50:31 +00:00
Julian Seward
68452584af Merge r6143: Deal with ppc{32,64}-aix5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6279
2006-10-17 01:49:50 +00:00
Julian Seward
dbe5eabe5c Merge r6142:
Minor enhancements, including dealing with 6-digit PIDs, dealing with
object names of the form "foo.a(bar.o)", and removing debuglog level
zero output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6278
2006-10-17 01:48:41 +00:00
Julian Seward
87030e41e2 Merge r6141: Update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6277
2006-10-17 01:48:02 +00:00
Julian Seward
bbe7f55813 Merge r6140 (some of):
- track SysRes changes

- track VG_(am_find_nsegment) const-ness change

- increase number of client syscall args supported from 6 to 8

- simplify type SyscallStatus.  Simply hold a copy of the SysRes
  for the syscall rather than have this be a data structure
  incorporating something very similar to the fields of a SysRes,
  and more besides.  Change various macros in priv_types_n_macros.h
  to match.

- syswrap-main.c: instantiate the various impedance-matching
  functions for AIX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6276
2006-10-17 01:47:30 +00:00
Julian Seward
ff7968b2c1 Merge r6139:
- Minor changes for mpxlc

- kludge; add option "initkludge" to cause PMPI_Init to return
  &mpiwrap_walk_type_EXTERNALLY_VISIBLE
  and adjust mpiwrap_type_test.c accordingly

and also add an export script so that libmpiwrap.so is built
correctly on AIX5 (r????).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6275
2006-10-17 01:46:55 +00:00
Julian Seward
95ef240080 Merge r6138:
Convert some VG_ names (global visibility) into ML_s (module scope).

and also handle Z-encoded 'ZL' == (   and 'ZR' == )
for intercept/wrapper fn names



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6274
2006-10-17 01:44:36 +00:00
Julian Seward
78cd9b9a70 Merge r6136:
Track SysRes change; support bigpage allocation on AIX; make the
client-arena superblocks much bigger on AIX.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6273
2006-10-17 01:42:40 +00:00
Julian Seward
7044edf2eb This should have been part of r6271.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6272
2006-10-17 01:42:00 +00:00
Julian Seward
2da78eb433 Merge r6134:
Accumulate statistics about the number of searches in the errors and
suppressions lists, and rearrange the suppressions list when searching
to reduce cost of future searches.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6271
2006-10-17 01:41:17 +00:00
Julian Seward
96e9302ca8 Merge r6133:
Inline stackPush and stackPop and placate gcc's resulting concerns
about uninitialised variables.

and also change ownership.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6270
2006-10-17 01:40:33 +00:00
Julian Seward
ecb2ce6536 Merge r6132:
Minor changes for redirection on AIX.  The only significant change is
that it now checks for, warns about and disallows, attempts to
redirect to, or wrap with, a function for which no TOC pointer can be
found, since that would be really asking for trouble (a segfault).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6269
2006-10-17 01:39:30 +00:00
Julian Seward
e10473fe67 Merge r6131:
Change the SysRes type so as to represent both the error value and the
non-error result at the same time.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6268
2006-10-17 01:38:48 +00:00
Julian Seward
49a9f8d4f9 Merge r6130:
- AIX implementations of various stuff, nothing surprising.

- For all platforms: make VG_(read) and VG_(write) return (negative)
  actual error values rather than producing -1 for all failures.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6267
2006-10-17 01:38:13 +00:00
Julian Seward
565fe34ff0 Merge r6129:
Changes to support XCOFF:

- allow modules to have 'member names' as well as file names.  A member
  name is a "foo.o" name inside a "bar.a"; necessary as AIX
  keeps all its dynamic libraries in .a files.

- rename the type RiLoc to DiLoc (this holds a line number indication).
  No idea why it was called RiLoc in the first place.

- trace changes in type SysRes

- implement VG_(di_aix5_notify_segchange)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6266
2006-10-17 01:37:10 +00:00
Julian Seward
0a0e94fb63 Merge r6128:
Interface changes for m_debuginfo:
- new fn VG_(di_aix5_notify_segchange) to notify XCOFF loads/unloads
- new fn VG_(lookup_symbol_SLOW) for looking up the address of a fn
  given its name and soname



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6265
2006-10-17 01:36:37 +00:00
Julian Seward
49398acb25 Merge r6127: Extend for AIX5. Nothing surprising here.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6264
2006-10-17 01:35:58 +00:00
Julian Seward
d416221e3c Merge r6126:
New option --sym-offsets=yes|no [no], which causes all symbols to be
shown in the form 'name+offset'.  Mostly useful for debugging Valgrind
itself.

Also move command-line-error functions from m_main into m_options.

[Will move them back shortly.]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6263
2006-10-17 01:34:57 +00:00
Julian Seward
44fb84cd6e Merge r6125: Function-wrapping macros and associated stuff, for AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6262
2006-10-17 01:32:48 +00:00
Julian Seward
fa62ba20cb Merge r6123:
Extensions for unwinding stacks on ppc32-aix5 and ppc64-aix5.  Also,
extend the mechanism developed for ppc64-linux for fishing return
addresses out of the thread's redirection-stack when needed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6261
2006-10-17 01:31:58 +00:00
Julian Seward
11f205dc50 Merge r6121: Don't define uchar; it might already be defined.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6260
2006-10-17 01:31:27 +00:00
Julian Seward
e7f6fcf8d9 Merge r6120:
Get rid of VG_(sigtimedwait) and replace it a simpler version,
VG_(sigtimedwait_zero), which polls for signals and returns
immediately.  AIX doesn't have a sigtimedwait syscall, so in that case
try and implement VG_(sigtimedwait_zero) using various other signal
syscalls.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6259
2006-10-17 01:30:47 +00:00
Julian Seward
8883c3c066 Merge r6119:
Changes to this interface to facilitate actions needed by AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6258
2006-10-17 01:30:07 +00:00
Julian Seward
422a82fec7 Merge r6113:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6257
2006-10-17 01:28:48 +00:00
Julian Seward
88d3b910a2 Merge r6112:
Changes resulting from porting to AIX5:

- Auxiliary primary map handling has been redone, so that the
  performance penalty for hitting memory above the magic 32G limit is
  much reduced, and also the number of usable maps is limited only by
  how much memory is available.  The current code has been tested on
  64-bit AIX for processes up to about 8GB in size.

  The auxiliary primary maps are now stored in an OSet, "auxmap_L2".
  However, looking up in an OSet for each memory reference is
  expensive.  So the OSet is 'fronted' by 24-entry array which holds
  pointers to the 24 most recently used auxiliary primary maps.
  Accesses to this array are made faster by incrementally rearranging
  it on every lookup (if the requested map is found in the array, it
  is moved one element closer to the start of the array).

  Logically speaking, auxmap_L1 is a cache of auxmap_L2.  The L2-L1
  relationship is one of inclusion; iow L2 is not a victim cache.

  There is extensive new sanity check code for these structures.

- Along with the auxmap changes are semi-fast cases in mc_LOADVn_slow
  and mc_STOREVn_slow.  These catch naturally aligned, word-size loads
  which fall into addressible memory, and handle them directly rather
  than in a byte-by-byte fashion.

- Fix longstanding error with alignment checks in
  {new,die}_mem_stack_N.  Previously, these checked the alignment of
  the new SP value without taking the stack redzone size into account.
  This is only safe if the redzone size is 8-aligned.  The right thing
  to do is check alignment after adding on the redzone size.

- Add a new mechanism which allows specification, on the command line,
  of address ranges which memcheck is to 'ignore'.  Meaning that it
  regards all writes to those ranges as acceptable and all reads from
  those ranges as acceptable and returning initialised data.  This is
  done without disturbing the existing finally-balanced bitmap 
  machinery.  Instead, in mc_record_address_error, just ignore the
  error if the address falls inside an ignored-range.

  There is a new command-line flag --ignore-ranges= to specify
  the address ranges.  Currently up to 4 non-overlapping ranges may
  be specified.

  This kind of thing is useful if you want to do some strange thing
  like map a high-performance network card into memory and can't be
  bothered to tell memcheck about it through the official channels
  (intercepting syscalls/ioctls and telling aspacem about them.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6256
2006-10-17 01:28:10 +00:00
Julian Seward
3c6f899f71 Merge r6111:
AIX5 changes.  Perhaps this isn't quite the right place to add a
sqrt() replacement.  Hmm.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6255
2006-10-17 01:27:13 +00:00
Julian Seward
a48daec904 Merge r6109:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6254
2006-10-17 01:26:12 +00:00
Julian Seward
9284a14f28 Merge r6108:
Supply our own random number generator; else this test produces different
results on different platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6253
2006-10-17 01:25:13 +00:00
Julian Seward
0124fc911d Merge r6105:
Refactor the address space manager, so there are two implementations
of it, plus a small common supporting library.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6252
2006-10-17 01:23:57 +00:00
Julian Seward
1417129f07 Merge r6102/6103:
A new module ("Initial Image"), whose purpose is to set up the
client's initial memory and register state before running it.  On
Linux this does all the stack/auxv/envp stuff which was previously
done in m_main.  On AIX5 the kernel prepares the process' initial
image, so there's nothing to be done there.  But LD_PRELOAD doesn't
work on AIX5, so m_initimg sets up the client so as to start by
running a short bit of code which gets the kernel to load in the core
and tool preloads and then start the client.

As a result of this, m_main gets a lot shorter and cleaner.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6251
2006-10-17 01:23:07 +00:00
Julian Seward
f92e61becb Merge r6101:
Syscall wrappers for AIX5.  Unfortunately they duplicate some of the
stuff in syswrap-generic.c since making that compile on AIX is just
too difficult.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6250
2006-10-17 01:08:19 +00:00
Julian Seward
5db73d123f Merge r6100:
Code for reading XCOFF32 and XCOFF64 symbol tables and line numbers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6249
2006-10-17 01:07:21 +00:00