518850bf0da07ed3e2244e307268ae0fd80e93a8 |
|
23-Oct-2014 |
florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Constify coregrind. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
38a74d2cc4670e3eb559adff51a376cd6ec98005 |
|
30-Aug-2014 |
philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
The semantic of the stack bounds is not consistent or is not described. At various places, there were either some assumption that the 'end' boundary (highest address) was either not included, included, or was the highest addressable word, or the highest addressable byte. This e.g. was very visible when doing: ./vg-in-place -d -d ./helgrind/tests/tc01_simple_race|&grep regi giving --24040:2:stacks register 0xBEDB4000-0xBEDB4FFF as stack 0 --24040:2:stacks register 0x402C000-0x4A2C000 as stack 1 showing that the main stack end was (on x86) not the highest word but the highest byte, while for the thread 1, the registered end was a byte not part of the stack. The attached patch ensures that stack bounds semantic are documented and consistent. Also, some of the stack handling code is factorised. The convention that the patch ensures and documents is: start is the lowest addressable byte, end is the highest addressable byte. (the words 'min' and 'max' have been kept when already used, as this wording is consistent with the new semantic of start/end). In various debug log, used brackets [ and ] to make clear that both bounds are included. The code to guess and register the client stack was duplicated in all the platform specific syswrap-<plat>-<os>.c files. Code has been factorised in syswrap-generic.c The patch has been regression tested on x86, amd64, ppc32/64, s390x. It has been compiled and one test run on arm64. Not compiled/not tested on darwin, android, mips32/64, arm More in details, the patch does the following: coregrind/pub_core_aspacemgr.h include/valgrind.h include/pub_tool_machine.h coregrind/pub_core_scheduler.h coregrind/pub_core_stacks.h - document start/end semantic in various functions also in pub_tool_machine.h: - replaces unclear 'bottommost address' by 'lowest address' (unclear as stack bottom is or at least can be interpreted as the 'functional' bottom of the stack, which is the highest address for 'stack growing downwards'). coregrind/pub_core_initimg.h replace unclear clstack_top by clstack_end coregrind/m_main.c updated to clstack_end coregrind/pub_core_threadstate.h renamed client_stack_highest_word to client_stack_highest_byte coregrind/m_scheduler/scheduler.c computes client_stack_highest_byte as the highest addressable byte Update comments in call to VG_(show_sched_status) coregrind/m_machine.c coregrind/m_stacktrace.c updated to client_stack_highest_byte, and switched stack_lowest/highest_word to stack_lowest/highest_byte accordingly coregrind/m_stacks.c clarify semantic of start/end, added a comment to indicate why we invert start/end in register call (note that the code find_stack_by_addr was already assuming that end was included as the checks were doing e.g. sp >= i->start && sp <= i->end coregrind/pub_core_clientstate.h coregrind/m_clientstate.c renames Addr VG_(clstk_base) to Addr VG_(clstk_start_base) (start to indicate it is the lowest address, base suffix kept to indicate it is the initial lowest address). coregrind/m_initimg/initimg-darwin.c updated to VG_(clstk_start_base) replace unclear iicii.clstack_top by iicii.clstack_end updated clstack_max_size computation according to both bounds included. coregrind/m_initimg/initimg-linux.c updated to VG_(clstk_start_base) updated VG_(clstk_end) computation according to both bounds included. replace unclear iicii.clstack_top by iicii.clstack_end coregrind/pub_core_aspacemgr.h extern Addr VG_(am_startup) : clarify semantic of the returned value coregrind/m_aspacemgr/aspacemgr-linux.c removed a copy of a comment that was already in pub_core_aspacemgr.h (avoid double maintenance) renamed unclear suggested_clstack_top to suggested_clstack_end (note that here, it looks like suggested_clstack_top was already the last addressable byte) * factorisation of the stack guessing and registration causes mechanical changes in the following files: coregrind/m_syswrap/syswrap-ppc64-linux.c coregrind/m_syswrap/syswrap-x86-darwin.c coregrind/m_syswrap/syswrap-amd64-linux.c coregrind/m_syswrap/syswrap-arm-linux.c coregrind/m_syswrap/syswrap-generic.c coregrind/m_syswrap/syswrap-mips64-linux.c coregrind/m_syswrap/syswrap-ppc32-linux.c coregrind/m_syswrap/syswrap-amd64-darwin.c coregrind/m_syswrap/syswrap-mips32-linux.c coregrind/m_syswrap/priv_syswrap-generic.h coregrind/m_syswrap/syswrap-x86-linux.c coregrind/m_syswrap/syswrap-s390x-linux.c coregrind/m_syswrap/syswrap-darwin.c coregrind/m_syswrap/syswrap-arm64-linux.c Some files to look at more in details: syswrap-darwin.c : the handling of sysctl(kern.usrstack) looked buggy to me, and has probably be made correct by the fact that VG_(clstk_end) is now the last addressable byte. However,unsure about this, as I could not find any documentation about sysctl(kern.usrstack). I only find several occurences on the web, showing that the result of this is page aligned, which I guess means it must be 1+ the last addressable byte. syswrap-x86-darwin.c and syswrap-amd64-darwin.c I suspect the code that was computing client_stack_highest_word was wrong, and the patch makes it correct. syswrap-mips64-linux.c not sure what to do for this code. This is the only code that was guessing the stack differently from others. Kept (almost) untouched. To be discussed with mips maintainers. coregrind/pub_core_libcassert.h coregrind/m_libcassert.c * void VG_(show_sched_status): renamed Bool valgrind_stack_usage to Bool stack_usage if stack_usage, shows both the valgrind stack usage and the client stack boundaries coregrind/m_scheduler/scheduler.c coregrind/m_gdbserver/server.c coregrind/m_gdbserver/remote-utils.c Updated comments in callers to VG_(show_sched_status) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
421c26e30de64ccf441ec398c1f8beda7afbb47c |
|
24-Jul-2014 |
florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Factor out VG_(exit_now) to contain the syscall incantation to terminate the process. Make ML_(am_exit) and VG_(exit) use it, thereby avoiding double maintenance. Introduce libcbase_assert macro and use it in VG_(strncpy_safely) to document the case that function cannot handle. Add stub functions to memcheck/tests/unit_libcbase.c to satisfy new dependencies. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14185 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
180a7500bf2464d5b16cddb5618b91fb3f095998 |
|
20-Apr-2014 |
philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
- The option "--vgdb-stop-at=event1,event2,..." allows the user to ask GDB server to stop before program execution, at the end of the program execution and on Valgrind internal errors. - A new monitor command "v.set hostvisibility" that allows GDB server to provide access to Valgrind internal host status/memory. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13900 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
4f6f336badda2171d6e842cca3de63b53f4c9f0b |
|
19-Apr-2014 |
philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Several improvements to (internal) statistics reporting about memory usage, making it easier to understand the memory and/or oom situation. No functional (user level) change. * For --profile-heap=yes, sort the cost centers by decreasing size, so that the most relevant cost centers are closed to the arena total. * factorise duplicated code calling a series of print stat functions * VG_(show_sched_status) optionally show the host stacktrace the amount of valgrind stack used by each thread the exited threads * various functions: update to add VG_(show_sched_status) new args, keeping the same info production as before. * In case of out of memory situation detected by m_mallocfree.c, reports more information: valgrind and tool stats scheduler status (full information) * gdbserver v.info scheduler : show full information. The oom behaviour/reporting was tested using a small program causing an OOM, and having several threads (some terminated, some still active). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13897 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 |
|
18-Oct-2013 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates (20XY-2012 ==> 20XY-2013) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
535fb1b49a80f2e880f755ee618381de3e222ddf |
|
15-Sep-2013 |
florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Fix coregrind header files such that they can be included without having to worry what other header files may have to be included beforehand. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
bbd9a21ca8518fc34cd7b6254a61d72f82495120 |
|
14-Oct-2012 |
florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Char/ HChar cleanup: The various panic and printf-like functions all take const HChar * arguments. __FILE__ and __func__ expand into string literals (or character arrays initialised by them), as do strings created by the preprocessor e.g. #stuff. This change reduces the number of warnings from 17000+ to ~5500 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
03f8d3fc25f5a45c5826259d1b33b7f310117279 |
|
05-Aug-2012 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates to include 2012. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
ec062e8d96a361af9905b5447027819dfbfee01a |
|
23-Oct-2011 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update all copyright dates, from 20xy-2010 to 20xy-2011. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
4ee9c560c7bbe7c305641964d5c2277e086ed1ba |
|
09-May-2011 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Tidying up of branch-predict hint macros LIKELY/UNLIKELY. Fixes #271504. (Florian Krohm, britzel@acm.org) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11736 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 |
|
03-May-2010 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates to 2010. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
59570ffbe31930ab4d678754daaeec0715117a3d |
|
01-Jan-2010 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Merge from branches/ARM, all parts of the ARM-Linux port except for the changes to do with reading and using ELF and DWARF3 info. This breaks all targets except amd64-linux and x86-linux. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
9f207460d70d38c46c9e81996a3dcdf90961c6db |
|
10-Mar-2009 |
njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Updated copyright years. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 |
|
11-Feb-2008 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates ("200X-2007" --> "200X-2008"). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
9ebd6e0c607fa30301b1325874eb8de871c21cc5 |
|
08-Jan-2007 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
745fc459ce4ce9264d8844bf1ab695d235a4ce01 |
|
17-Oct-2006 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Merge r6159 (parts of): Minor build-system adjustments, mostly. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6289 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
e4b0bf07b0ee0a18eacc5aba91686ab5fc1d327b |
|
06-Jun-2006 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Update copyright dates. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
acaec5fd0a53ebd20fded3651169085bc7e90e78 |
|
19-Aug-2005 |
sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Incorporate a patch from Craig Chaney which gives better stack 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|
132bfccd21960e462352175f8553a5bdce8a210c |
|
04-Jun-2005 |
njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> |
Modularised assertions and panics in m_libcassert. As part of this, killed the VG_STRINGIFY macro, which was used to expand out names like "VG_(foo)" and "vgPlain_foo" in assertion failure messages. This is good since we actually want the "VG_(foo)" form used in these messages. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/pub_core_libcassert.h
|