History log of /external/valgrind/include/pub_tool_tooliface.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b3a1e4bffbdbbf38304f216af405009868f43628 21-Aug-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates, to include 2015. No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
8eb8bab992e3998c33770b0cdb16059a8b918a06 21-Jul-2015 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Bug 345248 - add support for Solaris OS in valgrind

Authors of this port:
Petr Pavlu setup@dagobah.cz
Ivo Raisr ivosh@ivosh.net
Theo Schlossnagle theo@omniti.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
ddd61ff058f02059064e083a8accaefed23d5548 04-Jan-2015 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change most remaining use of Addr64 in coregrind and the tools to Addr.
Tracking VEX r3056.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14846 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
8e3fbb5cd8276a7d07d5712bc05f9b3376d81a6a 20-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Constify the tool interface.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14642 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
3e81b8bed1f7ab6848a83f5507487131a6f9d778 07-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14606 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
07c08527f05caeb0062b42ca9a58ee774ec5fba1 14-May-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Factorises the address code description and printing
of memcheck and helgrind in a common module:
pub_tool_addrinfo.h pub_core_addrinfo.h m_addrinfo.c

At the same time, the factorised code is made usable by other
tools also (and is used by the gdbserver command 'v.info location'
which replaces the helgrind 'describe addr' introduced 1 week ago
and which is now callable by all tools).

The new address description code can describe more addresses
(e.g. for memcheck, if the block is not on the free list anymore,
but is in an arena free list, this will also be described).

Similarly, helgrind address description can now describe more addresses
when --read-var-info=no is given (e.g. global symbols are
described, or addresses on the stack are described as
being on the stack, freed blocks in the arena free list are
described, ...).
See e.g. the change in helgrind/tests/annotate_rwlock.stderr.exp
or locked_vs_unlocked2.stderr.exp

The patch touches many files, but is basically a lot of improvements
in helgrind output files.
The code changes are mostly refactorisation of existing code.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13965 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
8587b54312d2ac75d9d9fc7c2d3cb14f5d1ae841 15-Dec-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement gdbsrv "v.info stats" command giving statistics for valgrind core + tools

* addition of VG_(needs_print_stats) in pub_tool_tooliface.h
* use the above in memcheck and helgrind
* output valgrind stats and calls print_stats in server.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13760 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
4e32d67a5b880bf1d871c5141822078d4dcdc3ac 18-Oct-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Allow tools to provide some statistics in suppression list produced at the end

Option -v outputs a list of used suppressions. This only gives
the nr of times a suppression was used.
For a leak search, this only gives the nr of loss records that
have been suppressed, but it does not give additional needed details
to understand more precisely what has been suppressed
(i.e. nr of blocks and nr of bytes).

=> Add in the tool interface update_extra_suppression_use and
print_extra_suppression_info functions to allow the tool to record
additioonal use statistics for a suppression. These statistics
can be done depending on the error (and its data) which is suppressed.

Use this in memcheck for the leak suppressions, to maintain and output
the nr of blocks and bytes suppressed by a suppression during
the last leak search.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13651 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
362441db825242200142a91bb07c4a0300b36a3e 23-Jul-2013 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> fix incorrect lineno in supp error msgs+ -v give filename+lineno of used supp.

If a suppression file contains an error, the lineno reported could be wrong.
Also, give filename and lineno of the used suppressions in -v debugging output.

The fix consists in ensuring that tool specific read_extra function gets
the Int* lineno pointer, together with other VG_(get_line) parameters.






git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13469 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
e543f3024ace2925a0fb81985e9fcfc95b8c555a 21-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> First round of Char/HChar fixups for coregrind and memcheck.
Little bit of ripple in tools, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13074 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
2b8059ad8e01f0928e8767ae25b9103c4ef15f18 14-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some more Char / HChar mixups


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13042 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.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/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
588adeffafa8102adcfa7a1c035ae272b35cf86d 16-Aug-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> When generating XML output for suppressions, print the suppression
both wrapped up in XML tags (as before) but also in plain text in a
sequence of CDATA blocks. Normally only one, but in the worst case
the raw data will have ]]> in it, in which case it needs to be split
across two CDATA blocks.

