History log of /external/valgrind/massif/ms_main.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
868bfa276b0c84071cf9bd00f1958ba4c53397ae 07-Mar-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> 342353 - Allow dumping full massif output while valgrind is still running

Patch from Andre Goddard Rosa



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14992 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
8d47a61e503b69ffbc783717f5faf09d0bbc4723 05-Feb-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Allow the user to specify precise-exception behaviour for translations
made from file-backed mappings (AOT code, basically) that is different
from the default behaviour as specified by --vex-iropt-register-updates.

New flag is --px-file-backed=, with the same possible args as
--vex-iropt-register-updates has.

Add a new flag --px-default, which is a short alias for
--vex-iropt-register-updates.

Add one line of stats output when --stats=yes, showing counts of how
many translations have been made under each of the 4 different PX
optimisation settings.

No user-visible change if you don't use the new flags.

Relies on VEX API change in r3084.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14906 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
227a1ecca7f44cb07e74aa8f1bd24b29df629499 12-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add limited support for printing floating point numbers to
VG_(debugLog_vprintf).
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5b99e6669a0b2a925bb3fb2604259cc317963b6d 29-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
r14794 is related as well.
Also: remove -Wno-format-zero-length from compile options.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ef901ff97a6a31684529a7e8c836087d2ec28026 16-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment only changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14729 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
fb1c5a38af9deb6664213302a8521bdbb8e91b62 10-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove unneeded macro definition.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14710 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
770a8d23e40b980b5745e59ecb8e4037d81af357 03-Nov-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14308 from the BUF_REMOVAL branch to trunk
Changes VG_(describe_IP) to return the untruncated result in a statically
allocated local buffer. Fix call sites and update two .exp files who had
truncated names.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14685 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
12d2eb58c09505f8b1a171bcdd8352c9713591b4 30-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14222, 14268, and 14270 from the BUF_REMOVAL branch to trunk.
Assorted fixes in exp-bbv to eliminate a few buffers.
Implement a suggestion found in the massif source, namely to add the
equivalent of fprintf to m_libcprint. Good suggestion. Thusly
- VgFile: similar to FILE; buffered output, 8k buffer
- VG_(fopen): similar to fopen, but with arguments as in VG_(open)
- VG_(fprintf) and VG_(vfprintf): like [v]fprintf with VgFile 1at argument
- VG_(fclose)
Change massif, exp-bbv and cachegrind to use this functionality.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14678 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5980e9df10ed1b0497bc09f4b2fa708b52c9adda 28-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> When traversing VG_(args_for_client) there is no need to check
the array element for NULL. Function VG_(split_up_argv), which
sets up that array, ensures that no element is NULL.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14671 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
46cc04521acf2827eb33310fadc119bf2dc039e4 25-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14202 from the BUF_REMOVAL branch to trunk.
This patch changes the interface and behaviour of VG_(demangle) and
VG_(maybe_Z_demangle). Instead of copying the demangled name into a
fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf),
the demangling functions will now return a pointer to the full-length
demangled name (HChar **result). It is the caller's responsiblilty to
make a copy if needed.

This change in function parameters ripples upward
- first: to get_sym_name
- then to the convenience wrappers
- VG_(get_fnname)
- VG_(get_fnname_w_offset)
- VG_(get_fnname_if_entry)
- VG_(get_fnname_raw)
- VG_(get_fnname_no_cxx_demangle)
- VG_(get_datasym_and_offset)

The changes in foComplete then forces the arguments of
- VG_(get_objname) to be changed as well

There are some issues regarding the ownership and persistence of
character strings to consider.
In general, the returned character string is owned by "somebody else"
which means the caller must not free it. Also, the caller must not
modify the returned string as it possibly points to read only memory.
Additionally, the returned string is not necessarily persistent. Here are
the scenarios:
- the returned string is a demangled function name in which case the
memory holding the string will be freed when the demangler is called again.
- the returned string hangs off of a DebugInfo structure in which case
it will be freed when the DebugInfo is discarded
- the returned string hangs off of a segment in the address space manager
in which case it may be overwritten when the segment is merged with
another segment
So the rule of thunb here is: if in doubt strdup the string.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14664 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
09a4c794458cdb9dea743fa40e450150a2725257 18-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the definition of VgHashTable to not have pointer type.
This is (a) consistent with how the other containers are defined
and, more importantly, (b) allows the constification of the hash table API.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14639 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3c0c94777f547bcb5eadbe8cb4328debf0f51875 24-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14564 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e464e80d4f2e22ebb6787b555b58d73c9e027ff8 11-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Rename VG_(malloc_usable_size) to VG_(cli_malloc_usable_size)
because it operates on the CLIENT arena. Given that VG_(malloc)
operates on the CORE arena, it was unexpected for VG_(mallos_usable_size)
to use a different arena.
Move function definition to the proper place (next to VG_(cli_malloc))
and fix call sites.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14516 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b16609bf952bf381154cb6cba87efc99c2c86a23 20-Aug-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Clean up confusion about VG_(args_the_exename) which was believed to
possibly be NULL in several places. Nowadays, VG_(ii_create_image) will
terminate the process if VG_(args_the_exename) is NULL.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14323 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
a0a73939b0398b6608fd6dbde49820ce6530d12c 15-Jun-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> This patch implements the support needed for stacktraces
showing inlined function calls.
See 278972 valgrind stacktraces and suppression do not handle inlined function call debuginfo

Reading the inlined dwarf call info is activated using the new clo
--read-inline-info=yes
Default is currently no but an objective is to optimise the performance
and memory in order to possibly set it on by default.
(see below discussion about performances).

Basically, the patch provides the following pieces:
1. Implement a new dwarf3 reader that reads the inlined call info
2. Some performance improvements done for this new parser, and
on some common code between the new parser and the var info parser.
3. Use the parsed inlined info to produce stacktrace showing inlined calls
4. Use the parsed inlined info in the suppression matching and suppression generation
5. and of course, some reg tests

1. new dwarf3 reader:
---------------------
Two options were possible: add the reading of the inlined info
in the current var info dwarf reader, or add a 2nd reader.
The 2nd approach was preferred, for the following reasons:
The var info reader is slow, memory hungry and quite complex.
Having a separate parsing phase for the inlined information
is simpler/faster when just reading the inlined info.
Possibly, a single parser would be faster when using both
--read-var-info=yes and --read-inline-info=yes.
However, var-info being extremely memory/cpu hungry, it is unlikely
to be used often, and having a separate parsing for inlined info
does in any case make not much difference.
(--read-var-info=yes is also now less interesting thanks to commit
r13991, which provides a fast and low memory "reasonable" location
for an address).

