]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agoFix up the s390 back end to be in sync with infrastructural changes
Julian Seward [Wed, 16 Jan 2013 21:10:01 +0000 (21:10 +0000)] 
Fix up the s390 back end to be in sync with infrastructural changes
w.r.t. conditional dirty helpers that return values.  Does not
actually handle such cases since the s390 front end does not generate
them.  Further ahead, it would be more general to redo this by
incorporating a RetLoc as part of the helper_call struct.  This change
is OK for now, though.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2640

13 years agoppc32/64 equivalents to r2636: fix up the ppc back end to be in sync
Julian Seward [Wed, 16 Jan 2013 14:56:06 +0000 (14:56 +0000)] 
ppc32/64 equivalents to r2636: fix up the ppc back end to be in sync
with infrastructural changes w.r.t. conditional dirty helpers that
return values.  Does not actually handle such cases since the ppc
front end does not generate them.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2639

13 years agox86 equivalent to r2636: fix up the x86 back end to be in sync with
Julian Seward [Wed, 16 Jan 2013 09:29:37 +0000 (09:29 +0000)] 
x86 equivalent to r2636: fix up the x86 back end to be in sync with
infrastructural changes w.r.t. conditional dirty helpers that return
values.  Does not actually handle such cases since the x86 front end
does not generate them.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2638

13 years agoGet rid of a pointless assert, and let the isel fail in the normal
Julian Seward [Wed, 16 Jan 2013 09:22:27 +0000 (09:22 +0000)] 
Get rid of a pointless assert, and let the isel fail in the normal
way, if it wants to.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2637

13 years agoFix two memory leaks. Spotted by Coverity.
Florian Krohm [Wed, 16 Jan 2013 03:18:19 +0000 (03:18 +0000)] 
Fix two memory leaks. Spotted by Coverity.

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

13 years agoImprove error handling when vgdb cannot read process cmd line
Philippe Waroquiers [Tue, 15 Jan 2013 23:09:41 +0000 (23:09 +0000)] 
Improve error handling when vgdb cannot read process cmd line

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

13 years agoFix up the amd64 back end to be in sync with infrastructural changes
Julian Seward [Tue, 15 Jan 2013 22:30:39 +0000 (22:30 +0000)] 
Fix up the amd64 back end to be in sync with infrastructural changes
w.r.t. conditional dirty helpers that return values.  Does not
actually handle such cases since the amd64 front end does not generat
them.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2636

13 years agoComment-only changes.
Julian Seward [Tue, 15 Jan 2013 17:26:33 +0000 (17:26 +0000)] 
Comment-only changes.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2635

13 years agoAnnounce bug fix.
Florian Krohm [Tue, 15 Jan 2013 03:31:26 +0000 (03:31 +0000)] 
Announce bug fix.

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

13 years agoRemove const qualifier from function return type.
Florian Krohm [Tue, 15 Jan 2013 03:25:17 +0000 (03:25 +0000)] 
Remove const qualifier from function return type.
It's not meaningful.
Patch Guy Harris (guy@alum.mit.edu). Part of fixing BZ 312980.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2634

13 years agoFix a few compiler warnings on Darwin.
Florian Krohm [Tue, 15 Jan 2013 03:19:54 +0000 (03:19 +0000)] 
Fix a few compiler warnings on Darwin.
Patch Guy Harris (guy@alum.mit.edu). Part of fixing BZ 312980.

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

13 years agoMinor code cleanup. These cases cannot occur.
Florian Krohm [Tue, 15 Jan 2013 03:09:16 +0000 (03:09 +0000)] 
Minor code cleanup. These cases cannot occur.

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

13 years agoTest file mode correctly in vmsplice wrapper.
Tom Hughes [Mon, 14 Jan 2013 22:14:21 +0000 (22:14 +0000)] 
Test file mode correctly in vmsplice wrapper.

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

13 years agoAccept glibc 2.17 as valid.
Tom Hughes [Mon, 14 Jan 2013 09:48:49 +0000 (09:48 +0000)] 
Accept glibc 2.17 as valid.

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