This apparently simple change involved a lot of refactoring of the
suppression printing machinery:

* in the core-tool iface, change "print_extra_suppression_info" (which
prints any auxiliary info) to "get_extra_suppression_info", which
parks the text in a caller-supplied buffer. Adjust tools to match.

* VG_(apply_StackTrace): accept a void* argument, which is passed to
each invokation of the functional parameter (a poor man's closure
implementation).

* move PRINTF_CHECK into put_tool_basics.h, where it should have been
all along

* move private printf-into-an-XArray-of-character functions from
m_debuginfo into m_xarray, and make them public

* gen_suppression itself: use all the above changes. Basically we
always generate the plaintext version into an XArray. In text mode
that's just printed. In XML mode, we print the XMLery as before,
but the plaintext version is dumped into a CDATA block too.

* update the Protocol 4 specification to match all this.

This still isn't 100% right in the sense that the CDATA block data
needs to be split across multiple blocks if it should ever contain the
CDATA end mark "]]>". The Protocol 4 spec has this right even though
the implementation currently doesn't.

Fixes #191189.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10822 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
a5453e940c8b287889b3ceade0255367627f7a38 28-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Clarify a comment.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10641 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
35db56c19847654f22b62da059083d41ff4258c5 24-Jul-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> A fix for bug 186796: suppression symbol names were being truncated if they
were longer than 200 chars. Now dynamic memory is used and so they can be
arbitrarily long in theory, although in practice it bombs out at 100,000 for
sanity purposes. This required adjusting the core/tool interface for
read_extra_suppression_info().


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



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10476 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
08ce7b3d1ea0fa37e3a1c9c401c118f9c5a8f389 27-Feb-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove dead code relating to interface versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9289 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
c4431bfe04c7490ea2d74939d222d87f13f30960 15-Jan-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT; OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be. Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
66385b4ba782e6671223a5b2dd2f2ce6c5b39c29 01-May-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Bump the core/tool iface version number, since the just-merged-in
changes for Memcheck origin tracking change the interface (slightly).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7984 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
7a387ea74af6e887c6fb30092485fb0cf614fb2a 25-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Core-tool iface changes needed to support exp-drd (Bart Van Assche).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7212 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
391ddf8c496287b2d97af495424d921674ffc920 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix bogus grammar in r7139.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7140 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
29d68f7c07b7aa8ea3a3ebf96d29792b97800bed 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Clarify reason for existence of track_pre_thread_ll_create/_exit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7139 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
adb102f8a53d100cf2d68a1a00bb24a4bcd2b049 10-Nov-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge (from branches/THRCHECK) the following two changes to the core-tool
interface:

r6805: Modify two thread-notification events in the core-tool
interface. This removes track_post_thread_create and
track_post_thread_join. The core can only see low level thread
creation and exiting, and has no idea about pthread-level concepts
like "pthread_create" and "pthread_join", so these are a bit
ambiguous.

Replace them with track_pre_thread_ll_create, which is notified before
a new thread makes any memory references, and
track_pre_thread_ll_exit, which is notified just before the new thread
exits, that is, after it has made its last memory reference.

r6823: Core-tool interface: give 'needs_tool_errors' an extra Boolean
indicating whether or not the core should print thread id's on error
messages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7123 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
81651dc1ae8cc13a5c857a0fb4137304ed17aa43 28-Aug-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge, from CGTUNE branch, a cleaned up version of r6742:

Another optimisation: allow tools to provide a final_tidy function
which they can use to mess with the final post-tree-built IR before it
is handed off to instruction selection.

