30 Commits

Author SHA1 Message Date
Florian Krohm
aa351c61c1 Constify.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14641
2014-10-18 20:56:13 +00:00
Florian Krohm
c88dc7f039 Tidy up m_xarray.c.
VG_(newXA) and VG_(cloneXA) never return NULL. Remove pointless asserts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14539
2014-09-15 18:50:17 +00:00
Julian Seward
d410da3564 Add client requests
VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE and
   VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE
and supporting machinery for managing whole-address-space sparse
mappings.  n-i-bz.  In support of
https://bugzilla.mozilla.org/show_bug.cgi?id=970643



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13884
2014-03-20 23:00:09 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Florian Krohm
e7f4d4f57f 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
2012-11-24 19:41:54 +00:00
Florian Krohm
af66466ce4 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
2012-11-23 16:17:43 +00:00
Florian Krohm
25b18b0aa1 Char/HChar and constness fixes. Mostly cost center
on allocators which is always a const HChar *


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13089
2012-10-27 23:07:42 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Julian Seward
8b6f93641c Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484
2012-04-02 21:56:03 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Bart Van Assche
71a513f01a Format functions: change format specifier %t into %pS. Remove the _no_f_c formatting function variants.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12108
2011-10-06 19:08:37 +00:00
Julian Seward
3e9f7836c5 Merge the contents of the HGDEV2 branch into trunk:
* performance and scalability improvements
* show locks held by both threads in a race
* show all 4 locks involved in a lock order violation
* better delimited error messages



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11824
2011-06-24 10:09:41 +00:00
Julian Seward
62134f346f Back out r11568 (Add a new constructor for empty XArrays,
VG_(newSizedXA)) since r11571 removes the only use of the
functionality that r11568 introduces.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11573
2011-02-27 23:53:32 +00:00
Julian Seward
0c2371837b Add a new constructor for empty XArrays, VG_(newSizedXA). This is
identical to VG_(newXA) but allows passing in a size hint.  In the
case where the likely final size of the XArray is known at creation
time, this allows avoiding the repeated (implicit) resizing and
copying of the array as elements are added, which can save a vast
amount of dynamic memory allocation turnover.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11568
2011-02-23 13:22:24 +00:00
Julian Seward
d4a18f87cc Add a method to get the contents of an XArray so we can index in
it really fast, or iterate over it.  This is dangerous and breaks
the nice abstraction (sigh).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11122
2010-05-05 09:23:41 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Julian Seward
5b1edb07f6 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
2009-08-15 22:41:51 +00:00
Julian Seward
5653b12bb2 New methods in WordXA:
* lookupXA_UNSAFE -- binary search in array without being forced
  to sortXA it first -- dangerous because if the array isn't in order
  then the lookup can loop forever

* dropHeadXA -- drop the first N elements (kinda like dropTailXA, but
  unfortunately O(N) not O(1)), so that xarrays can be used to
  implement FIFOs, after a fashion.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10583
2009-07-24 08:11:39 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +00:00
Julian Seward
35c28b721f Merge Helgrind from branches/YARD into the trunk. Also includes some
minor changes to make stack unwinding on amd64-linux approximately
twice as fast as it was before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8707
2008-10-25 16:22:41 +00:00
Julian Seward
335992d8fc 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
2008-09-18 18:12:50 +00:00
Julian Seward
6136f591ba Try and bit a bit more space-economical, by increasing the
average loading factor from 0.75 to 0.83, and by being more
careful in VG_(cloneXA).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8539
2008-08-22 23:16:06 +00:00
Julian Seward
9d24c252e1 Make VG_(addToXA) and VG_(addBytesToXA) 64-bit clean.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8525
2008-08-19 08:57:49 +00:00
Julian Seward
14af4957fc Merge in the DATASYMS branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540
2008-03-03 01:35:41 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
2cf4a1813a Fix silly bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6786
2007-08-28 05:19:16 +00:00
Nicholas Nethercote
742ae56613 Remove duplicate code -- make XArray use VG_(ssort).
Had to change XArray's comparison function to return an Int rather than a
Word so it's consistent with the rest of the world.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6680
2007-03-28 01:27:05 +00:00
Julian Seward
0a28307fca VG_(addToXA): return index in the array where the item was added.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6619
2007-02-27 16:40:53 +00:00
Julian Seward
e34b7496c6 Make all the m_xarray functions tool-visible.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6615
2007-02-25 15:04:40 +00:00
Julian Seward
804c7868a1 Expandable arrays of arbitrary element type T are a simple, useful
abstraction implemented independently in several places in the code
base (bad!).  This commit moves into public view a generic
implementation of it which has been lurking in readxcoff.c for some
time.  Currently nothing uses it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6614
2007-02-25 11:51:13 +00:00