13 years agoComment only changes
Philippe Waroquiers [Sun, 13 Jan 2013 15:18:51 +0000 (15:18 +0000)] 
Comment only changes

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

13 years agono recording of execontext for track origin in brk/signal stack when track-origin=no
Philippe Waroquiers [Sun, 13 Jan 2013 15:01:21 +0000 (15:01 +0000)] 
no recording of execontext for track origin in brk/signal stack when track-origin=no

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

13 years agoAvoid to record execontext used for origin tracking when --trac-origins=no
Philippe Waroquiers [Sun, 13 Jan 2013 13:59:17 +0000 (13:59 +0000)] 
Avoid to record execontext used for origin tracking when --trac-origins=no
All calls to VG_(unknown_SP_update) were recording an execontext
of one IP, useful only for track origin.
This patch implements splits VG_(unknown_SP_update)
in two different functions VG_(unknown_SP_update_w_ECU)
(doing origin tracking) and VG_(unknown_SP_update)  (not doing origin tracking).

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

13 years agoFix a comment and add one.
Florian Krohm [Sun, 13 Jan 2013 02:34:28 +0000 (02:34 +0000)] 
Fix a comment and add one.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2633

13 years agos390: Support insns to convert between DFP values and signed/unsigned
Florian Krohm [Sun, 13 Jan 2013 02:29:05 +0000 (02:29 +0000)] 
s390: Support insns to convert between DFP values and signed/unsigned
integers. Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2632

13 years agoAdd memcheck support for the IROps added in VEX r2631.
Florian Krohm [Sat, 12 Jan 2013 22:04:00 +0000 (22:04 +0000)] 
Add memcheck support for the IROps added in VEX r2631.
Adapt vbit-tester.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

13 years agoAdd 12 IROps for converting betwen DFP values and signed/unsigned integers.
Florian Krohm [Sat, 12 Jan 2013 22:02:07 +0000 (22:02 +0000)] 
Add 12 IROps for converting betwen DFP values and signed/unsigned integers.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2631

13 years agoImplement --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none
Philippe Waroquiers [Sat, 12 Jan 2013 19:53:08 +0000 (19:53 +0000)] 
Implement --keep-stacktraces=alloc|free|alloc-and-free|alloc-then-free|none

The option --keep-stacktraces controls which stack trace(s) to keep for
malloc'd and/or free'd blocks. This can be used to obtain more information
for 'use after free' errors or to decrease Valgrind memory and/or cpu usage
by recording less information for heap blocks.

This fixes 312913 Dangling pointers error should also report the alloc
stack trace.

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

13 years agooutput the nr of IP in the stacktrace header produced by v.info exectxt
Philippe Waroquiers [Fri, 11 Jan 2013 23:48:28 +0000 (23:48 +0000)] 
output the nr of IP in the stacktrace header produced by v.info exectxt

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

13 years agoupdate a test following revision 13220
Philippe Waroquiers [Thu, 10 Jan 2013 22:35:33 +0000 (22:35 +0000)] 
update a test following revision 13220

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

13 years agoAddition of GDB server monitor command 'v.info execontext' that shows
Philippe Waroquiers [Thu, 10 Jan 2013 20:42:51 +0000 (20:42 +0000)] 
Addition of GDB server monitor command 'v.info execontext' that shows
information about the stack traces recorded by Valgrind.
This can be used to analyse one possible cause of Valgrind high
memory usage for some programs.

At work, a big set of regression tests crashed out of memory under Valgrind.

Two main causes for out of memory were identified:
1. big memory usage for stacktrace (exe contexts) recording by Valgrind
2. big number of partially initialised bytes.

This patch adds a gdbsrv monitor command that output (very) detailed
information about all the recorded exe context.

This has been used to analyse the problem 1. above,
showing the following identified causes for a (too) big nr of execontexts:

A. When the JIT handles an unknown SP update, even when --track-origins=no,
an execontext is (uselessly) created and recorded
to track the (never used) origin of some uninitialised stack memory.
This creates a whole bunch of 'one IP' execontexts.

B. same problem in handling some system calls (at least the brk system
 calls always records an origin, even when --track-origins=yes).