The inlined info parser reads the dwarf info to make calls
to priv_storage.h ML_(addInlInfo).

2. performance optimisations
----------------------------
* the abbrev cache has been improved in revision r14035.
* The new parser skips the non interesting DIEs
(the var-info parser has no logic to skip uninteresting DIEs).
* Some other minor perf optimisation here and there.
In total now, on a big executable, 15 seconds CPU are needed to
create the inlined info (on my slow x86 pentium).

With regards to memory, the dinfo arena:
with inlined info: 172281856/121085952 max/curr mmap'd
without : 157892608/106721280 max/curr mmap'd,
So, basically, inlined information costs about 15Mb of memory for
my big executable (compared to first version of the patch, this is
already using less memory, thanks to the strpool deduppoolalloc.
The needed memory can probably be decreased somewhat more.

3. produce better stack traces
------------------------------
VG_(describe_IP) has a new argument InlIPCursor *iipc which allows
to describe inlined function calls by doing repetitive calls
to describe_IP. See pub_tool_debuginfo.h for a description.

4. suppression generation and matching
--------------------------------------
* suppression generation now also uses an InlIPCursor *iipc
to generate a line for each inlined fn call.

* suppression matching: to allow suppression matching to
match one IP to several function calls in a suppression entry,
the 'inputCompleter' object (that allows to lazily generate
function or object names for a stacktrace when matching
an error with a suppression) has been generalised a little bit
more to also lazily generate the input sequence.
VG_(generic_match) has been updated so as to be more generic
with respect to the input completer : when providing an
input completer, VG_(generic_match) does not need anymore
to produce/compute any input itself : this is all delegated
to the input completer.

5. various regtests
-------------------
to test stack traces with inlined calls, and suppressions
of (some of) these errors using inlined fn calls matching.


Work still to do:
-----------------
* improve parsing performance
* improve the memory overhead.
* handling the directory name for files of the inlined function calls is not yet done.
(probably implies to refactor some code)
* see if m_errormgr.c *offsets arrays cannot be managed via xarray



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14036 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d898bf0e1479ec87e86e2e875a6dc9040ee22e11 17-May-2014 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> Revert "Tools should explain why an option is bad when using fmsg_bad_option."

This reverts valgrind svn r13975. This was a work in progress, still being
discussed in bug #334802. It should not yet been pushed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13978 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
1f2f9a1352a089b8409af2073e5f41c89e9ecb47 17-May-2014 mjw <mjw@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tools should explain why an option is bad when using fmsg_bad_option.

Add an explanation of why an option was bad to fmsg_bad_option calls that
were just using "" as argument. Fixes bug #334802.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13975 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
c29761f54236f27d3bb3663998121bf1c7cbec8c 19-Mar-2014 dejanj <dejanj@a5019735-40e9-0310-863c-91ae7b9d1cf9> VG_(strlen) ( const HChar* str ) does not count the null terminator '\0' at the
end of the string, so we need to add an extra element in string 's' for the null
terminator.
VG_(strcpy) ( HChar* dest, const HChar* src ) function copies the string pointed
to by src, including the null terminator ('\0'), to the buffer pointed to by dest.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13880 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f066315b49748c77424220bb822f603120bdf139 19-Dec-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> have massif printing its stats for v.info stats


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13764 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
1a046d5a3c34f924b648cc22c01f0a8e02ca221e 16-Sep-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Include pub_core/tool_clreq.h instead of valgrind.h where apropriate.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13555 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6e4b71339ecdf4accc77e86a892718516a531b0f 18-Jan-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a more efficient allocation of small blocks which are never freed.
This generalises the "perm_malloc" function which was in ms_main.c
The new VG_(perm_malloc) is used in ms_main.c
and for execontext : when there are a lot of execontext, this
can save significant memory.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13238 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3e7986312a0ffc7646b0552d4c4ea3744a870e73 24-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13138 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6bd9dc18c043927c1196caba20a327238a179c42 23-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13137 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
19f91bbaedb4caef8a60ce94b0f507193cc0bc10 10-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
dbb3584f591710a15a437918c0fc27e300993566 27-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> More Char/HChar fixes and constification.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e58e8a7a82f81c9237e7cae9a1b70a31dec67d36 20-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> First round of Char/HChar fixups for massif


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13065 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ca503be79ca377d89b1692c37c97a06ed14dad3b 07-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
27c9f0d1a2193440791748efd3821828dff5ff70 24-Sep-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix n-i-bz report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dark_footix@yahoo.fr)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13015 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5b240c20b48c86955e574d5880a145927c60a686 15-Aug-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement --vex-iropt-register-updates=sp-at-mem-access

Option sp-at-mem-access can be used by tools which do not
need an up to date BP and IP at each mem access.
It is needed however to have SP up to date at each memory
access, as an up to date SP is needed to grow the stack in
m_signals.c

Tools massif, cachegrind and callgrind are using sp-at-mem-access
as default.
None tool could also use sp-at-mem-access but default is kept
to unwindregs-at-mem-access (similar to memcheck, drd, helgrind, exp-sgcheck).

exp-dhat, exp-bbv, lackey have not been looked at to see if they
could make use of sp-at-mem-access.

Validated on x86, amd64, ppc64 and s390x.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12872 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
e6a26cc2fd3877993e14b1e3caffeb1324dd23a8 01-May-2012 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix 298943 massif asserts with --pages-as-heap=yes when brk is changing by value different of page size

* add a massif test to (somewhat) validate --pages-as-heap=yes
with calls to brk not being a multiple of a page size

* fix the assert:
only record new pages or unrecord old pages if at least one new
full page (or one full old page) is added/removed.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12548 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
dfa408c71a5fa3181cb0329269f939f18f5aeb6e 08-Aug-2011 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a Massif bug: when realloc'ing a block, any values in the part of the
block beyond the original request weren't copied. They are now. This is
important because a program could use malloc_usable_size to gain legitimate
access to those extra bytes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11956 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
30b3eca94e609214d9ac8dabfee9be3f3ab46d85 28-Jun-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> valgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
--cmd-time-out

