minor changes to make stack unwinding on amd64-linux approximately
twice as fast as it was before.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8707
the new thread's stack, then make the stack unwinder use that information
to make a better guess at the stack bounds.
This helps avoid crashes trying to unwind the stack under wine when
the starting point is a routine without a proper stack frame.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7383
the --max-stackframe value. This makes it possible to run programs
with very large (primary) stack requirements simply by specifying
--max-stackframe.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7300
kludges^H^H^H^H^H^H^Henhancements:
r6802: For VG_(record_ExeContext) et al, add a new parameter
(first_ip_delta) which is added to the initial IP value before the
stack is unwound. A safe value to pass is zero, which causes the
existing behaviour to be unchanged. This is a kludge needed to work
around the incomplete amd64 stack unwind info in glibc-2.5's clone()
routine.
r7059: Add a last-ditch heuristic-hack to the amd64-linux stack
unwinder, which is used when all other methods fail. Seems like GDB
has something similar.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7118
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
interface, except for the syscall numbers, into that. Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.
include/pub_tool_basics.h previously dragged in the entire kernel
interface. I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly. This is why there are many modified .c files -- they have
all acquired an extra #include line.
This certainly breaks all platforms except x86. Will fix shortly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
differently performance-tuned. amd64 needs to consult CFI first and
then if that fails (unlikely) follow the %rbp chain. On x86, the CFI
is almost never helpful, but consulting it first wastes significant
time in allocation-intensive programs. This commit pulls the two
archs apart and puts the CFI check second on x86. This reduces start
time for ktuberling on x86 on memcheck from 78 seconds to 75.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5126
ip before starting a new pass of the loop.
The reason for this is that (except for the first pass of the loop) the
value of ip is actually a return address, which is therefore after the
instruction that was executing at the time. This means that if there is
a boundary in the CFI information at that point we can wind up using the
wrong CFI data to do the next unwind if we do it based on the return
address.
This most commonly happens with a tail call where we wind up using the
data for the next function to do the unwind and getting hopelessly lost.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4996
changes from r4341 through r4787 inclusive). That branch is now dead.
Please do not commit anything else to it.
For the most part the merge was not troublesome. The main areas of
uncertainty are:
- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
and include it in a couple of places. Building etc seems to still
work, but I haven't tried building the documentation.
- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
stuff was moved from -generic to -linux after the branch was created.
I think that is satisfactorily glued back together now.
- Regtests: although this appears to work, no .out files appear, which
is strange, and makes it hard to diagnose regtest failures. In
particular memcheck/tests/x86/scalar.stderr.exp remains in a
conflicted state.
- amd64 is broken (slightly), and ppc32 will be unbuildable. I'll
attend to the former shortly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
snapshots on ppc32-linux in the presence of functions subject to
leaf-function optimisations.
At the same time, simplify the stack unwinding logic by basically
implementing it separately for each target. Having a single piece of
logic for amd64 and x86 was tenable, but merging ppc32 into it is too
confusing. So now there is an x86/amd64 unwinder and a ppc32
unwinder.
This requires plumbing a link-register value into
VG_(get_StackTrace2), and that in turn requires passing it around
several other stack-trace-related functions. Hence 7 changed files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4464
dependence between them. (There's still an indirect one via m_libcmman.)
As a result, I was able to move the Segment type declaration into
pub_core_aspacemgr.h, which is a much better spot. I was also able to
remove a couple of #includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4025
things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002
to it. Now there are no more offsets and no copying of code into the
stack. We just redirect directly to entry points in m_syscalls.S.
This will mess up pointercheck, since the redirect targets are now in
Valgrind's address space, not the client's. But pointercheck is hosed
anyway, and I'd rather back off to something simple whilst ppc32 is
stabilised. When the address space management stuff is overhauled
then pointercheck may or may not get reinstated, and if it does then
the trampoline stuff will need revisiting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3977
Plenty still to do, but simple programs like ls seem to run ok
Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969
- Broke part of m_scheduler off into a new module m_threadstate. It
contains ThreadState, VG_(threads)[] and some basic operations on the
thread table. All simple stuff, the complex stuff stays in m_scheduler.
This avoids lots of circular dependencies between m_scheduler and other
modules.
- Managed to finally remove core.h and tool.h, double hurrah!
- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
include by every single C file.
- Lots of little cleanups and changes related to the above.
- I even did a small amount of documentation updating.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944