C. The Valgrind unwinder cannot properly unwind some stack traces.
  It unwinds a few frames, then go bezerk and stops at a "random" IP.
  This then causes the same "logical" stacktrace to be truncated
  and records thousands of times with this "differentiating" last IP.

For problem cause 2 above ( a lot of partially initialised bytes),
the idea is to similarly add another gdbsrv commands that will output
statistics about which stack traces are causing a lot of uninitialised bytes.

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

13 years agos390: Add ecag.stdout.exp-zec12 to EXTRA_DIST.
Florian Krohm [Thu, 10 Jan 2013 15:44:28 +0000 (15:44 +0000)] 
s390: Add ecag.stdout.exp-zec12 to EXTRA_DIST.

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

13 years agos390: bug fix. DFP rounding mode mixup.
Florian Krohm [Thu, 10 Jan 2013 15:41:46 +0000 (15:41 +0000)] 
s390: bug fix. DFP rounding mode mixup.
Spotted and fixed by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2630

13 years agoadd ecag exp file for zec12
Christian Borntraeger [Wed, 9 Jan 2013 14:54:33 +0000 (14:54 +0000)] 
add ecag exp file for zec12

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

13 years agoremove useless undef of MYBUF_LEN
Philippe Waroquiers [Tue, 8 Jan 2013 14:30:17 +0000 (14:30 +0000)] 
remove useless undef of MYBUF_LEN

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

13 years agoCompanion fix to r2629: removal of specifiable default return values
Julian Seward [Tue, 8 Jan 2013 14:11:25 +0000 (14:11 +0000)] 
Companion fix to r2629: removal of specifiable default return values
in conditional dirty helper calls.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13216

13 years agoGet rid of selectable default (return) values in conditional dirty
Julian Seward [Tue, 8 Jan 2013 14:09:04 +0000 (14:09 +0000)] 
Get rid of selectable default (return) values in conditional dirty
calls, as introduced in r2594.  It is overkill -- unnecessary
complexity.  Instead have a pre-assumed default bit pattern of 0101010
(0x55..) to be returned in such cases.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2629

13 years agoRemove unused function.
Julian Seward [Mon, 7 Jan 2013 11:17:43 +0000 (11:17 +0000)] 
Remove unused function.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2628

13 years agoThe call to set the rounding mode for DFP iops: Iop_AddD128, Iop_SubD128,
Carl Love [Thu, 3 Jan 2013 23:34:18 +0000 (23:34 +0000)] 
The call to set the rounding mode for DFP iops: Iop_AddD128, Iop_SubD128,
Iop_MulD128, Iop_DivD128, and Iop_D128toI64 is wrong. The call being used is
set_FPU_rounding_mode(). This call is used to set the two rounding mode bits
for the Floating point instructions. The call set_FPU_DFP_rounding_mode()
should have been used to set the three rounding mode bits for the DFP
instructions.

This patch changes the call to the correct function to set the DFP
rounding mode bits.

The patch must be applied from the VEX directory.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2627

13 years agos390: Add testcases for DFP "shift significant" insns.
Florian Krohm [Tue, 1 Jan 2013 22:20:12 +0000 (22:20 +0000)] 
s390: Add testcases for DFP "shift significant" insns.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

13 years agos390: Add support for DFP "shift significant" insns.
Florian Krohm [Tue, 1 Jan 2013 22:19:24 +0000 (22:19 +0000)] 
s390: Add support for DFP "shift significant" insns.
Based on patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2626

13 years agoImprove handling of dirty helper calls when building trees in ado_treebuild_BB.
Florian Krohm [Sun, 30 Dec 2012 18:17:18 +0000 (18:17 +0000)] 
Improve handling of dirty helper calls when building trees in ado_treebuild_BB.
This function took an overly conservative approach and always assumed
that calling a dirty helper would modify both guest state and memory. This
patch introduces two new functions dirty_helper_stores and dirty_helper_puts,
to determine the actual side effets of a helper call. Using these functions
increases precision and allows the tree builder to move a GET past a dirty
helper call.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2625

13 years agos390: Add testcase for "test data class/group" insns.
Florian Krohm [Fri, 28 Dec 2012 15:54:23 +0000 (15:54 +0000)] 
s390: Add testcase for "test data class/group" insns.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
This is part of fixing BZ 307113.

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