* changed prefixes of Valgrind core monitor commands from vg. to v.
* removed prefixes of Tool monitor commands
* memcheck leak_check 'leakpossible' arg renamed to 'possibleleak'
* memcheck make_memory 'ifaddressabledefined' arg renamed to
'Definedifaddressable'
(with uppercase D to avoid confusion with 'defined' arg).
* vgdb options
- Some doc updates : more logical option order documentation,
specify 'standalone' for options aimed at standalone usage.
- added option --cmd-time-out for standalone vgdb
(comment of Josef Weindendorfer, needed to interface with a callgrind GUI)
* updated tests according to the above.
* updated documentation according to the above.
* some additional minor doc fixes/clarifications

(Philippe Waroquiers, philippe.waroquiers@skynet.be). Bug 214909
comment 111.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11844 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6e9de463ef677f093e9f24f126e1b11c28cf59fd 28-Jun-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6b25437a73b486906aecb9b350e208142ebc21e2 18-May-2011 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Follow-up for r11770: added missing 'void' keyword.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11776 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d142f99836471d4245250247cc9ac7bc5a1391fa 17-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> gdbserver: misc fixes (#214909 c 77)
Fix some tests on ppc-debian6,s390x + handled Nick Nethercote, Josef
Weidendorfer comments

* improved testing & related doc
- added option --vex-iropt-precise-memory-exns=yes to mcsig(no)pass.vgtest
+ updated manual-core.xml
- cleanup some comments in *.vgtest
- modified filter_gdb and filter_memcheck_monitor to
handle specific ppc/debian6.0 mcsig(no)pass output
handle specific s390x 'missing debug info'
- added more information in README_DEVELOPPERS on how to
investigate failing gdbserver tests.

* handled Nick Nethercote comment:
Replaced kludgy ms.snapshot detailed
by ms.detailed_snaphot
Updated documentation and test.

* handled Josef Weindendorfer comments:
- do not report an error if ptrace_scope file can't be read.
Instead, a debug trace is done if -d (debug) option given
- added an option -l to give the list of active Valgrind
gdbserver. Useful a.o. to support callgrind_control.
Updated documentation
- added ref. to vgdb help in the vgdb --help message

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11770 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3b290486cd4cd601b20e04340e593c9ed9717e5f 06-May-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
913473803432ee37d6edaf232e21978d4f426125 25-Mar-2011 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11666 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e9bbd36fbfd35b26d16c8638e0d97c2ed2f7586d 28-Jan-2011 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> If Massif's --threshold value was less than 1.0, in lines like this:

->00.00% (0B) in 11 places, all below massif's threshold (00.00%)

the threshold would always be incorrectly printed as 00.00%. This was
because the percentage printing was broken for percentages less than 1.0.
This change fixes this problem, and modifies a test to check for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11511 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
1e0fff690e9c571275e8025eb2dcff7bf29b53af 10-Jan-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Memcheck, None: update avg translation size to be more realistic.
Massif: specify avg translation size at all, so as to avoid excessive
retranslations caused by the fact that the default value is far below
reality for Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11494 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e006e6f3046b3a53137489f89d6045cf709f6786 08-Dec-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Raise Massif's maximum --detailed-freq value from 10,000 to 1,000,000.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11484 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b1cc5d666cc8f8065419e4a8c819ed0b8256a764 06-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make error messages at start-up more consistent. Every line of such
messages now begin with "valgrind: ", and they're more often printed before
the preamble. This required introducing a new message kind, Vg_FailMsg, and
functions VG_(fmsg) and VG_(fmsg_bad_option), and removing
VG_(err_bad_option).

Where we used to have horrible output like this:

[ocean:~/grind/ws2] vg5 --tool=massif --threshold=101 date
==31877== Massif, a heap profiler
==31877== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote
==31877== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
==31877== Command: date
==31877==
==31877== --threshold must be between 0.0 and 100.0
valgrind: Bad option '--threshold'; aborting.
valgrind: Use --help for more information.

We now have nice output like this:

[ocean:~/grind/ws2] vg2 --tool=massif --threshold=101 date
valgrind: Bad option: --threshold=101
valgrind: --threshold must be between 0.0 and 100.0
valgrind: Use --help for more information or consult the user manual.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11209 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e323a6bf5d28a9fe6f3dae9b3f02b9ccd25fc7ec 01-Jul-2010 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add --pages-as-heap option to Massif. Bug 203256.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11200 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
db5907d7b94ce492f29a96c95e186fdcda23a149 26-Nov-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track vex r1930 (Change the IR representation of load linked and store
conditional.) Completes the fix of #215771.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
2d9e874b7a628ada216f09cc4f065798c65fffa4 07-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Tidy up of messaging:

* For all tools and the core, don't show statistics when -v is in
effect. Instead, try to restrict -v to mostly user-useful
stuff.

* A new flag --stats=no|yes [no] produces statistics output instead.

* Fix longstanding problem in that Memcheck's leak checker ran after
the core's error manager module shut down, thereby not showing use
counts of leak suppressions. This fixes #186790.

* As a consequence, the leak checker text output of Memcheck has
changed a bit -- leak check is done before the final error
summary is done (much more logical), and the output has been
tidied up a bit.

* Helgrind, Drd and Ptrcheck now also print "For counts of
detected and suppressed errors, rerun with: -v", which makes
them consistent with Memcheck in this regard. These are
filtered out by the regtest filter scripts.

For all tools except Memcheck, the regtests are unchanged. On
Memcheck regtests still fail due to rearrangements of the leak
checker output. This will be fixed by a followup commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
31c59527b7d73978c6488a6af1800d7b270ac2c7 05-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment and docs wibbles.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10710 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
a15b6661220b7ae6d4e417030eb5bd348f08ea20 04-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Overhaul Massif's manual, and a few minor related things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10706 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
97db761d2a94fc7a349aee9359ef85828d9618b6 04-Aug-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Various option-related tweaks:

- Match the ordering of the non-tool-specific options in the usage message
with the order in the user manual. As a result, we now always print
--alignment and --trace-malloc in the core's usage messages, which saves
malloc-replacing tools from doing it themselves (and brings it in line
with options that only apply to error-collecting tools).

- Improved the presentation of the Vex options with --help-debug.

- Removed documentation of -d in the manual because it's a debugging-only flag.

- Documented --read-var-info in the manual. This fixes bug 201169.

- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
message.

- Fixed an XML error in manual-core-adv.xml.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10703 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5ea0f390fb3f7bf1a618d03b6144dc50b4ae96b8 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge massif/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10473 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
1c0ce7a9edf8772773f6216dbad4bb04317d23b6 01-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in branches/DCAS.

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901. They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
343a504d2c37a4dabd0241fd0e46d79a677f52a0 01-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add a comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10391 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
13118f8b1ae7c0161df02d527cd802287e731a62 01-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add some more functions to the default --alloc-fns list. Had to tweak how
verbose output is printed so that the tests would be ok, now that different
platforms have different alloc-fns lists.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10389 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f76d27a697a7b0bf3b84490baf60623fc96a23af 28-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge the DARWIN branch onto the trunk.

I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts. So instead I just took the diff between
the branch and trunk at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
7081c1a48e1097e910f3d83853b68bc030231814 19-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> DARWIN sync wibble.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9923 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
cda2f0fbda4c4b2644babc830244be8aed95de1d 18-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch. A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t. Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f6b0076ba64f5c22f9e09be70c351a9d4b095883 17-Apr-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r9103 and r9105 (add --ignore-fn to Massif) from the Darwin branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9567 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
4c245e595b9f6300d3120408ca873f7115d9cc7d 16-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix all the non-VEX problems identified with the Clang Static Analyzer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6f74a7ef1768dd3925cc22869b4e5e24e9338d08 12-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added some shortcuts for VG_(message)(), and used them in a few places (but
certainly not all).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9367 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
83df0b67a14425c484d8dda42b53f3ff0b598894 25-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> atoll() is a terrible function -- you can't do any error checking with it.
Some of our option processing code uses it. This means that eg.
'--log-fd=9xxx' logs to fd 9, and '--log-fd=blahblahblah' logs to 0 (because
atoll() returns 0 if the string doesn't contain a number!)

It turns out that most of our option processing uses VG_(strtoll*) instead
of VG_(atoll). The reason that not all of it does is that the
option-processing macros are underpowered -- they currently work well if you
just want to assign the value to a variable, eg:

VG_BOOL_CLO(arg, "--heap", clo_heap)
else VG_BOOL_CLO(arg, "--stacks", clo_stacks)

else VG_NUM_CLO(arg, "--heap-admin", clo_heap_admin)
else VG_NUM_CLO(arg, "--depth", clo_depth)

(This works because they are actually an if-statement, but it looks odd.)

VG_NUM_CLO uses VG_(stroll10). But if you want to do any checking or
processing, you can't use those macros, leading to code like this:

else if (VG_CLO_STREQN(9, arg, "--log-fd=")) {
log_to = VgLogTo_Fd;
VG_(clo_log_name) = NULL;
tmp_log_fd = (Int)VG_(atoll)(&arg[9]);
}

So this commit:
- Improves the *_CLO_* macros so that they can be used in all circumstances.
They're now just expressions (albeit ones with side-effects, setting the
named variable appropriately). Thus they can be used as if-conditions,
and any post-checking or processing can occur in the then-statement. And
malformed numeric arguments (eg. --log-fd=foo) aren't accepted. This also
means you don't have to specify the lengths of any option strings anywhere
(eg. the 9 in the --log-fd example above). The use of a wrong number
caused at least one bug, in Massif.
- Updates all places where the macros were used.
- Updates Helgrind to use the *_CLO_* macros (it didn't use them).
- Updates Callgrind to use the *_CLO_* macros (it didn't use them), except
for the more esoteric option names (those with numbers in the option
name). This allowed getUInt() and getUWord() to be removed.
- Improves the cache option parsing in Cachegrind and Callgrind -- now uses
VG_(strtoll10)(), detects overflow, and is shorter.
- Uses INT instead of NUM in the macro names, to distinguish better vs. the
DBL macro.
- Removes VG_(atoll*) and the few remaining uses -- they're wretched
functions and VG_(strtoll*) should be used instead.
- Adds the VG_STREQN macro.
- Changes VG_BINT_CLO and VG_BHEX_CLO to abort if the given value is outside
the range -- the current silent truncation is likely to cause confusion as
much as anything.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9255 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
efc13c21199dbb35ad07a5e00d538aa884863c01 23-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of all "make check" compile warnings, except for the ones from
fxtract.c.

Also, gets rid of some of the warnings that -Wextra finds in Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9237 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
466ed6e1efeab3b32a30a9002622fb03c0686688 18-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged r9101 (make Massif tests work if VG_MIN_MALLOC_SZB==16) from the
DARWIN branch, along with a few other minor things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9197 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
8b140dee891a850c09d27f316df913acc7d7bae7 17-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> In the core, include malloc_usable_size() as one of the functions that must
be replaced if malloc() et al are replaced by a tool. This is because
different tools implement the function in different ways.

Add an appropriate malloc_usable_size() replacement to each of Memcheck,
Helgrind, DRD, Ptrcheck, Massif.

Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable.

Merged from the DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9193 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
84f32b200936319bb716cefb38553c9ac414d30a 10-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r9106 (fix a minor stack entry display bug) from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9132 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6882443ef154bca367bc591287de641e43a9e108 10-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Cleaned up the mess that was the treatment of "below main" functions such as
'__libc_start_main', in Massif, m_debuginfo and m_stacktrace. As part of
this, --show-below-main is now visible to tools, and Massif pays attention
to it.

Improved the description of --show-below-main=yes in the manual.

Replaced some instances of "__libc_start_main" in the test *.exp files with
"(below main)", which is what will actually be seen. Also updated
scalar.stderr.exp*, which should make it get closer to actually passing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9131 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9eb6652e8019468cdf16ff8e1af398aab42d8e30 03-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a minor defect: only the first 14 chars of the 18 chars in the
--massif-out-file= option was being checked, which meant that if you did
--massif-out-filename=foo by mistake it would accept it and produce a file
called "ame=foo".

MERGE to 3_4_BRANCH



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9099 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9c606bd8634cd6b67bb41fa645b5c639668cfa2d 18-Sep-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
7064fb280267d51e3f7f398f22d0e4800ec969e4 30-May-2008 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a bug in Massif and Cachegrind, whereby if program's forked, the child
wrote into the parent's output file even if %p was specified.

Josef, I think Callgrind does not have this bug, but you might want to say
something about forking in the manual, as I have done for Massif and
Cachegrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8154 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f330ae85d6b6c603dedb10bf1c70606c8df92dd1 13-May-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Stop massif segfaulting due to stack overflow, when printing snapshots
arising from large C++ applications on amd64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8058 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
7cf4e6b6aed533af53339f36099ed244dc4a5b7f 01-May-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output. This
will be fixed.

The core-tool interface is slightly changed. The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b8b79addf04dd5d0b558916e26df0b1927cbd758 03-Mar-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in the DATASYMS branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
b11e5aaab306bbbf5280a3d0efc473664a48a306 20-Jan-2008 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> When truncating long lines in the output file, make sure they end with a
newline. Fixes bug #155929.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7355 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d59c9d5c1cb8038d782d77206b9e572472689628 04-Dec-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> tweak message



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7271 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
dbeb53581d4595a0513d879ba884b108bd3e571e 04-Dec-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Two changes:
- Be more robust in the face of malformed stack traces. This avoids some
potential assertion errors (which have affected prior versions of Massif),
but unfortunately reduces the amount of sanity-checking that can be done
on XTrees.

- Get white-space printing right in output file. Non-functional change,
just makes output files easier to read.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7270 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3b677e56014e94554456bb24853849cec228d617 03-Dec-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment-only change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7269 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
0f85e029aec63c86bfe51360acee949b71e08600 27-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Minor updates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7239 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ab23b615fc56c1bf47fb04d62188932291c3a871 27-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update test output for a recent graph-drawing change. Update some notes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7233 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
15aeb15848f2a307ec87732383e333d4c8640854 26-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Minor tweak to drawing of peak and detailed snapshot bars on the graph.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7231 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b088b89c8e244a2a358cd205de37df79cb5cb50d 26-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Minor tweak to x-axis positioning of bars.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7230 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
1a2741aad64315cd5da0cc877f474d53af16b5a3 26-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> - Rewrote documentation.
- Added a new time unit, instructions executed, and made it the default -- it's
much more reproducible and consistent than milliseconds. Requires IRSB
instrumentation and so slows down some programs (malloc-light ones such as
bzip2) by about 20%, others by less.
- ms_print now doesn't overwrite the x-axis in the graphs.
- Added a test for --detailed-freq and --max-snapshots


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7229 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
374a36dbfb6d08ed8d77c31a88e198a861ffadf0 23-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fixed up the log file mess throughout, including the docs. This killed
--log-file-qualifier and --log-file-exactly.

Updated NEWS some in preparation for 3.3.0.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7202 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3ed1971497f0d58f894ed6a61c30ea3a79b69a25 23-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add support for %q in --massif-out-file. Todo: use this mechanism for the
core and Cachegrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7200 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f4c665fc4cbfb05ed0b31364270b00334cbd1f18 20-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Do Massif output file name properly. Default is massif.out.%p, where %p
expands to the PID. Updated the tests. Still todo: handle %q for
environment variables, and do the same for the core and
Cachegrind/Callgrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7190 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
62721e90cec685b202424719f7237620e2c5780d 11-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> - Make other integer CLO macros more correct, as I did for VG_NUM_CLO in the
last commit.
- Add a VG_DBL_CLO for fractional arguments.
- Make Massif's --threshold and --peak-inaccuracy arguments fractional.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7150 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
55a300483970fd2ace702ec8a1221810fb5ab832 10-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Filter out some of Massif's verbose output that varies from machine to
machine, caused by them getting slightly different stack traces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7134 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
32397c0c26fd49181e87a409ad986b9e1b5b0dfd 10-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed Massif to record the 'slop' heap bytes caused by rounding asked-for
sizes up to a multiple of 8 (or whatever --alignment is). This is combined
with the "admin" bytes, resulting in the "extra" bytes. Added
VG_(malloc_usable_size) to the tool interface to support this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7133 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
39f3423cd68c385be301e6b44848b4c6276da7b5 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge (from branches/THRCHECK) the following amd64-linux stack unwind
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
df02bbc314ae1c05716c78079f476beafebcfa3d 02-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update todo notes



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7084 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
429afb4dd4ef1fc17845f82132772b7a18c98e5b 02-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix 64-bit Massif breakage, caused by problems with integer arithmetic on
values of different signs and sizes that only a C language lawyer would
spot.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7080 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
734b805cb3af82ddd7d3ba22a0e22aba29b78305 01-Nov-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged the MASSIF2 branch to the trunk. Main changes:

- ms_main.c: completely overhauled.

- massif/tests/*: lots of them now.

- massif/perf/: added.

- massif/hp2ps: removed. No longer used.

- vg_regtest: renamed the previously unused "posttest" notion to "post".
Using it for checking ms_print's output.

Although the code has changed dramatically, as has the form of the tool's
output, the information presented in the output is basically the same,
although it's now (hopefully) much more useful. So the tool name is
unchanged.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7069 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b56e602a300b0dd9308f614da96dd264847402f1 24-Sep-2007 dirk <dirk@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix various format string errors


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6907 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
8a7b41b41b46c0aa7bd4b6678b82285437e7f08c 23-Sep-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix various format string errors, courtesy of Florian Krohm.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6902 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
73c649427e1f0934af0975d155d9a1aa84afa740 14-Sep-2007 dirk <dirk@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix division by zero's


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6830 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3f94a7d39676262e70c768e5a20a225f1ca36b29 25-Aug-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changes to m_hashtable:

Allow hashtables to dynamically resize (patch from Christoph
Bartoschek). Results in the following interface changes:

* HT_construct: no need to supply an initial table size.
Instead, supply a text string used to "name" the table, so
that debugging messages ("resizing the table") can say which
one they are resizing.

* Remove VG_(HT_get_node). This exposes the chain structure to
callers (via the next_ptr parameter), which is a problem since
callers could get some info about the chain structure which then
changes when the table is resized. Fortunately is not used.

* Remove VG_(HT_first_match) and VG_(HT_apply_to_all_nodes) as
they are unused.

* Make the iteration mechanism more paranoid, so any adding or
deleting of nodes part way through an iteration causes VG_(HT_next)
to assert.

* Fix the comment on VG_(HT_to_array) so it no longer speaks
specifically about MC's leak detector.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6778 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
198f34fa929569172d863f9c33f9686855ca975a 10-Jul-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of VG_(getcwd) and replace it with a pair of functions,
VG_(record_startup_wd) which records the working directory at startup,
and VG_(get_startup_wd) which later tells you what value was recorded.
This works because all uses of VG_(getcwd) serve only to record the
directory at process start anyway. The motivation is that AIX does
not support sys_getcwd directly, so it's easier for the launcher to
ship in the required value using an environment variable. On Linux
sys_getcwd is used as before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6764 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9a0cba4e767f487c2abaa35f95a3452d6bd0ff66 16-Apr-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some copyright notices:
- extend some to 2007
- use njn@valgrind.org instead of njn25@cam.ac.uk
- use "tool" instead of "skin"


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6703 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
a3e991b21b1896de9b6071d937bf8dbc95933197 27-Mar-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix bug 142491: allow more --alloc-fn functions (128, up from 32).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6671 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
14c7cc5a5fbe9526329f058116f921988efe679e 25-Feb-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of the type XArrayStrings in m_clientstate and use new generic
equivalents in module m_xarray instead. A suprisingly pervasive
change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6616 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
0b9d74abd0a663b530d290b2b788ddeda46e5400 24-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Non-functional commit: track IR renaming in vex r1689.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6416 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e808930793aeddc4cfd3e7a94b665913bec2566c 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track SysRes change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6294 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6893d65852940741dbebbc6ba1480e89cf34e30f 15-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move functions which deal with bad command line options from m_main
into m_options.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6233 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
4cfea4f9480393ed6799db463b2e0fb8865a1a2f 14-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Create a new module, m_vki, and move all knowledge about the kernel
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
461df9c36f6a07e4f0c14ae068e8e8e9bd383b26 17-Jan-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> These files all speak about instrumentation functions.
Instrumentation functions now take a callback closure structure
(VgCallbackClosure*), so this commit changes the signatures
accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5535 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
bcd75fcb80c13b9828a4c33b0d7acf1499e14135 19-Dec-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove all remaining profiling gunk.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5388 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
151a639d523a1d9b4cbd6629992e48ed8ee9408e 11-Nov-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix compiler warnings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5083 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
4ba057cce1d81a949f5a899b5abb99e90a731bcc 18-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the core-tool interface so that tools are fully aware of both
the guest extents for the presented translation and also its original
un-redirected guest address. These changes are needed in particular
to make cachegrind's code cache management work properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4943 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
0cd42f0881519a581909b670a4aebe27e53155de 06-Oct-2005 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix realloc wrappers to handle the out of memory case properly - if
the call to VG_(cli_malloc) returns NULL then don't try and copy the
data or register a new block and just leave the old block in place
instead, but still return NULL to the caller.

Fixes bug 109487 and it's duplicates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4875 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
45f4e7c91119c7d01a59f5e827c67841632c9314 27-Sep-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> This commit merges in changes from branches/ASPACEM (specifically,
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
99cb9e3fca178235e290dadde5534ae2042c9914 25-Sep-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> actually, they're unsigned



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4766 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
71adc3682ef6a35fcf65c7aba88bd437fb2ce553 25-Sep-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Print longs as longs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4765 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d111d100b250215516c66f0fceda76815191afa0 13-Sep-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't print the client's argv[i] if it's null, and related changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4629 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
68e46599b8196cc3eae91d65602ee72650c82e9a 26-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change slightly the way integers are printed by printf() and friends.

Previously, %d printed a 32-bit int. %ld and %lld printed 64-bit ints.
So if you wanted to print a word-sized int (eg. a SizeT variable), you
had to cast it to a Long and then print with %lld in order to work on
both 32-bit and 64-bit platforms.

I changed things so that %d prints a 32-bit int, %ld prints a word-sized
int, and %lld prints a 64-bit int. There are two advantages to this:
- it now matches the way the normal glibc printf() works;
- you can print word-sized ints without casting.

I also made the corresponding change for %u/lu/llu and %x/lx/llx, and I
changed a couple of VG_(printf)() invocations accordingly.





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4527 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
a079365fef42a43a2c7b4d5742dc23c0c86e250f 16-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> wibbles



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4433 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9a46324fe85e70f08777cf7e37863293a25637ba 16-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> lots of little wibbles



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4432 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
1d0cb0d000768c01536d61cbb0a2d6e8a9af52eb 15-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Something I realised recently: in C, iterators are much better than
higher-order functions for traversing data structures. The higher-order
approach is too clumsy due to the lack of polymorphism and closures; you
have to use void* too much and it is more verbose than it should be.

Hence, I replaced all the uses of HT_first_match() and
HT_apply_to_all_nodes() with equivalent uses of the hashtable iterator.
Also replaced higher-order traversal functions for Memcheck's freed-list
and the thread stacks with iterators. That last change changes the
core/tool interface, so I've increased the version number.







git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4415 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
246a9d2e0c66b3f69d7a23f370205a48368843b7 14-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed many, but not all, of the VgHashNode* parameters and return
types in m_hashtable.c to void*. This requires no changes to code
already using VgHashTables, but it allows some previously-required casts
to be removed. I also changed Memcheck and Massif by removing some of
these now-unnecessary casts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4404 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f1c5def3e78f2791ec62e5774d04b3258325155e 11-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Massif cleanups.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4381 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5cc5d7e2b8f361ac222b2cd34fd365abba82dc8e 11-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Streamline handling of realloc() in Memcheck and Massif by using
the newly added VgHashTable functions. Also some other minor changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4380 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9e7ce217e96aa9778d45691a97118719a94b193a 10-Aug-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Use memcpy() instead of a loop.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4377 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
9264559eba4aa5d397a278b4e1a50c03de30693f 23-Jul-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A commit which is almost all trivial change.

- m_main: if --log-file-qualifier applies, do not add ".pid"
at the end of the name

- Fix the logic which detected whether the just-devised name
already existed. This was broken (by me) because it could not
distinguish the reasons for failing to open the logfile.

Doing this required changing the return type of VG_(open)
from Int to SysRes (to make failure reasons visible) and
that's the cause of most of the changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4228 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f69f945020cbcc35fe0c98c3b223d96c7322a95a 03-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed m_hashtable.c to allow the size of the hash table to be specified
when it is created. Fortunately this didn't affect code outside this
module except for the calls to VG_(HT_construct)().

As a result, we save some memory because not all tables have to be as big
as the ones needed for malloc/free tracking.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4100 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
57ca7abfcefb38c62a60fb41aa91227303dd2db6 22-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove VG_(getcwd_alloc)(), which can be done otherwise pretty easily.
This halves m_libcfile's dependence on m_mallocfree.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3995 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b506bd863e6cab5aea7cc4bea2ac3bc19a781b56 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved VG_(first_matching_thread_stack), removing m_threadstate's dependency
on m_machine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3983 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
fc51f8d9538eda285c2ea0974f29b075168f3433 21-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Malloc replacement worked very much like a 'need', but wasn't one.
I've changed it so it now is, which makes it consistent with the
other 'needs'. Because of this, I was also able to invert the dependence
between m_mallocfree and m_tooliface, which is related to setting
the redzone size for client heap blocks. As a result, m_tooliface
now doesn't depend on anything except pub_core_basics.h, hooray!



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3979 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
c7561b931e249acf3768ead77638545b0ccaa8f1 19-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Final commit for the initial modularisation pass:

- 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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
f39e9a36dca9642668a66c6b054f81c88650bcb9 12-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Finished the modularisation of vg_mylibc.c, which meant it could be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3894 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
e9befc6536670e4a494b7035363fc080eda98644 11-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the libc low-level memory management stuff (mmap, etc).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3891 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
eb8896b58301a0a7a34281384d705072994369f0 04-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised file and socket libc stuff in m_libcfile.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3844 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
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/massif/ms_main.c
36a20fa5f779a0a6fb7b4a90dcaa6376481f1faa 03-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularise printing functions in m_libcprint.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3840 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
97405b2d134b52880d6dbec3eb2929e2002c2542 02-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Started modularising vg_mylibc. Put all the standalone stuff -- ie. not
relying on any other modules -- in m_libcbase.

Also converted the 'size' parameters to functions like VG_(memcpy) and
VG_(strncpy) from Int to SizeT, as they should be.

Also removed VG_(atoll16) and VG_(toupper), which weren't being used.

Also made VG_(atoll36) less flexible -- it now only does base-36 numbers
instead of any base in the range 2..36, since base-36 is the only one we
need. As part of that, I fixed a horrible bug in it which caused it to
return incorrect answers for any number containing the digits 'A'..'I'!
(Eg. for "A; it would return 17 instead of 10!)

Had to disable the assertions in VG_(string_match), since this module can't
see vg_assert, which wasn't ideal but also isn't a disaster.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3838 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
31513b4ab8477029517f07f0dcf1b441cb818548 01-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the profiling stuff as m_profile.c. It's much more
sensible now -- no vg_dummy_profile.c, no silly #including of
vg_profile.c from tools.

Unfortunately, it still doesn't work, due to bad interactions
with signal handling that I don't understand.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3833 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ea27e4627518665dd6c81213c0ba1f7ff0218e1a 31-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised all the debug info stuff as m_debuginfo/. It's a mess
and needs further cleaning up, but it's a start.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3821 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6f1f76d80b4020731bf5e59925380f2ded1fefd1 24-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix error found by Madhu Kurup:

Loop overrun occurs as the i+1 value is being processed. A code path
exists where i can be uninitialized but incremented (line 1082).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3800 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
2024234c590f408994b373abfb00bc2cd2a90c48 17-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Added module m_options for holding all the command-line option stuff.
Perhaps parts of process_cmd_line_option() should go in here, but I've
not done that for now.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3751 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
02bc4b8f54227320aa2b9ac4805173e0e2e3eeae 15-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't mix backticks and apostrophes when quoting words -- eg. use 'foo'
rather than `foo', as www.cl.cam.ac.uk/~mgk25/ucs/quotes.html explains
we should (in more detail than you'd imagine was possible). I did this
both in output messages and in some comments, for consistency.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3723 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
81c00df9ac724e898179dd90e52b2e15deb11fd8 14-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised vg_hashtable.c as m_hashtable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3710 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
43b9a8abb139b86a24457fa3c19b9cb60ca17c3a 10-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the core/tool interface ('details', 'needs' and VG_(tdict))
into a new module m_tooliface. Pretty straightforward. Touches a lot
of files because many files use this interface and so need to include
the headers for the new module.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3652 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
717cde5bda18d17792d1994c61b6a27408b4b4a7 10-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Modularised the malloc/free stuff into two modules: m_mallocfree for the
malloc/free implementation, and m_replacemalloc with the stuff for the tools
that replace malloc with their own version. Previously these two areas of
functionality were mixed up somewhat.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3648 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
51d827bcd88ce045a383ea1ca81768757df2d1fa 09-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Big clean-up: changed the core/tool interface to be mediated entirely
through the VG_(tdict) function dictionary, rather than using TL_(foo)
functions.

This facilitated the following changes:

- Removed the "TL_" prefix, which is no longer needed.

- Removed the auto-generated files vg_toolint.[ch], which were no longer
needed, which simplifies the build a great deal. Their (greatly
streamlined) contents went into core.h and vg_needs.h (and will soon
go into a new module defining the core/tool interface).

This also meant that tool.h.base reverted to tool.h (so no more
accidentally editing tool.h and not having the changes go into the
repo, hooray!) And gen_toolint.pl was removed. And toolfuncs.def was
removed.

- Removed VG_(missing_tool_func)(), no longer used.

- Bumped the core/tool interface major version number to 8. And I
killed the minor version number, which was never used. The layout
of the ToolInfo struct is such that this should not cause problems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3644 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
2bc10126a94b421a490b2759dc50ab67ec4ee116 08-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A crucial, crucial change: update my email address.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3632 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
8a97c6d61ccd93aae5034e2f3f619c62c9a9cc41 31-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> This change reduces the number of calls to dlsym() when loading tools from a
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
45270a2bf0ada5e422b17b779d8434d8d6504fe5 27-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Make the 'arg' parameter to VG_BOOL_CLO and similar macros explicit, rather
than implicit. Also tweak some formatting of command-line arg code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3453 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
31066fdeab8de4f54272c8cf3a7e9bf1fa74d1e5 26-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't use the VGP_ for profiling any more, just use VG_ -- we want to use
VGP_ for platform-specific things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3435 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d01fef7de693582a6ce32bdbef7c9040ad6b356b 26-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A modularisation + refactoring commit. vg_execontext.c has been split into
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d54babf82db303dfe43082bfe1af75d7b58b3267 21-Mar-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Track Vex API change in rev 1062: pass both the guest and host word
sizes to the instrumentatation functions. Make most of the tools
abort if they are not the same; we can't handle that case yet.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3397 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
467a020e4179d01492ad762443e6aee718fbaceb 12-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't print debug info.

MERGED FROM CVS HEAD



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3310 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
5361242f022b38fadb4cdf02428cea8b8d901a90 12-Mar-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
b5f6f51ebcac183818061bf53427a3e7808ef10d 11-Mar-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in changes from the 2.4.0 line. This basically brings in the
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
0e742df4479749af653a03a348e779539215dc2b 30-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness: fix nasty bug... in the memory allocators, redzones
were being kept as UInts. They were sometimes negated and then used as
indices to arrays, and on 64-bit platforms they get converted
incorrectly (using zero-extension instead of sign extension, I think)
before the indexing happens, giving a totally bogus index.

The fix was to convert all these types to SizeT. It would be nice to be
able to avoid this automatically somehow in the future.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3158 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
57735908562b1c675feed4ffba7751cbc2027290 25-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Reinstate Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3102 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ee8a58653df90df10a89eb5a361436ddbf98f5c9 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update Massif's TL_(instrument)() to work with Vex (trivial).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3070 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
26f025100805e561354c8c98b5ebb0c4a517d9a9 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Converted the SK_ prefix to TL_ everywhere.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3060 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
4be0a69aefbf8da1e4b8039ee91a8fa5b9c98386 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed some profiling events.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3059 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
6799325d013e8e5668c2b8727203c77294ccd202 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed VG_(skin_panic) as VG_(tool_panic).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3057 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
ca82cc01fb1580551144b69d3f17213a80d952e1 22-Nov-2004 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Renamed sk_assert() as tl_assert().



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3055 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
d1b64b282b70986b2904df27d7a91dad465178b6 04-Nov-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness: convert client requests to receive and return UWords.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2921 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
3d6b6118a041da686ab7c9473294921a38d8d962 04-Nov-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness: make the hash-table have UWord keys instead of UInt keys.
Allows addresses as keys.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2916 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
acac2fd2211248d32f23c59ddbff9bf96bbf0d3e 04-Nov-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness: replace hard-wired 0xffffffff literals with something less
32-bit-specific.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2914 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
8b5f40c481a89483c1738e5d5e9e718b418948d4 02-Nov-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness:
- Use SizeT instead of UInt for new_mem_stack and all the related functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2908 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
7ac7f7b2ccfc708851a758e9c8dd43ce7d325a10 02-Nov-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> 64-bit cleanness: Converted malloc() et al to use SizeT rather than Int.
This required some tricks with casting to maintain Memcheck's silly (ie.
negative) arg checking. The allocator was also changed accordingly. It
should now be able to allocate more than 4GB blocks on 64-bit platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2906 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
159dfefd68893bd5f5260a267956d9872261015d 13-Sep-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Don't inline large function


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2712 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
46063201cea329c862bed94ffffae9c82a706be5 02-Sep-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
43a15ce615589c8a44d19b1b7d1531a04618913a 30-Aug-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid divisions by zero. This fixes bug 78765.

Also renamed two of the XPt fields so that things are clearer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2628 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
996901a830e8e7c3fd8be8f0c675c71f2b108957 03-Aug-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Comment changes only: s/skin/tool/


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2555 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
57e36b3e766c9e33c59f994319b66a51b37319f7 10-Jul-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix for bug #78048.

Problem was that the malloc-replacing tools (memcheck, addrcheck, massif,
helgrind) would assert if a too-big malloc was attempted. Now they return 0 to
the client. I also cleaned up the code handling heap-block-metadata in Massif
and Addrcheck/Memcheck a little.

This exposed a nasty bug in VG_(client_alloc)() which wasn't checking if
find_map_space() was succeeding before attempting an mmap(). Before I added
the check, very big mallocs (eg 2GB) for Addrcheck were overwriting the client
space at address 0 and causing crashes.

Added a regtest to all the affected skins for this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2462 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
4ad52d05745dddc77f7a12b55b8c59839f37ada7 27-Jun-2004 thughes <thughes@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed all uses of nested functions as they only work with gcc and
cause the stack to be marked as executable in order for them to work.

All assembler files have also had a declaration added so that the
object they generate will be marked as not needing an executable stack.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2446 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
27fec9071fd5365fa4a517fb77b844b6f8712268 16-Jun-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Introduced 4 macros to minimise boilerplate command line processing code.
Nicely cuts around 130 lines of code, spread over the core and several tools.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2422 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
eb479cb527466a87e8757722a80c3a2291f5d77a 11-May-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix patch from this morning -- missing commas, erk


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2397 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
c7469188956ae9df5401cb626af52b5f53dd1457 11-May-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Teach Massif about the 'nothrow' versions of new and new[].


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2396 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
2da914c97bb1f2e8bf77ab6d1e94adfee30a15a1 11-May-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2395 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
fc01635cb093d0b6cae883f8e347cdf9dceb01dd 27-Apr-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix for bug 79355: fix up bogus assertion that was failing when
stack_snapshot() returned 0xffffffff as one of its eip values.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2390 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
29b02616eab2b59ec3134e7445829c640fbdd560 16-Mar-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove Massif's version number now that it's part of the main distro.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2330 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
612e83669dfbbd34ae467085f728e91675a8c964 07-Mar-2004 jseward <jseward@a5019735-40e9-0310-863c-91ae7b9d1cf9> Be slightly less verbose at -v.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2292 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
51f3ff144429823396f58a91b0268eebb966233c 04-Mar-2004 fitzhardinge <fitzhardinge@a5019735-40e9-0310-863c-91ae7b9d1cf9> List memalign as an allocator.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2287 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
27645c797e9287c01736e36818df4a5d0fb95f23 23-Feb-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Changed bug_reports_to.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2261 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c
c9f3692175ba544ecef6f905f5dcd755c3b153be 14-Feb-2004 nethercote <nethercote@a5019735-40e9-0310-863c-91ae7b9d1cf9> Adding Massif, the heap profiler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2245 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/massif/ms_main.c