11665 Commits

Author SHA1 Message Date
Rhys Kidd
d92ece08a3 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
2015-05-01 10:19:22 +00:00
Rhys Kidd
9fe1f89425 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
2015-05-01 06:29:51 +00:00
Rhys Kidd
719dc599ed 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
2015-04-30 23:39:10 +00:00
Florian Krohm
b6251821a1 Remove a few embarassing comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15169
2015-04-30 20:44:17 +00:00
Philippe Waroquiers
9f9c5c6947 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
2015-04-30 20:30:12 +00:00
Florian Krohm
307f73e22b 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
2015-04-30 17:34:04 +00:00
Julian Seward
47f7612998 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
2015-04-30 11:45:13 +00:00
Julian Seward
e6e2211dc8 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
2015-04-30 11:06:00 +00:00
Julian Seward
a9b9383bcc 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
2015-04-29 20:48:48 +00:00
Florian Krohm
97b35b97f6 Issue an error message if then brk segment overflows.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15155
2015-04-29 12:59:16 +00:00
Florian Krohm
1322e9be35 Use error exit code when bailing out.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15153
2015-04-28 18:46:33 +00:00
Julian Seward
065bdba7c8 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15151
2015-04-28 11:49:05 +00:00
Florian Krohm
2f9ede0c45 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
2015-04-27 21:10:36 +00:00
Florian Krohm
748d43b662 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
2015-04-27 17:28:15 +00:00
Florian Krohm
a0bc5cba58 Remove magic constant. Use LibVEX_GUEST_STATE_ALIGN instead.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15148
2015-04-27 14:28:28 +00:00
Florian Krohm
7681c4e4e0 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
2015-04-27 14:26:26 +00:00
Florian Krohm
11309294c4 Fix an outdated comment as pointed out in BZ #211256.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15146
2015-04-27 14:04:52 +00:00
Florian Krohm
e9611ffd8b Update. Mostly ppc insns that appear to have been fixed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15145
2015-04-26 19:23:56 +00:00
Florian Krohm
b1d6b96f07 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
2015-04-25 18:23:21 +00:00
Florian Krohm
e0927ca1ea 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
2015-04-25 18:14:17 +00:00
Philippe Waroquiers
f6ab65fc2a 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
2015-04-25 14:53:35 +00:00
Philippe Waroquiers
0543df0e12 Give statistics about RCEC helgrind hash table chains.
Improve statistic in coregrind hash table


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15141
2015-04-25 14:00:24 +00:00
Florian Krohm
7dc618ae86 Check for any client stack segment. Rule out valgrind segments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15140
2015-04-24 10:05:23 +00:00
Philippe Waroquiers
90febbe39b Add some internal documentation for 'svn ignore' maintenance;
reference it from README_DEVELOPERS_processes


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15139
2015-04-23 21:28:12 +00:00
Florian Krohm
9d3d254a8b 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
2015-04-23 15:20:00 +00:00
Florian Krohm
8d9675b48a Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15137
2015-04-23 13:17:20 +00:00
Carl Love
163762d1aa 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
2015-04-22 21:17:48 +00:00
Carl Love
46a560d100 Update NEWS file with bix for bugzilla 346474.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15135
2015-04-22 16:28:22 +00:00
Carl Love
79808be79c 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
2015-04-22 16:17:06 +00:00
Mark Wielaard
04f8bc3793 Enable rt_sigpending syscall on ppc64 linux.
Patch from Thomas Huth <thuth@redhat.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15133
2015-04-22 15:29:03 +00:00
Florian Krohm
2d01f78684 Rename VG_(am_is_bogus_client_stack_pointer) to
VG_(am_addr_is_in_extensible_client_stack).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15132
2015-04-22 14:16:11 +00:00
Florian Krohm
3e50adbd1c Fix a silly bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15131
2015-04-22 13:50:13 +00:00
Bart Van Assche
4bd1c66504 NEWS: Add entry for bug #346416 / trunk r15123
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15130
2015-04-22 08:07:35 +00:00
Philippe Waroquiers
a6e660c7f0 Announce in NEWS the optimisation done for helgrind big applications
full history level



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15129
2015-04-21 22:04:55 +00:00
Philippe Waroquiers
31e81facbe Add some stats to helgrind stats:
* nr of client malloc-ed blocks
* how many OldRef helgrind has, and the distribution
  of these OldRef according to the nr of accs they have
 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15128
2015-04-21 21:58:14 +00:00
Philippe Waroquiers
d6c0fde7fe Move a comment useful to the caller to the .h, rather than keeping it
in the .c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15127
2015-04-21 20:56:49 +00:00
Philippe Waroquiers
fddca72337 Do RCEC_GC when approaching the max nr of RCEC, not when reaching it.
Otherwise, long running applications still see the max nr of RCEC
slowly growing, which increases the memory usage and
makes the (fixed) contextTab hash table slower to search.
Without this margin, the max could increase as the GC code
is not called at exactly the moment we reach the previous max,
but rather when a thread has run a bunch of basic blocks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15126
2015-04-21 20:55:40 +00:00
Carl Love
00899e3cfc Update the NEWS file with the fixes for bugzillas 345695, 346267, and 346324.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15125
2015-04-21 20:13:27 +00:00
Carl Love
0541991ed0 Update the expected output file none/tests/ppc64/jm_int_isa_2_07.stdout.exp
for PPC64 big endian.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15124
2015-04-21 20:06:13 +00:00
Bart Van Assche
44609129ea Add support for LL_IOC_PATH2FID and LL_IOC_GETPARENT Lustre ioctls
From: Frank Zago <fzago@cray.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15123
2015-04-21 17:46:52 +00:00
Christian Borntraeger
8edce29b97 increase function size even more (see r15095). On s390 this testcase
might use a relative load (e.g. via load address relative long(larl)
for the address) into the literal pool for some constants. 1280 seems
to be enough that the r/o data is copied along the function.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15121
2015-04-21 12:27:09 +00:00
Carl Love
0a9b6b47d8 Add support for the lbarx, lharx, stbcx and sthcs instructions.
One of the expect files was missing.  Also found that there 
was a bug in the stq, stqcx, lq and lqarx instructions for LE.
The VEX commit for the instruction fix was 3138.