13 years agoImprovements to the built-in profiling infrastructure:
Julian Seward [Fri, 28 Dec 2012 09:12:14 +0000 (09:12 +0000)] 
Improvements to the built-in profiling infrastructure:

--profile-flags=00000000 now prints summary statistics, one line per
profiled block, but with no translation details.  Previously it had
no effect.

--profile-interval=<number> is a new flag that causes the profile data
to be dumped and zeroed every <number> event checks.  This makes it
possible to get profile data without waiting for runs to end, and to
get profile data which depends on the current workload etc.  If
--profile-interval=0 or is unset, the profile is printed only once, at
the end of the run, as before.

--profile-flags=XXXXXXXX (for at least one nonzero X) prints the
summary lines both at the start and end of the profile, so you don't
have to scroll back up to the top to see the summary.

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

13 years agoShow the guest->host code expansion ratio when debug-printing
Julian Seward [Fri, 28 Dec 2012 09:01:59 +0000 (09:01 +0000)] 
Show the guest->host code expansion ratio when debug-printing
translations.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2624

13 years agoIndentation only change.
Florian Krohm [Thu, 27 Dec 2012 20:59:43 +0000 (20:59 +0000)] 
Indentation only change.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2623

13 years agos390: Add testcases for ESDTR and EXDTR.
Florian Krohm [Thu, 27 Dec 2012 20:17:32 +0000 (20:17 +0000)] 
s390: Add testcases for ESDTR and EXDTR.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.

[ r13211 was also implemented by Maran. ]

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

13 years agos390: Support the "test data class/group" and "extract significance"
Florian Krohm [Thu, 27 Dec 2012 20:14:03 +0000 (20:14 +0000)] 
s390: Support the "test data class/group" and "extract significance"
insns. Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
This is part of fixing BZ 307113.

[ revision 2621 was also implemented by Maran. ]

git-svn-id: svn://svn.valgrind.org/vex/trunk@2622

13 years agovalgrind-side support for Iop_ExtractSigD64 and Iop_ExtractSigD128.
Florian Krohm [Thu, 27 Dec 2012 20:06:18 +0000 (20:06 +0000)] 
valgrind-side support for Iop_ExtractSigD64 and Iop_ExtractSigD128.
See also companion patch VEX r2621.

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

13 years agoNew IROps: Iop_ExtractSigD64 and Iop_ExtractSigD128. These are needed to
Florian Krohm [Thu, 27 Dec 2012 20:01:13 +0000 (20:01 +0000)] 
New IROps: Iop_ExtractSigD64 and Iop_ExtractSigD128. These are needed to
implement s390's "extract significance" insns.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2621

13 years agoTeach DRD about IRLoadG and IRStoreG. Includes small bug fix from
Julian Seward [Thu, 27 Dec 2012 17:47:09 +0000 (17:47 +0000)] 
Teach DRD about IRLoadG and IRStoreG.  Includes small bug fix from
trunk r13209.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13210

13 years agois_stack_access: don't iterate over possibly non-existent stmts. This
Julian Seward [Thu, 27 Dec 2012 17:46:10 +0000 (17:46 +0000)] 
is_stack_access: don't iterate over possibly non-existent stmts.  This
has been observed to cause the JIT to segfault when using DRD on ARM.

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

13 years agoUpdate list of ignored files.
Florian Krohm [Thu, 27 Dec 2012 17:21:46 +0000 (17:21 +0000)] 
Update list of ignored files.

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

13 years agoRemove Makefile-icc which has been broken for a long time.
Florian Krohm [Thu, 27 Dec 2012 17:19:12 +0000 (17:19 +0000)] 
Remove Makefile-icc which has been broken for a long time.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2620

13 years agoTeach Helgrind about IRLoadG and IRStoreG.
Julian Seward [Thu, 27 Dec 2012 13:37:36 +0000 (13:37 +0000)] 
Teach Helgrind about IRLoadG and IRStoreG.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13207