In memcheck, use this to remove redundant calls to
MC_(helperc_value_check0_fail) et al. Gives a 6% reduction in code
size for Memcheck on x86 and a smaller (3% ?) speedup.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6787 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
b5579c3dd5c139baac11d4a5719224b5ccda3997 23-Jun-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> VG_(needs_shadow_memory) does not exist; remove prototype for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6761 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
a0078592bf37169bd695369a4c9fa7d52a8b1b23 27-Mar-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> clarify comment



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6674 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
a3cc29f2f97b8d4248478d56374fe89eff2e878f 06-Feb-2007 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> s/IRBB/IRSB/



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6570 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
b5c757545ff2a66d9a3c155670a58e6ffa258407 28-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Get rid of the core-tool events pre_mutex_lock, post_mutex_lock and
post_mutex_unlock. The core can't detect them anyway any more, so
there's no point in having them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6456 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
3e32c877eb0dfe174c128317c19cc211365b4781 24-Dec-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Split the thread_runstate event into two, start_client_code and
stop_client_code, which is a bit clearer and easier to work with.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6418 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
975618137c5e56cc8f633d5747727f26e2fbc90b 23-Dec-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change the core-tool interface 'thread_run' event to be more useful:

- Rename the event to 'thread_runstate'.

- Add arguments: pass also a boolean indicating whether the thread
is running or stopping, and a 64-bit int showing how many blocks
overall have run, so tools can make a rough estimate of workload.

The boolean allows tools to see threads starting and stopping.
Prior to this, de-schedule events were invisible to tools.

- Call the callback (hand the event to tools) just before client
code is run, and again immediately after it stops running. This
should give correct sequencing w.r.t posting of thread creation/
destruction events.

In order to make callgrind work without complex changes, I added a
simple impedance-matching function 'clg_thread_runstate_callback'
which hands thread-run events onwards to CLG_(thread_run).

Use this new 'thread_runstate' with care: it will be called before
and after every translation, which means it will be called ~500k
times in a startup of firefox. So the callback needs to be fast.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6413 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
bb6311c071cea07f8269a494ce4d84782c85caed 15-Dec-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove defunct constant.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6401 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
f8126e9f46b58348ccd6d6055860289bfabf66b6 14-Nov-2006 dirk <dirk@a5019735-40e9-0310-863c-91ae7b9d1cf9> change void* to Addr in mutex helpers. patch by Bard Van Assche.
I've bumped the tool interface version because it seems binary
incompatible.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6350 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
f1962d3683b9bc0b8ba361e3d0194590fde7090b 19-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix bug in memcheck's instrumenter introduced in r6319. Big comment
in the code explains it. Sigh. Why can't anything be simple?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6322 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
0fc5cbd2f87dfe72cfc6333dd0f1c900364f66d6 18-Oct-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move VG_BUGS_TO to pub_tool_basics.h so that Nulgrind need not import
pub_tool_libcassert.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6320 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
9644cfd5d39ae7650c6d52f017d752397b3bb874 17-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update 'expected' default translation size (partial merge of r6214).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6301 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
358ebead83b79d9a3f1135e5c4d29982911a2122 15-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Minor comment mods.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6238 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
c87b5ec44ab37afb0bbd043dfce336ee541591e2 15-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add further comments about the tool instrument function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6237 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
7ce62399c2908f57a05baaa912043d606f536bf5 15-Oct-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add proper comments explaining the args for the tool instrumenation
function.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6236 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.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/include/pub_tool_tooliface.h
ca54af3adebe3ff9126ea2c2f6b9a9921269f9c4 16-Apr-2006 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Remove tool-specific code (which says which tools allow XML) from the core
by introducing a new "need": VG_(needs_xml_output)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5854 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
f5c8e37a8181cce9fd4681e68096e6e572882f9f 12-Feb-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Extend stack-permissions-change fast-case machinery to handle +/- 112,
128, 144 and 160.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5640 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
09ca09b2073eb3dffc53a6ca845566559f0bda26 16-Oct-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> augment comment



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4939 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
5155dec2ac1d0855fcdc5060503e1d98a281b26a 12-Oct-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Redo the way cachegrind generates instrumentation code, so that it can
deal with any IR that happens to show up. This makes it work on ppc32
and should fix occasionally-reported bugs on x86/amd64 where it bombs
due to having to deal with multiple date references in a single
instruction.

