]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoSet tests/check_ppc64le_cap to executable.
Carl Love [Tue, 19 May 2015 16:16:52 +0000 (16:16 +0000)] 
Set tests/check_ppc64le_cap to executable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15258

10 years agoFix for the HWCAP2 aux vector.
Carl Love [Tue, 19 May 2015 16:08:05 +0000 (16:08 +0000)] 
Fix for the HWCAP2 aux vector.

The support assumed that if HWCAP2 is present that the system also supports
ISA2.07.  That assumption is not correct as we have found a few systems (OS)
where the HWCAP2 entry is present but the ISA2.07 bit is not set.  This patch
fixes the assertion test to specifically check the ISA2.07 support bit setting
in the HWCAP2 and vex_archinfo->hwcaps variable.  The setting for the
ISA2.07 support must be the same in both variables if the HWCAP2 entry exists.

This patch updates Vagrind bugzilla 345695.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15257

10 years agoUpdate.
Julian Seward [Tue, 19 May 2015 16:01:40 +0000 (16:01 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15256

10 years agoSilence some reachable system library reports on OS X 10.10 for simple Hello World...
Rhys Kidd [Tue, 19 May 2015 13:53:27 +0000 (13:53 +0000)] 
Silence some reachable system library reports on OS X 10.10 for simple Hello World console application. No regressions. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15255

10 years agoFollow up to r15253:
Philippe Waroquiers [Sun, 17 May 2015 21:36:05 +0000 (21:36 +0000)] 
Follow up to r15253:
Having a one elt free lineF cache avoids many PA calls.
This seems to slightly improve (a few %) a firefox startup.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15254

10 years agoThis patch reduces the memory needed for the linesF.
Philippe Waroquiers [Sun, 17 May 2015 19:32:42 +0000 (19:32 +0000)] 
This patch reduces the memory needed for the linesF.

Currently, each SecMap has an array of linesF, referenced by the linesZ
of the secmap that needs a lineF, via an index stored in dict[1].
When the array is full, its size is doubled.
The linesF array of a secmap is freed when the SecMap is GC-ed.
The above strategy has the following consequences:
  A. in average, 25% of the LinesF are unused.
  B. if a SecMap has 'temporarily' a need for linesF, but afterwards,
     these linesF are converted to normal lineZ representation, the linesF
     will not be recuperated unless the SecMap is GC-ed (i.e. fully marked
     no access).

The patch replaces the linesF array private per SecMap
by a pool allocator of LinesF shared between all SecMap.
A lineZ that needs a lineF will directly point to its lineF (using a pointer
stored in dict[1]), instead of having in dict[1] the index in the SecMap
linesF array.
When a lineZ needs a lineF, it is allocated from the pool allocator.
When a lineZ does not need anymore a lineF, it is returned back to the
pool allocator.

On a firefox startup, the above strategy reduces the memory for linesF
by about 42Mb. It seems that the more firefox is used (e.g. to visit
a few websites), the bigger the memory gain.
After opening the home page of valgrind, wikipedia and google, the memory
gain is about 94Mb:
trunk:
  linesF:    392,181 allocd ( 203,934,120 bytes occupied) (   173,279 used)
patch:
  linesF:    212,966 allocd ( 109,038,592 bytes occupied) (   170,252 used)

There is also less alloc/free operations in core arena with the patch:
trunk:
  core    :   810,680,320/  802,291,712 max/curr mmap'd, 17/19 unsplit/split sb unmmap'd,    759,441,224/  703,191,896 max/curr,    40631760/16376828248 totalloc-blocks/bytes,   188015696 searches 8 rzB
patch:
  core    :   701,628,416/  690,753,536 max/curr mmap'd, 12/29 unsplit/split sb unmmap'd,    643,041,944/  577,793,712 max/curr,    32050040/14056017712 totalloc-blocks/bytes,   174097728 searches 8 rzB

In terms of performance, no CPU impact detected on Firefox startup.
Note we have no representative reproducible (and preferrably small)
perf test that uses extensively linesF. Firefox is a good heavy lineF
user but is far to be reproducible, and is very far to be small.

Theoretically, in terms of CPU performance, the patch might have some
small benefits here and there for read operations, as the lineF pointer
is directly retrieved from the lineZ, rather than retrieved via an indirection
in the linesF array.
For write operations, the patch might need a little bit more CPU,
as we replace an
  assignment to lineF inUse boolean to False (and then probably back to True
  when the cacheline is written back)
by
  a call to pool allocator VG_(freeEltPA) (and then probably a call to
  VG_(allocEltPA) when the cacheline is written back).
These PA functions are small, so cost should be ok.
We might however still maintain in clear_LineF_of_Z the last cleared lineF
and re-use it in alloc_LineF_for_Z. Not sure how many calls to the PA functions
would be avoided by this '1 elt cache' (and the needed 'if elt == NULL'
check in both clear_LineF_of_Z and alloc_LineF_for_Z.
This possible optimisationwill be looked at later.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15253

10 years agoAvoid warning about %d and long int
Philippe Waroquiers [Sun, 17 May 2015 18:37:14 +0000 (18:37 +0000)] 
Avoid warning about %d and long int

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15252

10 years agoWhen process dies due to a signal, show the signal and the stacktrace
Philippe Waroquiers [Sun, 17 May 2015 18:31:55 +0000 (18:31 +0000)] 
When process dies due to a signal, show the signal and the stacktrace
at default verbosity

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15251

10 years agoImprove trace of pkt send by V gdbsrv:
Philippe Waroquiers [Sun, 17 May 2015 16:34:04 +0000 (16:34 +0000)] 
Improve trace of pkt send by V gdbsrv:
  * show the len
  * print binary date using \octal notation (like printf, when given
    non printable chars)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15250

10 years agoFix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X. bz#319274.
Rhys Kidd [Sun, 17 May 2015 14:02:34 +0000 (14:02 +0000)] 
Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X. bz#319274.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15249

10 years ago* Let GDB user modify the signal to send to the guest process
Philippe Waroquiers [Sun, 17 May 2015 13:38:25 +0000 (13:38 +0000)] 
* Let GDB user modify the signal to send to the guest process
* implement qXfer:siginfo:read: packet to allow GDB to show $_siginfo

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15248

10 years agoAdd some more cfi directives
Philippe Waroquiers [Sun, 17 May 2015 08:24:40 +0000 (08:24 +0000)] 
Add some more cfi directives
With some gcc versions, without these directives, unwind does
not work or gives strange entries in stack traces.

Patch from Matthias Schwarzott

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15247

10 years agoFix Warning: noted but unhandled ioctl 0x2000747b on Mac OS X. bz#208217.
Rhys Kidd [Sun, 17 May 2015 07:31:20 +0000 (07:31 +0000)] 
Fix Warning: noted but unhandled ioctl 0x2000747b on Mac OS X. bz#208217.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15246

10 years agoFollowup to r15242 - as PRE() and POST() wrappers utilised, define with the *XY variant.
Rhys Kidd [Sun, 17 May 2015 06:01:04 +0000 (06:01 +0000)] 
Followup to r15242 - as PRE() and POST() wrappers utilised, define with the *XY variant.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15245

10 years agoEnable a few more compiler warnings.
Florian Krohm [Sat, 16 May 2015 16:17:52 +0000 (16:17 +0000)] 
Enable a few more compiler warnings.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15243

10 years agoFix unhandled syscall: unix:132 (mkfifo) on OS X. bz#212291.
Rhys Kidd [Sat, 16 May 2015 14:48:08 +0000 (14:48 +0000)] 
Fix unhandled syscall: unix:132 (mkfifo) on OS X. bz#212291.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15242

10 years agoAdd (presently) failing test case for bz#212291.
Rhys Kidd [Sat, 16 May 2015 14:18:36 +0000 (14:18 +0000)] 
Add (presently) failing test case for bz#212291.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15241

10 years agoPatch 5 in a revised series of cleanup patches from Will Schmidt
Carl Love [Fri, 15 May 2015 20:09:05 +0000 (20:09 +0000)] 
Patch 5 in a revised series of cleanup patches from Will Schmidt

Add a .exp for the pth_cond_destroy_busy for PPC64 big endian.
This is specifically to cover the last line of output as
seen on ppc64BE, which is "ERROR SUMMARY: X errors from 3 contexts",
where X is 6, versus 3 as seen on other architectures.
The additional errors show up on BE during the "Thread #1: pthread_cond
_destroy: destruction of condition variable being waited upon."

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
This patch fixes Vagrind bugzilla 347686

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15239

10 years agoPatch 6 in a revised series of cleanup patches from Will Schmidt
Carl Love [Fri, 15 May 2015 16:50:06 +0000 (16:50 +0000)] 
Patch 6 in a revised series of cleanup patches from Will Schmidt

    Fix multipleinheritance heuristic for ppc64LE (leak_cpp_interior test).
    Adjust the PPC64 #ifdiffery to indicate that ppc64BE uses a thunk table,
    but ppc64LE (in particular, the ELF ABIV2) does not.  In this case, thunk
    table == function descriptors.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
    --

    This patch replaces the previously posted "[6/7] add leak_cpp_interior
    test .exp results ....."

This patch fixes Vagrind bugzilla 347686

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15238

10 years agoAdd statistics about the nr of used linesF
Philippe Waroquiers [Fri, 15 May 2015 13:17:17 +0000 (13:17 +0000)] 
Add statistics about the nr of used linesF

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15237

10 years agoThis patch (re-)gains performance in helgrind, following revision 15207, that
Philippe Waroquiers [Fri, 15 May 2015 11:41:54 +0000 (11:41 +0000)] 
This patch (re-)gains performance in helgrind, following revision 15207, that
reduced memory use doing SecMap GC, but was slowing down some workloads
(typically, workloads doing a lot of malloc/free).

A significant part of the slowdown came from the clear of the filter,
that was not optimised for big ranges : the filter was working byte
per byte till an 8 alignment. Then working per 8 bytes at a time.

With the patch, the filter clear is done the following way:
   * all the bytes till 8 alignement are done together
   * then 8 bytes at a time till filter_line alignment (32 bytes)
   * then 32 bytes at a time.

Moreover, as the filter cache is small (1024 lines of 32 bytes),
clearing filter for ranges bigger than 32Kb was uselessly checking
several times the same entry. This is now avoided by using a range
check rather than a tag equality check.

As the new filter clear is significanly more complex than the previous simple
algorithm, the old algorithm is kept and used to check the new algorithm
when CHECK_ZSM is defined as 1.

The patch also contains a few micro optimisations and
disables
   // VG_(track_die_mem_stack)       ( evh__die_mem );
as this had no effect and was somewhat costly.

With this patch, we have almost reached for all perf tests the same
performance as we had before revision 15207. Some tests are still
slightly slower than before the SecMap GC (max 2% difference).
Some tests are now significantly faster (e.g. sarp).
For almost all tests, we are now faster than valgrind 3.10.1.
Details below.

Regtested on x86/amd64/ppc64 (and regtested with all compile time
checks set).
I have also regtested with libreoffice and firefox.
(with firefox, also with CHECK_ZSM set to 1).

Details about performance:
hgtrace = this patch
trunk_untouched = trunk
base_secmap = trunk before secmap GC
valgrind 3.10.1 included for comparison
Measured on core i5 2.53GHz

-- Running  tests in perf ----------------------------------------------
-- bigcode1 --
bigcode1 hgtrace   :0.14s  he: 2.6s (18.4x, -----)
bigcode1 trunk_untouched:0.14s  he: 2.6s (18.4x, -0.4%)
bigcode1 base_secmap:0.14s  he: 2.6s (18.6x, -1.2%)
bigcode1 valgrind-3.10.1:0.14s  he: 2.8s (19.8x, -7.8%)
-- bigcode2 --
bigcode2 hgtrace   :0.14s  he: 6.3s (44.7x, -----)
bigcode2 trunk_untouched:0.14s  he: 6.2s (44.6x,  0.2%)
bigcode2 base_secmap:0.14s  he: 6.3s (45.0x, -0.6%)
bigcode2 valgrind-3.10.1:0.14s  he: 6.6s (47.1x, -5.4%)
-- bz2 --
bz2      hgtrace   :0.64s  he:11.3s (17.7x, -----)
bz2      trunk_untouched:0.64s  he:11.7s (18.2x, -3.2%)
bz2      base_secmap:0.64s  he:11.1s (17.3x,  1.9%)
bz2      valgrind-3.10.1:0.64s  he:12.6s (19.7x,-11.3%)
-- fbench --
fbench   hgtrace   :0.29s  he: 3.4s (11.8x, -----)
fbench   trunk_untouched:0.29s  he: 3.4s (11.7x,  0.6%)
fbench   base_secmap:0.29s  he: 3.6s (12.4x, -5.0%)
fbench   valgrind-3.10.1:0.29s  he: 3.5s (12.2x, -3.5%)
-- ffbench --
ffbench  hgtrace   :0.26s  he: 9.8s (37.7x, -----)
ffbench  trunk_untouched:0.26s  he:10.0s (38.4x, -1.9%)
ffbench  base_secmap:0.26s  he: 9.8s (37.8x, -0.2%)
ffbench  valgrind-3.10.1:0.26s  he:10.0s (38.4x, -1.9%)
-- heap --
heap     hgtrace   :0.11s  he: 9.2s (84.0x, -----)
heap     trunk_untouched:0.11s  he: 9.6s (87.1x, -3.7%)
heap     base_secmap:0.11s  he: 9.0s (81.9x,  2.5%)
heap     valgrind-3.10.1:0.11s  he: 9.1s (82.9x,  1.3%)
-- heap_pdb4 --
heap_pdb4 hgtrace   :0.13s  he:10.7s (82.3x, -----)
heap_pdb4 trunk_untouched:0.13s  he:11.0s (84.8x, -3.0%)
heap_pdb4 base_secmap:0.13s  he:10.5s (80.8x,  1.8%)
heap_pdb4 valgrind-3.10.1:0.13s  he:10.6s (81.8x,  0.7%)
-- many-loss-records --
many-loss-records hgtrace   :0.01s  he: 1.5s (152.0x, -----)
many-loss-records trunk_untouched:0.01s  he: 1.6s (157.0x, -3.3%)
many-loss-records base_secmap:0.01s  he: 1.6s (158.0x, -3.9%)
many-loss-records valgrind-3.10.1:0.01s  he: 1.7s (167.0x, -9.9%)
-- many-xpts --
many-xpts hgtrace   :0.03s  he: 2.8s (91.7x, -----)
many-xpts trunk_untouched:0.03s  he: 2.8s (94.7x, -3.3%)
many-xpts base_secmap:0.03s  he: 2.8s (94.0x, -2.5%)
many-xpts valgrind-3.10.1:0.03s  he: 2.9s (97.7x, -6.5%)
-- memrw --
memrw    hgtrace   :0.06s  he: 7.3s (121.2x, -----)
memrw    trunk_untouched:0.06s  he: 7.2s (120.3x,  0.7%)
memrw    base_secmap:0.06s  he: 7.1s (117.7x,  2.9%)
memrw    valgrind-3.10.1:0.06s  he: 8.1s (135.2x,-11.6%)
-- sarp --
sarp     hgtrace   :0.02s  he: 7.6s (378.5x, -----)
sarp     trunk_untouched:0.02s  he: 8.4s (422.0x,-11.5%)
sarp     base_secmap:0.02s  he: 8.6s (431.0x,-13.9%)
sarp     valgrind-3.10.1:0.02s  he: 8.8s (442.0x,-16.8%)
-- tinycc --
tinycc   hgtrace   :0.20s  he:12.4s (62.0x, -----)
tinycc   trunk_untouched:0.20s  he:12.6s (63.2x, -1.9%)
tinycc   base_secmap:0.20s  he:12.6s (63.0x, -1.6%)
tinycc   valgrind-3.10.1:0.20s  he:12.7s (63.5x, -2.3%)
-- Finished tests in perf ----------------------------------------------

== 12 programs, 48 timings =================

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15236

10 years agomicro-opt: add an UNLIKELY
Philippe Waroquiers [Fri, 15 May 2015 09:38:54 +0000 (09:38 +0000)] 
micro-opt: add an UNLIKELY

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15235

10 years ago* add some comments in stack_limits
Philippe Waroquiers [Thu, 14 May 2015 22:37:30 +0000 (22:37 +0000)] 
* add some comments in stack_limits
* add UNLIKELY indications for unlikely conditions
No functional difference.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15234

10 years agoPatch 4 in a revised series of cleanup patches from Will Schmidt
Carl Love [Thu, 14 May 2015 21:52:59 +0000 (21:52 +0000)] 
Patch 4 in a revised series of cleanup patches from Will Schmidt

Add a suppression to handle a "Jump to the invalid address..." message
that gets generated on power.  This is a variation of the existing
suppressions.

While here, I also updated the "prog:" line in the vgtest file to reference
the supp_unknown executable, versus the badjump executable.  They share the
same source code, so I think this is effectively cosmetic.

This patch fixes Vagrind bugzilla 347686

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15233

10 years agoavoid warning
Philippe Waroquiers [Thu, 14 May 2015 21:26:36 +0000 (21:26 +0000)] 
avoid warning

m_xarray.c:133:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

(I have double checked that passing a negative argument makes the
assert fail)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15232

10 years agoAdd the lwpid in the scheduler status information
Philippe Waroquiers [Thu, 14 May 2015 21:05:49 +0000 (21:05 +0000)] 
Add the lwpid in the scheduler status information
E.g. we now have:
Thread 1: status = VgTs_Runnable (lwpid 15782)
==15782==    at 0x8048EB5: main (sleepers.c:188)
client stack range: [0xBE836000 0xBE839FFF] client SP: 0xBE838F80
valgrind stack top usage: 10264 of 1048576

Thread 2: status = VgTs_WaitSys (lwpid 15828)
==15782==    at 0x2E9451: ??? (syscall-template.S:82)
==15782==    by 0x8048AD3: sleeper_or_burner (sleepers.c:84)
==15782==    by 0x39B924: start_thread (pthread_create.c:297)
==15782==    by 0x2F107D: clone (clone.S:130)
client stack range: [0x442F000 0x4E2EFFF] client SP: 0x4E2E338
valgrind stack top usage: 2288 of 1048576

This allows to attach with GDB to the good lwpid in case
you want to examine the valgrind state rather than the guest state.

(it is needed to attach to the specific lwpid as valgrind is not
linked with lib pthread, so GDB cannot discover the threads
of the process).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15231

10 years agoImplement 'qXfer:exec-file:read' packet in Valgrind gdbserver.
Philippe Waroquiers [Thu, 14 May 2015 19:56:47 +0000 (19:56 +0000)] 
Implement 'qXfer:exec-file:read' packet in Valgrind gdbserver.

Thanks to this packet, with recent GDB (>= 7.9.50.20150514-cvs), the
command 'target remote' will automatically load the executable file of
the process running under Valgrind. This means you do not need to
specify the executable file yourself, GDB will discover it itself.
See GDB documentation about 'qXfer:exec-file:read' packet for more
info.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15230

10 years agobz#347233 - Fix memcheck/tests/strchr on OS X 10.10 (Haswell)
Rhys Kidd [Thu, 14 May 2015 13:03:08 +0000 (13:03 +0000)] 
bz#347233 - Fix memcheck/tests/strchr on OS X 10.10 (Haswell)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15229

10 years agoPatch 2 in a revised series of cleanup patches from Will Schmidt
Carl Love [Wed, 13 May 2015 21:46:47 +0000 (21:46 +0000)] 
Patch 2 in a revised series of cleanup patches from Will Schmidt

Add a deep-D test .exp values for ppc64.
Depending on the system and the systems endianness, there are variances
in the library reference, and to the specific line number in the library.
I was able to add and modify existing filters to cover most of the variations,
but did need to add a .exp to cover the additional call stack entry as seen
on power.
This change allows the ppc64 targets to pass the massif/deep-D test.

This patch fixes Vagrind bugzilla 347686

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15228

10 years agoChanges for tilegx: Use VKI_AT_FDCWD not AT_FDCWD.
Florian Krohm [Wed, 13 May 2015 21:26:46 +0000 (21:26 +0000)] 
Changes for tilegx: Use VKI_AT_FDCWD not AT_FDCWD.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15227

10 years agoPatch 1 in a revised series of cleanup patches from Will Schmidt
Carl Love [Wed, 13 May 2015 21:10:12 +0000 (21:10 +0000)] 
Patch 1 in a revised series of cleanup patches from Will Schmidt

Update the massif/big-alloc test for ppc64*.
In comparison to the existing .exp files, the time,total,extra-heap
values generated on ppc64* vary from the other architectures.

This .exp allows the ppc64 targets to pass the test.

This patch fixes Vagrind bugzilla 347322.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15226

10 years agoFunction is_plausible_guest_addr should also consider SkShmC
Florian Krohm [Wed, 13 May 2015 08:11:56 +0000 (08:11 +0000)] 
Function is_plausible_guest_addr should also consider SkShmC
segments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15222

10 years agoIn functions VG_(am_relocate_nooverlap_client) and VG_(am_extend_map_client)
Florian Krohm [Tue, 12 May 2015 21:52:08 +0000 (21:52 +0000)] 
In functions VG_(am_relocate_nooverlap_client) and VG_(am_extend_map_client)
need to allow SkShmC segments, too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15221

10 years agoGet prototype from system header.
Florian Krohm [Tue, 12 May 2015 21:44:48 +0000 (21:44 +0000)] 
Get prototype from system header.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15220

10 years agoFix bug in do_mremap. Also need to allow SkShmC segments.
Florian Krohm [Tue, 12 May 2015 21:19:25 +0000 (21:19 +0000)] 
Fix bug in do_mremap. Also need to allow SkShmC segments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15219

10 years agoAllow suppression on OS X 10.10 in libSystem_initializer
Rhys Kidd [Tue, 12 May 2015 14:25:43 +0000 (14:25 +0000)] 
Allow suppression on OS X 10.10 in libSystem_initializer

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15217

10 years agoAdd back vg_assert(xa); that was removed by error in r15211
Philippe Waroquiers [Mon, 11 May 2015 21:02:00 +0000 (21:02 +0000)] 
Add back vg_assert(xa); that was removed by error in r15211

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15215

10 years agoVTS stats
Philippe Waroquiers [Mon, 11 May 2015 20:56:49 +0000 (20:56 +0000)] 
VTS stats
* add the missing increment to the nr of gc done
* add vts pruning stat

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15214

10 years agoSimplify shmem__invalidate_scache_range : it only has to handle
Philippe Waroquiers [Mon, 11 May 2015 20:18:10 +0000 (20:18 +0000)] 
Simplify shmem__invalidate_scache_range : it only has to handle
cacheline aligned ranges.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15213

10 years agoSmall optimisations in libhb_core.c
Philippe Waroquiers [Mon, 11 May 2015 19:45:08 +0000 (19:45 +0000)] 
Small optimisations in libhb_core.c

* avoid indirection via function pointers to call SVal__rcinc and SVal__rcdec
* declare these functions inlined
* transform 2 asserts on hot path in conditionally compiled checks
  on CHECK_ZSM

This slightly optimises some perf tests with helgrind

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15212

10 years agoMicro-optimisation following helgrind secmap gc
Philippe Waroquiers [Mon, 11 May 2015 19:41:43 +0000 (19:41 +0000)] 
Micro-optimisation following helgrind secmap gc
Checking the range in indexXA can be done with one comparison.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15211

10 years agoFix typo in task_policy_set() output. n-i-bz.
Rhys Kidd [Mon, 11 May 2015 13:24:42 +0000 (13:24 +0000)] 
Fix typo in task_policy_set() output. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15210

10 years agoOS X task_info: UNKNOWN task message [id 3405, to mach_task_self(), reply 0x.......
Rhys Kidd [Mon, 11 May 2015 13:19:48 +0000 (13:19 +0000)] 
OS X task_info: UNKNOWN task message [id 3405, to mach_task_self(), reply 0x........]
bz#254164

Before:

== 593 tests, 234 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 593 tests, 233 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15209

10 years agoImproves the way arena statistics are shown
Philippe Waroquiers [Sun, 10 May 2015 22:40:38 +0000 (22:40 +0000)] 
Improves the way arena statistics are shown
The mmap'd max/curr and max/curr nr of bytes will be shown e.g. as
   11,440,408/    4,508,968
instead of
     114406564509200

So, using more space, but more readable (in particular when the
nr exceeds the width, and so are not aligned anymore)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15208

10 years agoThis patch decreases the memory used by the helgrind SecMap,
Philippe Waroquiers [Sun, 10 May 2015 22:19:31 +0000 (22:19 +0000)] 
This patch decreases the memory used by the helgrind SecMap,
by implementing a Garbage Collection for the SecMap.

The basic change is that freed memory is marked as noaccess
(while before, it kept the previous marking, on the basis that
non buggy applications are not accessing freed memory in any case).
Keeping the previous marking avoids the CPU/memory changes needed
to mark noaccess.

However, marking freed memory noaccess and GC the secmap reduces
the memory on big apps.
For example, a firefox test needs 220Mb less (on about 2.06 Gb).
Similar reduction for libreoffice batch (260 MB less on 1.09 Gb).
On such applications, the performance with the patch is similar to the trunk.

There is a performance decrease for applications that are doing
a lot of malloc/free repetitively: e.g. on some perf tests, an increase
in cpu of up to 15% has been observed.

Several performance optimisations can be done afterwards to not loose
too much performance. The decrease of memory is expected to produce
in any case significant benefit in memory constrained environments
(e.g. android phones).

So, after discussion with Julian, it was decided to commit as-is
and (re-)gain (part of) performance in follow-up commits.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15207

10 years agosmall refinement in the outer/inner doc
Philippe Waroquiers [Sun, 10 May 2015 18:17:38 +0000 (18:17 +0000)] 
small refinement in the outer/inner doc

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15206

10 years agoAdd (presently) failing test case for bz#254164.
Rhys Kidd [Sun, 10 May 2015 13:34:22 +0000 (13:34 +0000)] 
Add (presently) failing test case for bz#254164.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15205

10 years agoSimplify is_valid_for taking advantage of the fact that SegKinds
Florian Krohm [Sun, 10 May 2015 11:07:06 +0000 (11:07 +0000)] 
Simplify is_valid_for taking advantage of the fact that SegKinds
are one-hot encoded.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15201

10 years agotestsuite: properly svn:ignore output files in none/tests/amd64. n-i-bz.
Rhys Kidd [Sun, 10 May 2015 01:33:16 +0000 (01:33 +0000)] 
testsuite: properly svn:ignore output files in none/tests/amd64. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15199

10 years agoUse fxsave64 and fxrstor64 mnemonics instead of old-school rex64 prefix
Rhys Kidd [Sat, 9 May 2015 23:32:13 +0000 (23:32 +0000)] 
Use fxsave64 and fxrstor64 mnemonics instead of old-school rex64 prefix
bz#339636

Before:

== 591 tests, 232 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 232 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15198

10 years agoAdd some cfi directives in the code doing syscall (by Valgrind).
Philippe Waroquiers [Fri, 8 May 2015 21:37:18 +0000 (21:37 +0000)] 
Add some cfi directives in the code doing syscall (by Valgrind).
This allows to attach to Valgrind when VAlgrind is blocked in a syscall
and have GDB producing a stacktrace, rather than being unable
to unwind.
I.e. instead of having:
  (gdb) bt
  #0  0x380460f2 in do_syscall_WRK ()
  (gdb)
with the directives, we obtain:
   (gdb) bt
   #0  vgPlain_mk_SysRes_x86_linux (val=1) at m_syscall.c:65
   #1  vgPlain_do_syscall (sysno=168, a1=944907996, a2=1, a3=4294967295, a4=0, a5=0, a6=0, a7=0, a8=0) at m_syscall.c:791
   #2  0x38031986 in vgPlain_poll (fds=0x385226dc <remote_desc_pollfdread_activity>, nfds=1, timeout=-1) at m_libcfile.c:535
   #3  0x3807479f in vgPlain_poll_no_eintr (fds=0x385226dc <remote_desc_pollfdread_activity>, nfds=1, timeout=-1)
       at m_gdbserver/remote-utils.c:86
   #4  0x380752f0 in readchar (single=4096) at m_gdbserver/remote-utils.c:938
   #5  0x38075ae3 in getpkt (buf=0x61f35020 "") at m_gdbserver/remote-utils.c:997
   #6  0x38076fcb in server_main () at m_gdbserver/server.c:1048
   #7  0x38072af2 in call_gdbserver (tid=1, reason=init_reason) at m_gdbserver/m_gdbserver.c:721
   #8  0x380735ba in vgPlain_gdbserver (tid=1) at m_gdbserver/m_gdbserver.c:788
   #9  0x3802c6ef in do_actions_on_error (allow_db_attach=<optimized out>, err=<optimized out>) at m_errormgr.c:532
   #10 pp_Error (err=0x61f580e0, allow_db_attach=1 '\001', xml=1 '\001') at m_errormgr.c:644
   #11 0x3802cc34 in vgPlain_maybe_record_error (tid=1643479264, ekind=8, a=2271560481, s=0x0, extra=0x62937f1c)
       at m_errormgr.c:851
   #12 0x38028821 in vgMemCheck_record_free_error (tid=1, a=2271560481) at mc_errors.c:836
   #13 0x38007b65 in vgMemCheck_free (tid=1, p=0x87654321) at mc_malloc_wrappers.c:496
   #14 0x3807e261 in do_client_request (tid=1) at m_scheduler/scheduler.c:1840
   #15 vgPlain_scheduler (tid=1) at m_scheduler/scheduler.c:1406
   #16 0x3808b6b2 in thread_wrapper (tidW=<optimized out>) at m_syswrap/syswrap-linux.c:102
   #17 run_a_thread_NORETURN (tidW=1) at m_syswrap/syswrap-linux.c:155
   #18 0x00000000 in ?? ()
   (gdb)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15194

10 years agoUpdate.
Julian Seward [Fri, 8 May 2015 09:52:42 +0000 (09:52 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15193

10 years agoDocument fix for BZ#347389.
Tom Hughes [Thu, 7 May 2015 18:54:51 +0000 (18:54 +0000)] 
Document fix for BZ#347389.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15192

10 years agoAdd support for the syncfs system call.
Tom Hughes [Thu, 7 May 2015 18:54:31 +0000 (18:54 +0000)] 
Add support for the syncfs system call.

Based on patch from j@eckel.me on BZ#347389.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15191

10 years agovalgrind --leak-check=full memleak errors from system libraries on OS X 10.8
Rhys Kidd [Thu, 7 May 2015 13:17:50 +0000 (13:17 +0000)] 
valgrind --leak-check=full memleak errors from system libraries on OS X 10.8
bz#347379
== bz#217236

Before:

== 591 tests, 237 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 232 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15190

10 years agoCompute total size with unsigned long long
Philippe Waroquiers [Wed, 6 May 2015 21:24:23 +0000 (21:24 +0000)] 
Compute total size with unsigned long long

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15189

10 years agoPatch 8 in a series of cleanup patches from Will Schmidt
Carl Love [Wed, 6 May 2015 21:11:35 +0000 (21:11 +0000)] 
Patch 8 in a series of cleanup patches from Will Schmidt

Add a helper script to determine if the platform is ppc64le.
This is specifically used to help exclude the 32-bit tests from being
run on a ppc64LE (ABIV2)  platform.  The 32-bit targets, specifically ppc32/*
is not built on LE.

This patch fixes Vagrind bugzilla 347322.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15188

10 years agoFix also the rm vgcore of a disabled test (also spotted by Matthias Schwarzott)
Philippe Waroquiers [Wed, 6 May 2015 20:50:17 +0000 (20:50 +0000)] 
Fix also the rm vgcore of a disabled test (also spotted by  Matthias Schwarzott)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15187

10 years agoFix incorrect cleanup lines in 2 tests (spotted by Matthias Schwarzott)
Philippe Waroquiers [Wed, 6 May 2015 20:16:34 +0000 (20:16 +0000)] 
Fix incorrect cleanup lines in 2 tests (spotted by  Matthias Schwarzott)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15186

10 years agoPatch 3 in a series of cleanup patches from Will Schmidt
Carl Love [Wed, 6 May 2015 20:16:04 +0000 (20:16 +0000)] 
Patch 3 in a series of cleanup patches from Will Schmidt

Update the pth_create_chain vgtest prereq to handle the ppc64le architecture
in the same way as ppc64 (BE).

This patch fixes Vagrind bugzilla 347322.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15185

10 years agoPatch 2 in a series of cleanup patches from Will Schmidt
Carl Love [Wed, 6 May 2015 19:44:14 +0000 (19:44 +0000)] 
Patch 2 in a series of cleanup patches from Will Schmidt

Adjust the badjump2 test for ppc64le/ABIV2. Under the ABIV2 there
is no function descriptor, so the fn[] setup does not apply.
This fixes the badjump2 test failure as seen on ppc64le.

This patch fixes Vagrind bugzilla 347322.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15184

10 years agoPatch 1 in a series of cleanup patches from Will Schmidt
Carl Love [Wed, 6 May 2015 19:18:28 +0000 (19:18 +0000)] 
Patch 1 in a series of cleanup patches from Will Schmidt

Update ifdefs around the bogus-LR-value-handling code to allow ppc64le to
behave as ppc64 (BE) does.

This fixes the overlap test case, where the stack unwinding code was
otherwise coming up with bad instruction pointers.

This patch fixes Vagrind bugzilla 347322.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15183

10 years agoSimplify. The condition on line 1223 is always true.
Florian Krohm [Tue, 5 May 2015 06:14:10 +0000 (06:14 +0000)] 
Simplify. The condition on line 1223 is always true.
Here's why:

The condition

 if (VG_(brk_limit) > VG_(brk_base))   line 1223

is reachable iff

  newbrk < VG_(brk_base)  on line 1201  is false  AND
  newbrk < VG_(brk_limit) on line 1205  is true

Rewrite as

  newbrk >= VG_(brk_base)    is true  AND
  newbrk <  VG_(brk_limit)   is true

Rewrite as

  newbrk >= VG_(brk_base)        is true  AND
  newbrk <= VG_(brk_limit) - 1   is true

Combine

  VG_(brk_base) <= newbrk <= VG_(brk_limit) - 1

Therefore

  VG_(brk_base) <= VG_(brk_limit) - 1

Or

  VG_(brk_base) < VG_(brk_limit)

Which is the same as

  VG_(brk_limit) > VG_(brk_base)

qed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15181

10 years agoOne more msg to use 'mmap-ed ANONYMOUS' wording
Philippe Waroquiers [Mon, 4 May 2015 20:00:49 +0000 (20:00 +0000)] 
One more msg to use 'mmap-ed ANONYMOUS' wording

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15180

10 years agoFix suppression for pthread_rwlock_init on OS X 10.8
Rhys Kidd [Mon, 4 May 2015 12:46:44 +0000 (12:46 +0000)] 
Fix suppression for pthread_rwlock_init on OS X 10.8
bz#347151

Before:

== 593 tests, 238 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 593 tests, 237 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15179

10 years agoAdd a new howto for running mips64-linux on QEMU.
Julian Seward [Mon, 4 May 2015 08:40:11 +0000 (08:40 +0000)] 
Add a new howto for running mips64-linux on QEMU.
Rename the aarch64-linux howto accordingly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15178

10 years ago* Out of memory message was using 'bytes have already been allocated.'
Philippe Waroquiers [Sun, 3 May 2015 21:48:13 +0000 (21:48 +0000)] 
* Out of memory message was using  'bytes have already been allocated.'
  while this nr is in fact the total anonymously mmap-ed.
  Change the message so as to reflect the shown number.
* Show also the total anonymous mmaped in non OOM memory statistics

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15177

10 years agoReduce nr of lines produced by laog gc --stats=yes
Philippe Waroquiers [Sun, 3 May 2015 10:56:16 +0000 (10:56 +0000)] 
Reduce nr of lines produced by laog gc --stats=yes

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15176

10 years agoProperly guard exp-bbv/tests/x86/ on OS X. Partial fix for BZ#344416 (at least reduce...
Rhys Kidd [Sat, 2 May 2015 04:23:46 +0000 (04:23 +0000)] 
Properly guard exp-bbv/tests/x86/ on OS X. Partial fix for BZ#344416 (at least reduces required hacks).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15175

10 years agoThis patch reduces the memory needed for a VtsTE by 25% (one word)
Philippe Waroquiers [Fri, 1 May 2015 17:12:00 +0000 (17:12 +0000)] 
This patch reduces the memory needed for a VtsTE by 25% (one word)
on 32 bits platforms. No memory reduction on 64 bits platforms,
due to alignment.
The patch also shows the vts stats when showing the helgrind stats.

The perf/memrw.c perf test gets also some new additional features
allowing e.g. to control the size of the read or written blocks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15174

10 years agoThis patch adds a function that allows to directly properly size an xarray
Philippe Waroquiers [Fri, 1 May 2015 16:46:38 +0000 (16:46 +0000)] 
This patch adds a function that allows to directly properly size an xarray
when the size is known in advance.

3 places identified where this function can be used trivially.

The result is a reduction of 'realloc' operations in core
arena, and a small reduction in ttaux arena
(it is the nr of operations that decreases, the memory usage itself
stays the same (ignoring some 'rounding' effects).

E.g. for perf/bigcode 0, we change from
  core 1085742216745904 totalloc-blocks/bytes,     1085733 searches
  ttaux 5348/   6732560 totalloc-blocks/bytes,        5326 searches
to
  core 712666/ 190998592 totalloc-blocks/bytes,      712657 searches
  ttaux 5319/   6731808 totalloc-blocks/bytes,        5296 searches

For bz2, we switch from
  core 50285/  32383664 totalloc-blocks/bytes,       50256 searches
  ttaux 670/    245160 totalloc-blocks/bytes,         669 searches
to
  core 32564/  29971984 totalloc-blocks/bytes,       32535 searches
  ttaux 605/    243280 totalloc-blocks/bytes,         604 searches

Performance wise, on amd64, this improves memcheck performance
on perf tests by 0.0, 0.1 or 0.2 seconds depending on the test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15173

10 years agoProperly guard drd/tests/thread_name with HAVE_PTHREAD_BARRIER. Partial fix for BZ...
Rhys Kidd [Fri, 1 May 2015 10:19:22 +0000 (10:19 +0000)] 
Properly guard drd/tests/thread_name with HAVE_PTHREAD_BARRIER. Partial fix for BZ#344416 (at least reduces required hacks).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15172

10 years agoFix aspacem segment mismatch: seen with none/tests/bigcode
Rhys Kidd [Fri, 1 May 2015 06:29:51 +0000 (06:29 +0000)] 
Fix aspacem segment mismatch: seen with none/tests/bigcode
bz#345824

Tested on OS X 10.9 and OS X 10.10.

Before:

== 595 tests, 237 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 595 tests, 236 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15171

10 years agoFix regression test compile issue on OS X platform, introduced in r15113. n-i-bz
Rhys Kidd [Thu, 30 Apr 2015 23:39:10 +0000 (23:39 +0000)] 
Fix regression test compile issue on OS X platform, introduced in r15113. n-i-bz

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15170

10 years agoRemove a few embarassing comments.
Florian Krohm [Thu, 30 Apr 2015 20:44:17 +0000 (20:44 +0000)] 
Remove a few embarassing comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15169

10 years agoRename write variable to avoid a warning:
Philippe Waroquiers [Thu, 30 Apr 2015 20:30:12 +0000 (20:30 +0000)] 
Rename write variable to avoid a warning:
memrw.c:37: warning: declaration of ‘write’ shadows a global declaration
/usr/include/unistd.h:333: warning: shadowed declaration is here

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15167

10 years agoFix the namespace of the functions dealing with segment names.
Florian Krohm [Thu, 30 Apr 2015 17:34:04 +0000 (17:34 +0000)] 
Fix the namespace of the functions dealing with segment names.
As those are private to the address space manager they should
be ML_ not VG_ prefixed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15165

10 years agoDW_CFA_def_cfa_expression: don't push the CFA on the stack before
Julian Seward [Thu, 30 Apr 2015 11:45:13 +0000 (11:45 +0000)] 
DW_CFA_def_cfa_expression: don't push the CFA on the stack before
evaluation starts.  For DW_CFA_val_expression and DW_CFA_expression
doing so is correct, but not for DW_CFA_def_cfa_expression.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15160

10 years agoAdd a HOWTO on how to build and install aarch64-linux on QEMU,
Julian Seward [Thu, 30 Apr 2015 11:06:00 +0000 (11:06 +0000)] 
Add a HOWTO on how to build and install aarch64-linux on QEMU,
primarily for testing convenience.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15159

10 years agoFix intermittent build error on aarch64-linux caused by inadequate
Julian Seward [Wed, 29 Apr 2015 20:48:48 +0000 (20:48 +0000)] 
Fix intermittent build error on aarch64-linux caused by inadequate
alignment for some data symbols.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15157

10 years agoIssue an error message if then brk segment overflows.
Florian Krohm [Wed, 29 Apr 2015 12:59:16 +0000 (12:59 +0000)] 
Issue an error message if then brk segment overflows.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15155

10 years agoUse error exit code when bailing out.
Florian Krohm [Tue, 28 Apr 2015 18:46:33 +0000 (18:46 +0000)] 
Use error exit code when bailing out.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15153

10 years agoUpdate.
Julian Seward [Tue, 28 Apr 2015 11:49:05 +0000 (11:49 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15151

10 years agoBack out most of r15145 which reports bug fixes for various altivec insns.
Florian Krohm [Mon, 27 Apr 2015 21:10:36 +0000 (21:10 +0000)] 
Back out most of r15145 which reports bug fixes for various altivec insns.
Either those bugs have been fixed looong time ago, or the reporter ran
on a host without altivec capabilities, or those insns were actually
e500 insns which are not supported at all at this point.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15150

10 years agoFix fallout from r15138: build error on Darwin due to renamed function.
Florian Krohm [Mon, 27 Apr 2015 17:28:15 +0000 (17:28 +0000)] 
Fix fallout from r15138: build error on Darwin due to renamed function.
Fixes BZ #346801.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15149

10 years agoRemove magic constant. Use LibVEX_GUEST_STATE_ALIGN instead.
Florian Krohm [Mon, 27 Apr 2015 14:28:28 +0000 (14:28 +0000)] 
Remove magic constant. Use LibVEX_GUEST_STATE_ALIGN instead.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15148

10 years agoFollow up on VEX r3144 and remove VexGuestTILEGXStateAlignment.
Florian Krohm [Mon, 27 Apr 2015 14:26:26 +0000 (14:26 +0000)] 
Follow up on VEX r3144 and remove VexGuestTILEGXStateAlignment.
Also fix the alignment check which should be mod 16 not mod 8.
Well, actually, it should be mod LibVEX_GUEST_STATE_ALIGN but
that is another patch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15147

10 years agoFix an outdated comment as pointed out in BZ #211256.
Florian Krohm [Mon, 27 Apr 2015 14:04:52 +0000 (14:04 +0000)] 
Fix an outdated comment as pointed out in BZ #211256.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15146

10 years agoUpdate. Mostly ppc insns that appear to have been fixed
Florian Krohm [Sun, 26 Apr 2015 19:23:56 +0000 (19:23 +0000)] 
Update. Mostly ppc insns that appear to have been fixed

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15145

10 years agoFix BZ #342683. Based on patch by Ivo Raisr.
Florian Krohm [Sat, 25 Apr 2015 18:23:21 +0000 (18:23 +0000)] 
Fix BZ #342683. Based on patch by Ivo Raisr.
What this does is to make sure that the initial client data segment
is marked as unaddressable. This is consistent with the behaviour of
brk when the data segment is shrunk. The "freed" memory is marked
as unaddressable.
Special tweaks were needed for s390 which was returning early from
the funtion to avoid sloppy register definedness initialisation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15144

10 years agoFix the writev / readv wrappers. Do not read the array pointed to
Florian Krohm [Sat, 25 Apr 2015 18:14:17 +0000 (18:14 +0000)] 
Fix the writev / readv wrappers. Do not read the array pointed to
by the 2nd argument, if the element count is negative.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15143

10 years agoReplace adler32 by sdbm_hash in m_deduppoolalloc.c
Philippe Waroquiers [Sat, 25 Apr 2015 14:53:35 +0000 (14:53 +0000)] 
Replace adler32 by sdbm_hash in m_deduppoolalloc.c
adler32 is not very good as a hash function.
sdbm_hash gives more different keys that adler32,
and in a large majority of the cases, shorter chains.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15142

10 years agoGive statistics about RCEC helgrind hash table chains.
Philippe Waroquiers [Sat, 25 Apr 2015 14:00:24 +0000 (14:00 +0000)] 
Give statistics about RCEC helgrind hash table chains.
Improve statistic in coregrind hash table

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15141

10 years agoCheck for any client stack segment. Rule out valgrind segments.
Florian Krohm [Fri, 24 Apr 2015 10:05:23 +0000 (10:05 +0000)] 
Check for any client stack segment. Rule out valgrind segments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15140

10 years agoAdd some internal documentation for 'svn ignore' maintenance;
Philippe Waroquiers [Thu, 23 Apr 2015 21:28:12 +0000 (21:28 +0000)] 
Add some internal documentation for 'svn ignore' maintenance;
reference it from README_DEVELOPERS_processes

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15139

10 years agoFix an assertion in the address space manager. BZ #345887.
Florian Krohm [Thu, 23 Apr 2015 15:20:00 +0000 (15:20 +0000)] 
Fix an assertion in the address space manager. BZ #345887.
The VG_(extend_stack) call needs to be properly guarded because the
passed-in address is not necessarily part of an extensible stack
segment. And an extensible stack segment is the only thing that
function should have to deal with.
Previously, the function VG_(am_addr_is_in_extensible_client_stack)
was introduced to guard VG_(extend_stack) but it was not added in all
places it should have been.

Also, extending the client stack during signal delivery (in sigframe-common.c)
was simply calling VG_(extend_stack) hoping it would do the right thing.
But that was not always the case. The new testcase
none/tests/linux/pthread-stack.c exercises this (3.10.1 errors out on it).

Renamed ML_(sf_extend_stack) to ML_(sf_maybe_extend_stack) and add
proper guard logic for VG_(extend_stack).

Testcases none/tests/{amd64|x86}-linux/bug345887.c by Ivo Raisr.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15138

10 years agoUpdate list of ignored files.
Florian Krohm [Thu, 23 Apr 2015 13:17:20 +0000 (13:17 +0000)] 
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15137

10 years agoThere is an ABI change in how the PPC64 gcc compiler handles 128 bit arguments
Carl Love [Wed, 22 Apr 2015 21:17:48 +0000 (21:17 +0000)] 
There is an ABI change in how the PPC64 gcc compiler handles 128 bit arguments
are aligned with GCC 5.0.  The compiler generates a "note" about this starting
with GCC 4.9.  To avoid generating the "note", the passing of the arguments
were changed to a pointer to make it pass by reference rather then pass by
value.

bugzilla 346487.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15136

10 years agoUpdate NEWS file with bix for bugzilla 346474.
Carl Love [Wed, 22 Apr 2015 16:28:22 +0000 (16:28 +0000)] 
Update NEWS file with bix for bugzilla 346474.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15135

10 years agoAdd support for the TEXASRU register. This register contains information on
Carl Love [Wed, 22 Apr 2015 16:17:06 +0000 (16:17 +0000)] 
Add support for the TEXASRU register.  This register contains information on
transactional memory instruction summary information.  This register contains
the upper 32-bits of the transaction information.  Note, the valgrind
implementation of transactional memory instructions is limited.  Currently, the
contents of the TEXASRU register will always return 0.  The lower 64-bits of
the trasnaction information in the TEXASR register will contain the failure
information as setup by Valgrind.

The vex commit 3143 contains the changes needed to support the TEXASRU
register on PPC64.

The support requires changing the value of MAX_REG_WRITE_SIZE in
memcheck/mc_main.c from 1696 to 1712.  The change is made in this
valgrind commit.

This patch addresses Bugzilla 346474

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15134