13 years agoTeach Callgrind about IRLoadG and IRStoreG.
Julian Seward [Thu, 27 Dec 2012 12:02:15 +0000 (12:02 +0000)] 
Teach Callgrind about IRLoadG and IRStoreG.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13206

13 years agovbit-tester: In test_ternary_op return number of tests executed.
Florian Krohm [Thu, 27 Dec 2012 03:00:49 +0000 (03:00 +0000)] 
vbit-tester: In test_ternary_op return number of tests executed.
I don't recall gcc complaining about this. But clang did.

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

13 years agos390: Do not waste a register when assigning a constant to a memory
Florian Krohm [Thu, 27 Dec 2012 00:59:43 +0000 (00:59 +0000)] 
s390: Do not waste a register when assigning a constant to a memory
location. If available, use MVHI and friends. If those are not available,
load the constant value into register r0 and store that. r0 is not visible
to register allocation and therefore using it does not increase register
pressure.
Remove S390_INSN_MZERO and replace it with S390_INSN_MIMM. Assigning zero
is just a special case..
Saves between 0.9% and 2.4% of insns as measured with the perf regression
bucket.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2619

13 years agos390: Remove a forgotten debug print statement.
Florian Krohm [Thu, 27 Dec 2012 00:44:30 +0000 (00:44 +0000)] 
s390: Remove a forgotten debug print statement.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2618

13 years agoRemove a fixme.
Florian Krohm [Wed, 26 Dec 2012 21:12:07 +0000 (21:12 +0000)] 
Remove a fixme.

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

13 years agovalgrind side changes to support Iop_CmpExpD64 and Iop_CmpExpD128.
Florian Krohm [Wed, 26 Dec 2012 17:48:46 +0000 (17:48 +0000)] 
valgrind side changes to support Iop_CmpExpD64 and Iop_CmpExpD128.
VEX buddy patch is r2617.
Enhance testcase for CEDTR and CEXTR. Adapt vbit tester.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
This is part of fixing BZ 307113.

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

13 years agos390x: Support "compare biased exponent" insns CEDTR, CEXTR.
Florian Krohm [Wed, 26 Dec 2012 17:47:19 +0000 (17:47 +0000)] 
s390x: Support "compare biased exponent" insns CEDTR, CEXTR.
To do that properly, two new IROps are needed: Iop_CmpExpD64 and
Iop_CmpExpD128. It might seem that extracting the exponents using
Iop_ExtractExpD64/D128 and comparing the values could be used here.
But that only works for finite DFP values. Hence, the new IROps.

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
This is part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2617

13 years agoAvoid compiler warning on ppc32.
Florian Krohm [Mon, 24 Dec 2012 15:10:19 +0000 (15:10 +0000)] 
Avoid compiler warning on ppc32.

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

13 years agonone/tests/process_vm_readv_writev: Avoid that compilation of this test program trigg...
Bart Van Assche [Mon, 24 Dec 2012 11:14:08 +0000 (11:14 +0000)] 
none/tests/process_vm_readv_writev: Avoid that compilation of this test program triggers a compiler warning

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

13 years agodrd/tests/pth_cond_destroy_busy: Correct expected output
Bart Van Assche [Mon, 24 Dec 2012 10:43:15 +0000 (10:43 +0000)] 
drd/tests/pth_cond_destroy_busy: Correct expected output

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

13 years agodrd/tests/pth_cond_destroy_busy: Add
Bart Van Assche [Mon, 24 Dec 2012 10:23:16 +0000 (10:23 +0000)] 
drd/tests/pth_cond_destroy_busy: Add

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

13 years agodrd: Handle pthread_cond_destroy() failure properly
Bart Van Assche [Mon, 24 Dec 2012 10:22:14 +0000 (10:22 +0000)] 
drd: Handle pthread_cond_destroy() failure properly

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

13 years agoFix VEX standalone build with Makefile-gcc. This has been bit-rotting
Florian Krohm [Mon, 24 Dec 2012 00:25:34 +0000 (00:25 +0000)] 
Fix VEX standalone build with Makefile-gcc. This has been bit-rotting
for a while.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2616