This commit updates the expect files for the corrected instructions
and adds the missing expect files.

The bugzilla for the orginal issue of the missing instructions
is 346324.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15120
2015-04-20 23:38:33 +00:00
Philippe Waroquiers
1c8026546e This patch changes the policy that does the GC of OldRef and RCEC
conflict cache size.

The current policy is:
A 'more or less' LRU policy is implemented by giving
to each OldRef a generation nr in which it was last touched.
A new generation is created every 50000 new access.
GC is done when the nr of OldRef reaches --conflict-cache-size.
The GC consists in removing enough generations to free 
half of the entries.
After GC of OldRef, the RCEC (Ref Counted Exe Contexts)
not referenced anymore are GC-ed.

The new policy is:
An exact LRU policy is implemented using a doubly linked list
of OldRef.
When reaching --conflict-cache-size, the LRU entry is re-used.

The not referenced RCEC are GC-ed when less than 75% of the RCEC
are referenced, and the nr of RCEC is 'big' (at least half the
size of the contextTab, and at least the max nr of RCEC reached
previously).
  (note: tried to directly recover a unref'ed RCEC when recovering
   the LRU oldref, but that gives a lot of re-creation of RCEC).

new policy has the following advantages/disadvantages:
1. It is faster (at least for big applications)
  On a firefox startup/exit, we gain about 1m30 second on 11m.
  Similar 5..10% speed up encountered on other big applications
  or on the new perf/memrw test.
  The speed increase depends on the amount of memory
  touched by the application. For applications with a
  working set fitting in conflict-cache-size, the new policy
  might be marginally slower than previous policy on platforms
  having a small cache : the current policy only sets a generation
  nr when an address is re-accessed, while the new policy
  has to unchain and rechain the OldRef access in the LRU
  doubly linked list.
2. It uses less memory (at least for big applications)
   Firefox startup/exit "core" arena max use decreases from
     1175MB mmap-ed/1060MB alloc-ed
   to
     994MB mmap-ed/913MB alloc-ed

   The decrease in memory is the result of having a lot less RCEC:
   The current policy let the nr of RCEC grow till the conflict
   cache size is GC-ed.

   The new policy limits the nr of RCEC to 133% of the RCEC
   really referenced. So, we end up with a max nr of RCEC
   a lot smaller with the new policy : max RCEC 191000
   versus 1317000, for a total nr of discard RCEC operations
   almost the same: 33M versus 32M. 
   Also, the current policy allocates a big temporary array
   to do the GC of OldRef.

   With the new policy, size of an OldRef increases because
   we need 2 pointers for the LRU doubly linked list, and
   we need the accessed address.
   In total, the OldRef increase is limited to one Word,
   as we do not need anymore the gen, and the 'magic' 
   for sanity check was removed (the check somewhat
   becomes less needed, because an OldRef is never freed
   anymore. Also, we do a new cross-check between
   the ga in the OldRef and the sparseWA key).

   For applications using small memory and having
   a small nr of different stack traces accessing memory,
   the new policy causes an increase in memory (one Word
   per OldRef).

3. Functionally, the new policy gives better past information:
   once the steady state is reached (i.e. the conflict cache
   is full), the new policy has always --conflict-cache-size
   entries of past information.
   The current policy has a nr of past information varying
   between --conflict-cache-size/2 and --conflict-cache-size
   (so in average, 75% of conflict-cache-size).

4. The new code is a little bit smaller/simpler:
   The generation based GC is replaced by a simpler LRU policy.


So, in summary, this patch should allow big applications
to use less cpu/memory, while having very little
or no impact on memory/cpu of small applications.

Note that the OldRef data structure LRU policy
is not really explicitely tested by a regtest.
Not easy at first sight to make such a test portable
between platforms/OS/compilers/....



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15119
2015-04-20 21:33:16 +00:00
Florian Krohm
eee95ccc03 Use the proper function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15118
2015-04-20 21:13:03 +00:00
Florian Krohm
fd55c4421f Remove SysRes::_valEx from common code as it is specific to mips.
ifdef'ed accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15117
2015-04-20 21:02:18 +00:00
Florian Krohm
a9b8e1e789 Remove function sr_ResHI from Linux specific code.
Add function VG_(sr_as_string).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15116
2015-04-20 20:42:42 +00:00
Florian Krohm
65832be442 Update tilegx's do_clone function adopting the stack bound changes
made in r14392.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15115
2015-04-20 17:00:02 +00:00
Philippe Waroquiers
7aee63c33e Ensure we print the memory statistics with the default verbosity,
when giving --stats=yes


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15114
2015-04-19 17:56:42 +00:00
Philippe Waroquiers
3a0bea5c87 For ppc64, use the endianess of the running program, rather
than an harcoded endness.
(this is because ppc64 supports 2 endness, decided at runtime)

For mips, use BE if running on a non mips system, otherwise
use the endness of the running program
(this is because mips supports 2 endness, but decided at compile time).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15113
2015-04-19 15:43:53 +00:00
Philippe Waroquiers
9d18c8ddd0 fix 346307 fuse filesystem syscall deadlocks
Mark 2 additional syscalls as 'mayblock' when fuse-compatible hint
is given.
Patch from aozgovde@ralota.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15112
2015-04-19 12:39:33 +00:00