make their role clearer and their behaviour more consistent with the fields
describing the client's stack. Also made the code in x86-linux/syscalls.c
and amd64-linux/syscalls.c more word-size-independent, which is not strictly
necessary but makes the code similarities between the two files more
obvious.
One consequence of this is that Valgrind's stack on AMD64 is now 16384 * 8
bytes, rather than 16384 * 4 bytes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3520
- removed "stack_base" which wasn't used in any meaningful way
- added "client_" prefix to make it clear they concern the client's stack
- renamed "stack_size" as "client_stack_szB" to make the units clear
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3516
command-line flag (--max-stackframe=number), rather than hardwiring it
to 2000000. This is helpful for dealing with unruly Fortran programs
which want to allocate large arrays on the stack.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3512
idea is the same -- write functions with special names encoding
sonames and fn names, and have the redir mechanism notice them.
However the way the functions are generated is significantly changed:
* The name mangling scheme has been replaced with one which is just about
simple enough not to need a preprocessing phase. Hence
vg_replace_malloc.c.base is replaced by vg_replace_malloc.c, and
the preprocessor disappears. The demangler in vg_symtab2.c changes
accordingly.
* Kill off the horrendous LIBALIAS macro. In return we have to
enumerate all the redirections longhand, but this is not a big deal.
* Remove use of the GNUisms "attribute alias" and "attribute
protected".
* Remove the hardwired assumption that any C++ new/new[]/etc symbols
we might want to intercept are mangled in GNU style.
* Add more comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3510
VG_(tdict). Also make the typing more meaningful in vg_mallocfuncs_info.
And (barely) start removing the use of "TL_" names in the core.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3488
lot to one. This required two basic changes.
1. Tools are responsible for telling the tool about any functions they
provide that the tool may call. This includes basic functions like
TL_(instrument)(), functions that assist core services such as
TL_(pp_Error)(), and malloc-replacement-related functions like
TL_(malloc)().
2. Tools that replace malloc now specify the size of the heap block redzones
through an arg to the VG_(malloc_funcs)() function, rather than with a
variable VG_(vg_malloc_redzone_szB).
One consequence of these changes is that VG_(tool_init_dlsym)() no longer
needs to be generated by gen_toolint.pl.
There are a number of further improvements that could follow on from this one.
- Avoid the confusingly different definitions of the TL_() macro in the
core vs. for tools. Indeed, the functions provided by the tools now don't
need to use the TL_() macro at all, as they can have arbitrary names.
- Remove a lot of the auto-generated stuff in vg_toolint.c and vg_toolint.h
(indeed, it might be possible to not auto-generate these at all, which
would be nice).
- The handling of VgToolInterface is currently split across vg_needs.c and
vg_toolint.c, which isn't nice.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3487
valgrind-listener.c, don't use the VG_ prefix on its equivalent, because
it's a local definition.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3454
fixes getppid(), and the second fixes the next bug which is revealed
once getppid() does what LinuxThreads wants; LinuxThreads uses SIGKILL
to kill off stray threads, but if we send naked SIGKILLs to Valgrind
threads, they'll die without cleaning up or informing anyone of their
death, which means that they're waited on forever.
ADAPTED FROM CVS HEAD
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3449
libpthread implementation: USERREQ__READ_MILLISECOND_TIMER, USERREQ__MALLOC,
USERREQ__FREE.
As a consequence, all the PTHREQ macros (eg. VGA_PTHREQ_RET,
SET_PTHREQ_RETVAL) could be removed. And VG_(tl_malloc_called_by_scheduler)
has been renamed VG_(tl_malloc_called_deliberately) to reflect how its role
has changed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3438
two halves: stacktrace.c, which deals with getting, traversing and printing
stack traces; and execontext.c, which deals with storing stack traces
permanently in a way that avoids duplicates, and comparing them.
One nice outcome: previously we were often creating ExeContexts, which live
forever, even when they were only needed temporarily. Ie. this was a memory
leak, which has been removed.
As part of this, new headers have been created, carved off core.h and
tool.h. Lots of function names have changed, too.
In Massif, I also changed a lot of "eip" names to "ip" to make them less
x86-specific.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3429
in registers. Replace it (for amd64) with something more disciplined:
call_on_new_stack_0_0 and call_on_new_stack_0_1.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3401
look like that much, but it's a good first step; there's more to come.
- vg_errcontext.c:gen_suppressions() and vg_symtab2.c:VG_(mini_stack_dump)()
had very similar stack-trace-traversing loops. I factored these out into
the higher-order function VG_(apply_ExeContext)(). I put this into
vg_execontext.c, which is the obvious spot. This is good because before
this change we had two functions, neither in vg_execontext.c, which were
crawling all over ExeContexts -- they shouldn't have to do that.
- Removed VG_(mini_stack_dump)(), which was almost identical to
VG_(pp_ExeContext)().
- Removed dead function VG_(get_EIP_from_ExeContext)().
- Replaced a call to VG_(get_ExeContext2)() with the simpler
VG_(get_ExeContext)() in vg_scheduler.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3394
to vg_malloc2.c -- the core and tools never do allocations with alignments
different to the default alignment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3343
- JITTER, which was unused, since Vex now manages its own memory
- TRANSIENT, which was barely being used; I replaced it with usage of CORE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3342
because it was always being set to VG_MIN_ALLOC_SZB, and so was just one
more thing to get wrong, as well as exposing VG_MIN_ALLOC_SZB to more places
than necessary.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3340
Move others that are only used in one file, out of core.h into that file.
Remove the "VG_" prefixes while doing it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3337
used.
And move VALGRIND_INTERNAL_PRINTF() out of core.h into vg_replace_malloc.c,
which is the only place it's used now. Also made it print it's message with
Vg_DebugMsg rather than Vg_UserMsg, which makes more sense, since it's used
for --trace-malloc which is debugging-style info.
Improved some comments about this stuff too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3290
Also rename the variables involve to lessen the chance of such confusion
occurring again.
MERGED FROM CVS HEAD
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3274
overhaul of the thread support. Many things are now probably broken,
but at least with --tool=none, simple and not-so-simple threaded and
non-thread programs work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3265
the syscall result by inspecting RES after the pre-handler has run.
Instead, give each thread a syscall_result_set Bool, and make
SET_RESULT set it. Inspect that Bool.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3254
* remove initialisation-time circularities by not using the
skiplist mechanism and therefore not using any dynamically
allocated memory in support of this mechanism
* Add comments about how it works (it is pretty opaque) so as
to help future maintainers/bug-fixers
It only just works and many things are still broken. That should
improve rapidly however.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3242
table/cache management. Two main changes. (1) Translation areas are
recorded using VexGuestExtents, so that Vex is now properly supported
and code deletion works correctly. (2) Low overhead BB profiling,
enabled by the --profile-flags=<XXXXXXXX> option. This finds the top
N bbs at exit and shows them, so as to give a basis from which to do
performane tuning.
To support this, the way tt/tc work is changed. It is still a
sectored arrangement, but now each sector has its own hash table.
This simplifies a lot of things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3226