13 years agoUpdated for s390_defs.h.
Florian Krohm [Mon, 24 Dec 2012 00:16:23 +0000 (00:16 +0000)] 
Updated for s390_defs.h.

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

13 years agos390: New file s390_defs.h to contain definitions that are
Florian Krohm [Mon, 24 Dec 2012 00:14:31 +0000 (00:14 +0000)] 
s390: New file s390_defs.h to contain definitions that are
neither guest nor host specific, but just s390 specific. These
definitions formerly resided in host_s390_defs.h

git-svn-id: svn://svn.valgrind.org/vex/trunk@2615

13 years agos390: Add testcases for CDTR, CXTR, LDETR. LXDTR, LEDTR, LDXTR.
Florian Krohm [Sun, 23 Dec 2012 16:17:18 +0000 (16:17 +0000)] 
s390: Add testcases for CDTR, CXTR, LDETR. LXDTR, LEDTR, LDXTR.
This is part of fixing BZ 307113.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

13 years agos390: Simplify the optimisation for PUTs to tracked registers.
Florian Krohm [Sun, 23 Dec 2012 01:09:16 +0000 (01:09 +0000)] 
s390: Simplify the optimisation for PUTs to tracked registers.

There is no need to treat the guest IA register specially. The first
assignment in a SB to any tracked register will always assign the full value
and not do an incremental update. Therefore, maintaining
env->first_IA_assignment is redundant. Interestingly, the old code
forgot to mark the tracking state as valid when first_IA_assignment was
true, resulting in an inefficiency (in the order of 0.8% of insns).

Also, when a tracked register already contains the value that it is
being assigned, there is not need to
(a) check whether that register requires precise memory exceptions and
(b) if so, assign the new value.
By definition, the register is up-to-date and reassigning the new value
which is also the old value is meaningless. No idea, what I was thinking
at the time.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2614

13 years agos390: Reduce the size of an s390_insn from 48 bytes to 32 bytes by
Florian Krohm [Sat, 22 Dec 2012 15:01:04 +0000 (15:01 +0000)] 
s390: Reduce the size of an s390_insn from 48 bytes to 32 bytes by
- adding one level of indirection for CDAS and DFP binops
- rearranging and tweaking the variant for helper calls
- using seperate insns kinds for signed and unsigned multiplication
  and division.
Add an assert to make sure the size stays at 32 bytes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2613

13 years agos390: Fix a silly mistake causing an infinite loop.
Florian Krohm [Sat, 22 Dec 2012 14:50:41 +0000 (14:50 +0000)] 
s390: Fix a silly mistake causing an infinite loop.
Spotted by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2612

13 years agos390: Generalise S390_INSN_GADD which only worked on the guest
Florian Krohm [Sat, 22 Dec 2012 02:28:25 +0000 (02:28 +0000)] 
s390: Generalise S390_INSN_GADD which only worked on the guest
state to S390_INSN_MADD which works for any memory location
addressable with base reg + 20-bit displacement.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2611

13 years agos390: Fix an assert.
Florian Krohm [Sat, 22 Dec 2012 02:09:40 +0000 (02:09 +0000)] 
s390: Fix an assert.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2610

13 years agos390: Rename s390_conv_t to s390_bfp_conv_t. Purely mechanical.
Florian Krohm [Fri, 21 Dec 2012 21:43:00 +0000 (21:43 +0000)] 
s390: Rename s390_conv_t to s390_bfp_conv_t. Purely mechanical.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2609

13 years agos390: Distinguish between conversion to/from IRCmpFxxResult and
Florian Krohm [Fri, 21 Dec 2012 21:05:17 +0000 (21:05 +0000)] 
s390: Distinguish between conversion to/from IRCmpFxxResult and
IRCmpDxxResult, even though the encodings are currently the same.
Rename convert_s390_fpcc_to_vex to convert_s390_to_vex_bfpcc.
Add convert_s390_to_vex_dfpcc and convert_vex_dfpcc_to_s390.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2608

13 years agoDefine IRCmpD64Result and IRCmpD128Result.
Florian Krohm [Fri, 21 Dec 2012 20:24:24 +0000 (20:24 +0000)] 
Define IRCmpD64Result and IRCmpD128Result.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2607