The new scheme is based around the idea of a queue of memory events
which are outstanding, in the sense that no IR has yet been generated
to do the relevant helper calls. The presence of the queue --
currently 16 entries deep -- gives cachegrind more scope for combining
multiple memory references into a single helper function call. As a
result it runs 3%-5% faster than the previous version, on x86.

This commit also changes the type of the tool interface function
'tool_discard_basic_block_info' and clarifies its meaning. See
comments in include/pub_tool_tooliface.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4903 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
0087c501c6356fb083c0ea12d87263aca7abf25a 01-Jul-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move the last remaining tests out of corecheck.

Also introduced VG_(showing_core_errors)() to make core error display
more consistent.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4073 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
b69f7c12ae343c3435b4b3bd0aa372144bdf5977 25-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved the mman VG_(*_native)() functions into m_aspacemgr, and removed
the unused init_shadow_page() function. As a result, m_aspacemgr no longer
depends on m_libcmman, breaking a circular module dependency, good!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4015 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
af839f52d74df156d655201a889954133ab01be7 23-Jun-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Removed the VGA_/VGO_/VGP_ prefixes for arch/OS/platform-specific
things. These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense. So let's get rid of them.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h
a8d8e239876796bc194636b8bb4b3b3c86db8528 07-Jun-2005 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> A major overhaul of all machinery to do with syscalls, but mostly of
the m_syscalls module. Fundamentally the aim of the overhaul is to
clean up the logic and abstractions surrounding syscalls in order that
we can cleanly support ppc32 and other new targets. Aims in detail:

* To further decouple the syscall PRE/POST wrappers from specifics of
how those values are stored on a given platform. The wrappers look
the same as they did before, mostly (eg, references to ARGn and
RES are unchanged), but now those macros refer to values in structs
SyscallArgs and SyscallStatus (see priv_types_n_macros.h).

* Complete overhaul of the driver logic for syscalls. The resulting
logic is algorithmically identical to what we had before, but is
more documented, and deals with moving arg/result data between
platform specific representations and the canonical forms in
structs SyscallArgs and SyscallStatus.

* Also as a result of this change, remove problems in the old logic
due to assignments of RES in PRE wrappers trashing the ARGs whilst
we still need to see them.

* Lots of other cleanups and documentation. There is extensive
commentary in syscalls-main.c.

The driver logic has been placed in its own file, syscalls-main.c.

New/deleted files in m_syscalls:

* syscalls.c is divided up into syscalls-main.c, containing driver
logic, and syscalls-generic.c, containing generic Unix wrappers.

* priv_syscalls.h is chopped up into priv_types_n_macros.h
and priv_syscalls-{generic,main}.h.

------------

All the above changes are in m_syscalls. However there is one
system-wide change as a result of all this.

The x86-linux assumption that syscall return values in the range -4095
.. -1 are errors and all others are values, has been done away with
everywhere. Instead there is a new basic type SysRes which holds a
system call result in a platform-neutral way.

Everywhere that previously an Int would have held a system call
result, there is now a SysRes in its place.

------------

Almost everything works on SuSE 9.1 (LinuxThreads) again. NPTL will
still be majorly broken; I will commit fixes shortly. AMD64 is also
totalled. I will get to that too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3849 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
acd885ab4a427bebde5459a589709e308c3d2c64 16-May-2005 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> core.h: remove some #include lines, move some others to more localised
places.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3745 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/include/pub_tool_tooliface.h
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/include/pub_tool_tooliface.h