13 years agos390: Add support for storing DFP values (32/64 bit).
Florian Krohm [Fri, 21 Dec 2012 18:55:03 +0000 (18:55 +0000)] 
s390: Add support for storing DFP values (32/64 bit).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2606

13 years agoCompanion patch to VEX r2605. Adds a few testcases and adapts the vbit
Florian Krohm [Fri, 21 Dec 2012 18:34:48 +0000 (18:34 +0000)] 
Companion patch to VEX r2605. Adds a few testcases and adapts the vbit
tester. This is part of fixing BZ #307113.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

13 years agoAdd support for these DFP insns:
Florian Krohm [Fri, 21 Dec 2012 17:32:12 +0000 (17:32 +0000)] 
Add support for these DFP insns:
AXTRA, CDTR, CXTR, DXTRA, LDETR, LXDTR, LDXTR, LEDTR, LTXTR, MXTRA, SXTRA
This is part of fixing BZ #307113.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com) with some minor
mods.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2605

13 years agoTeach Cachegrind about IRLoadG and IRStoreG.
Julian Seward [Fri, 21 Dec 2012 10:34:08 +0000 (10:34 +0000)] 
Teach Cachegrind about IRLoadG and IRStoreG.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13194

13 years agoRemove redundant code snippet.
Florian Krohm [Fri, 21 Dec 2012 04:40:28 +0000 (04:40 +0000)] 
Remove redundant code snippet.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2604

13 years agoFix mc_translate for Iop_D64toD32.
Florian Krohm [Fri, 21 Dec 2012 04:25:10 +0000 (04:25 +0000)] 
Fix mc_translate for Iop_D64toD32.
Spotted and fixed by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

13 years agoMinor style improvement over r13190.
Petar Jovanovic [Fri, 21 Dec 2012 02:15:23 +0000 (02:15 +0000)] 
Minor style improvement over r13190.

Prerequisite should be non existence of a #define (rather than existence of
#undef in the comments).

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

13 years agoFix typos. Should really use __func__ instead.
Florian Krohm [Thu, 20 Dec 2012 19:44:18 +0000 (19:44 +0000)] 
Fix typos. Should really use __func__ instead.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2603

13 years agoUse different incorrect value in pth_detached3
Petar Jovanovic [Thu, 20 Dec 2012 19:02:17 +0000 (19:02 +0000)] 
Use different incorrect value in pth_detached3

The test pth_detached3 will crash on MIPS platform if the value passed to
pthread_detach is not correctly aligned. Thus, we change the value to be still
invalid but aligned.

This fixes the failure of drd/tests/pth_detached3 on MIPS32.

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

13 years agoIntroduce DISABLE_PTHREAD_SPINLOCK_INTERCEPT flag
Petar Jovanovic [Thu, 20 Dec 2012 18:56:57 +0000 (18:56 +0000)] 
Introduce DISABLE_PTHREAD_SPINLOCK_INTERCEPT flag

The flag DISABLE_PTHREAD_SPINLOCK_INTERCEPT is set only for MIPS32, and it is
used in DRD and Helgrind as a workaround for the issue #311690.
In short, pthread_spin_lock implementation has local branches to the start of
the function which interferes with the redirection system in Valgrind that
assumes it has to redirect each call/branch to a particular address.

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

13 years agos390: Fix IR generation for DDTR and MDTR. These insns do not modify
Florian Krohm [Thu, 20 Dec 2012 16:58:52 +0000 (16:58 +0000)] 
s390: Fix IR generation for DDTR and MDTR. These insns do not modify
the condition code.
Spotted and fixed by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2602

13 years agos390: Fix disassembly for ADTRA, DDTRA, MDTRA, and SDTRA.
Florian Krohm [Thu, 20 Dec 2012 14:44:42 +0000 (14:44 +0000)] 
s390: Fix disassembly for ADTRA, DDTRA, MDTRA, and SDTRA.
Spotted by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2601

13 years agos390: Add thunk layout documentation for S390_CC_OP_DFP_RESULT_64.
Florian Krohm [Thu, 20 Dec 2012 14:31:19 +0000 (14:31 +0000)] 
s390: Add thunk layout documentation for S390_CC_OP_DFP_RESULT_64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2600

13 years agoHandle IRLoadG and IRStoreG.
Julian Seward [Wed, 19 Dec 2012 23:56:46 +0000 (23:56 +0000)] 
Handle IRLoadG and IRStoreG.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13189

13 years agoHook up a couple of ARM (encoded) load/store cases to the new guarded
Julian Seward [Wed, 19 Dec 2012 15:38:25 +0000 (15:38 +0000)] 
Hook up a couple of ARM (encoded) load/store cases to the new guarded
load/store IR stuff.  I think these are the last I am going to do, for
now.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2599

13 years agoConstant folder: enable Sub32(x,0) ==> x.
Julian Seward [Wed, 19 Dec 2012 15:28:43 +0000 (15:28 +0000)] 
Constant folder: enable Sub32(x,0) ==> x.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2598

13 years agoIop_GetMSBs8x16: remove a copy-n-paste error introduced in r2590.
Julian Seward [Wed, 19 Dec 2012 08:39:11 +0000 (08:39 +0000)] 
Iop_GetMSBs8x16: remove a copy-n-paste error introduced in r2590.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2597

13 years agoFix vbit tester for Iop_D32toD64 and Iop_D64toD32.
Florian Krohm [Wed, 19 Dec 2012 04:21:09 +0000 (04:21 +0000)] 
Fix vbit tester for Iop_D32toD64 and Iop_D64toD32.
Spotted and fixed by Maran (maranp@linux.vnet.ibm.com).

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

13 years agoFix typeOfPrimop for Iop_D32toD64 and Iop_D64toD32.
Florian Krohm [Wed, 19 Dec 2012 04:19:54 +0000 (04:19 +0000)] 
Fix typeOfPrimop for Iop_D32toD64 and Iop_D64toD32.
Spotted and fixed by Maran (maranp@linux.vnet.ibm.com).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2596

13 years agoInstrumentation of guarded loads and stores: annotate helper calls
Julian Seward [Mon, 17 Dec 2012 21:56:58 +0000 (21:56 +0000)] 
Instrumentation of guarded loads and stores: annotate helper calls
with the required IRDefault (guarded-dirty-call default return result
specifications).

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13187

13 years agoARM back end: handle IRDefaults in dirty helper calls.
Julian Seward [Mon, 17 Dec 2012 21:55:21 +0000 (21:55 +0000)] 
ARM back end: handle IRDefaults in dirty helper calls.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2595

13 years agoIR: add the ability to specify the call-didn't-happen ("default")
Julian Seward [Mon, 17 Dec 2012 21:54:10 +0000 (21:54 +0000)] 
IR: add the ability to specify the call-didn't-happen ("default")
return value for conditional dirty helper calls returning values.  The
default value can be either all-zeroes or all-ones.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2594

13 years agoRemove a bit of debug printing.
Julian Seward [Mon, 17 Dec 2012 21:51:59 +0000 (21:51 +0000)] 
Remove a bit of debug printing.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2593

13 years agoFix the configure check so that fair-sched works on Android too.
Julian Seward [Mon, 17 Dec 2012 14:46:48 +0000 (14:46 +0000)] 
Fix the configure check so that fair-sched works on Android too.

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

13 years agoWith --stats=yes, also print TT/TC stats.
Julian Seward [Mon, 17 Dec 2012 12:44:03 +0000 (12:44 +0000)] 
With --stats=yes, also print TT/TC stats.

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

13 years agoFix an operator precedence error found by BEAM.
Florian Krohm [Mon, 17 Dec 2012 03:04:35 +0000 (03:04 +0000)] 
Fix an operator precedence error found by BEAM.

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

13 years agoFix an assert in s390 disassembly. Eliminate a few magic array
Florian Krohm [Sun, 16 Dec 2012 22:49:05 +0000 (22:49 +0000)] 
Fix an assert in s390 disassembly. Eliminate a few magic array
width constants and use S390_MAX_MNEMONIC_LEN instead.
New function "mnemonic" to construct a mnemonic string padded with
blanks for alignment.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2592