9296 Commits

Author SHA1 Message Date
Philippe Waroquiers
ec2e7c2bdf fix the warning introduced by fixing SETTLS clone flag PRE_READ logic
on amd64, vki_modify_ldt_t was defined as void (not very clear why).
sizeof (void) cannot be taken (or more precisely can be taken,
but nobody knows what that means and what gcc does).
So, uncommended the (supposedly) correct definition of the type.
Note that I checked the definition on debian 6.0, kernel 2.6.32
and the structure is still ok.

Still needed to look at the other platforms not properly
handling the *SETTID and the SETTLS flags in clone PRE_READ
logic and/or not defining the type vki_modify_ldt_t



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12589
2012-05-27 20:21:02 +00:00
Julian Seward
a69e308075 Add more test cases for VCMPSS, and reenable disabled tests for VCMPSD
and VEXTRACTF128, now that the implementation has been fixed.  Current
status that all so-far implemented AVX instructions are tested by this
file, and none have any detectable failures.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12588
2012-05-27 13:52:54 +00:00
Julian Seward
61a307a9d4 Add tests for all AVX instructions implemented so far.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12587
2012-05-27 08:26:49 +00:00
Philippe Waroquiers
4f5b963f49 Fix false positive in sys_clone on amd64 when optional args are not given (e.g. child_tidptr)
rev 10493 fixed bug 117564 in syswrap-x86-linux.c.
This commit fixes the same problem in syswrap-amd64-linux.c.
The problem makes memcheck/tests/linux/stack_switch fails (at least on gcc20)
with unexpected
   ==802== Syscall param clone(child_tidptr) contains uninitialised byte(s)
The problem originates from always checking 3 optional args PRE_read,
while these should be checked only if the corresponding flags are set.

syswrap-{arm,ppc32,ppc64}-linux.c seems to have the same problem
(but no visible effect) : VKI_CLONE_PARENT_SETTID,VKI_CLONE_CHILD_SETTID
and VKI_CLONE_SETTLS not properly handled in the PRE part.

syswrap-s390x-linux.c seems to have the VKI_CLONE_SETTLS part wrong,
but VKI_CLONE_PARENT_SETTID and VKI_CLONE_CHILD_SETTID correct.

Commiting a fix just for amd64 for now.
We probably better make some common code in syswrap-generic.c
to regroup all similar platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12586
2012-05-26 23:08:41 +00:00
Philippe Waroquiers
266ed99f13 Add missing gdbserver xml files for shadow registers for ppc32
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12585
2012-05-25 23:22:39 +00:00
Philippe Waroquiers
e4a8d5e273 as vgdb not activated by default on android, need to fix the example
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12584
2012-05-25 22:36:01 +00:00
Julian Seward
3845d28914 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12583
2012-05-25 15:53:37 +00:00
Julian Seward
acec6c29cb Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12582
2012-05-25 13:51:33 +00:00
Philippe Waroquiers
2478728636 gdbserver: introduce support to show the AVX registers.
This implies to change the interface between the
arch independent gdbserver files and the arch dependent files
as AVX implies a choice of xml files at run time.

In valgrind-low-amd64.c, the xml files and the nr of registers
are different depending on AVX support or not.

Other platforms still have a fully static nr of registers.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12581
2012-05-24 21:33:17 +00:00
Julian Seward
9ae8554368 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12580
2012-05-24 21:07:16 +00:00
Philippe Waroquiers
4e5a6025dd Prepare for AVX support : restructure gdbsrv/target/valgrind-low/arch low
AVX support implies to have target xml files which are selected
according to the machine hwcaps.
This change improves the structure of the gdbserver software layering
to prepare for this.

Basically, the protocol files (e.g. server.c) are now calling directly
the valgrind target operations which are now defined in target.h/target.c
(before, there was a level of indirection inheritated from the GDB
structure which was useless for valgrind gdbserver).
+ clarified some comments



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12579
2012-05-23 21:50:36 +00:00
Christian Borntraeger
188189536d add some intial kvm ioctls (low hanging fruits). This gets rid of some valgrind
warnings regarding KVM ioctl without a length/direction specifier.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12578
2012-05-23 15:59:40 +00:00
Julian Seward
0bdcee8722 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12577
2012-05-23 11:40:03 +00:00
Julian Seward
dce19a2d07 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12576
2012-05-22 10:50:19 +00:00
Florian Krohm
b9f5142112 Add comments from Julian as to why mc_main.c and mc_replace_strmem.c
deserve special compilation treatment.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12575
2012-05-22 01:41:48 +00:00
Julian Seward
bd6eb116da Fix fallout from recent AVX commit (guest_XMMn no longer exist;
use guest_YMMn instead)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12574
2012-05-21 22:53:06 +00:00
Julian Seward
5955f3bdec Fix VALGRIND_MINOR/VALGRIND_MAJOR symbols. This got forgotten about
in 3.7.0 (oops).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12573
2012-05-21 21:57:05 +00:00
Florian Krohm
92c67b0ade Add -fomit-frame-pointer for s390. The GCC maintainer was telling me that
this has been the preferred way to compile for quite a while. So let's follow
suit. The perf bucket did not reveal any measurable difference.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12572
2012-05-21 16:18:23 +00:00
Julian Seward
a2f3b19d6f Handle 32-byte loads/stores, as created by recently added AVX support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12571
2012-05-21 13:44:54 +00:00
Julian Seward
d71610e63a Handle increase in ppc64 guest state size resulting from r2331.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12570
2012-05-21 11:01:35 +00:00
Julian Seward
8ebb8c30e5 Add initial support for Intel AVX instructions (Valgrind side).
Tracker bug is #273475.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12569
2012-05-21 10:18:10 +00:00
Philippe Waroquiers
e005c869c7 define AM_COND_IF if not yet defined (needed to build with automake 1.10)
Patch from Dave Goodell



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12568
2012-05-18 16:48:20 +00:00
Philippe Waroquiers
a541560dff Fix 274078 improved configure logic for mpicc
Patch from Dave Goodell.
See bug 274078 for detailed patch description.

Tested on deb6/amd64 with a static MPI (now it will be ignored
rather than make the Valgrind build failing), with a shared MPI,
and with no MPI.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12567
2012-05-17 15:32:54 +00:00
Philippe Waroquiers
0563f8bb0b name_of_sched_event was missing some values and returning "??UNKNOWN??" instead.
* re-ordered the values to match the declaration order in
  libvex_trc_values.h and pub_core_dispatch_asm.h
* added missing values



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12566
2012-05-17 14:31:13 +00:00
Philippe Waroquiers
a566ae84c3 NEWS entry for revision 12564 (bypass gcc 4.4/gcc 4.5 bug)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12565
2012-05-15 21:16:28 +00:00
Philippe Waroquiers
cad5f2ea1d Bypass gcc 4.4/4.5 compilation bug by moving -fomit-frame-pointer to Makefile.all.am
gcc 4.4 and 4.5 has a bug which causes miscompilation of mc_main.c:
 args are not correctly given to VG_(am_munmap_valgrind).
This causes the secondary map entries to not be unmapped
(which can cause unlimited memory growth) 
and/or causes the assert on VG_(am_munmap_valgrind) result to fail.

Removing the pragma optimize from mc_main.c and inserting it instead
in Makefile.all.am for x86 solves the gcc bug.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12564
2012-05-15 21:04:31 +00:00
Philippe Waroquiers
354569b574 Add assertion that the munmap of the secmap succeeds.
It is suspected that there is a bug in the call to VG_(am_munmap_valgrind).

At first sight, it looks like a bug in gcc version 4.4.5 (Debian 4.4.5-8)
which seems to pass wrong arguments from mc_main.c to aspace mgr function.
Some tests are failing on gcc20 with this assert a.o.
  ./vg-in-place ./perf/bz2 x
gives an assert.
The bug does not happen if Valgrind is compiled with gcc 4.7.0.


On gcc20, the new tests failing with this assert are:
memcheck/tests/linux/lsframe1            (stderr)
memcheck/tests/linux/lsframe2            (stderr)
memcheck/tests/linux/stack_switch        (stderr)
memcheck/tests/origin5-bz2               (stdout)
memcheck/tests/vcpu_bz2                  (stdout)
memcheck/tests/vcpu_bz2                  (stderr)

The assert is committed so as to see other platforms
where this is failing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12563
2012-05-13 22:58:09 +00:00
Florian Krohm
7d3eee1edf Move registration of mc_pre_reg_read to mc_post_clo_init.
This fixes the regtest failure for memcheck/tests/clireq_nofill on s390x.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12562
2012-05-12 18:06:35 +00:00
Florian Krohm
29f8d3cb83 Add a few testcases that exercise the s390_calculate_icc helper.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12561
2012-05-12 00:05:14 +00:00
Philippe Waroquiers
6ccb4c199e fix 299756 (for symmetry, --free-fill must be ignored for MEMPOOL_FREE and FREELIKE client requests).
Test program from goodell@mcs.anl.gov



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12560
2012-05-11 22:10:39 +00:00
Philippe Waroquiers
0ea6d36f1d fix 219156 support static malloc or alternate malloc lib (e.g. tcmalloc) with new option --soname-synonyms
* pub_tool_redir.h : define the prefix to be used for "soname synonym"
  place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
  functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
  in clo_soname_synonyms if there is a synonym pattern.
  If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12559
2012-05-11 19:33:46 +00:00
Julian Seward
1a3a9c7d99 Support DWARF version 4 DW_AT_high_pc constant form. #299053.
(Mark Wielaard, mjw@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12558
2012-05-09 23:09:05 +00:00
Philippe Waroquiers
54dc680c2b fix typo in README_DEVELOPERS
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12557
2012-05-06 21:29:59 +00:00
Florian Krohm
1f38919afa Avoid regtest failures on x86_64 and ppc64 when toolchains for the
seconday platform (x86 and ppc32, respectively) is not available.
Add -DVGA_SEC_xxxxx and -DVGP_SEC_... to the GCC command line
indicating that a seconday platform is supported. Make arch_test.c
recognise those flags.
Fixes bugzilla #296983.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12556
2012-05-06 03:51:00 +00:00
Florian Krohm
46b85eeb12 Require automake-1.10 for proper handling of include file dependencies
in .S files. Also included here is some cleanup, including a reversion
of r10378. Fixes bugzilla #197914.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12555
2012-05-06 03:37:25 +00:00
Philippe Waroquiers
adf73d7410 Avoid duplicate primary names when merging identical symbol table entries.
--trace-redir=yes shows that there are duplicated redir entries e.g.
--32537--    TOPSPECS of soname NONE filename /home/philippe/valgrind/m_redir_trace/memcheck/vgpreload_memcheck-amd64-linux.so
--32537--      libc.so*                  strcasecmp_l                   R-> (2014.0) 0x04c28bf0
--32537--      libc.so*                  strcasecmp_l                   R-> (2014.0) 0x04c28bf0
--32537--      libc.so*                  __GI_strcasecmp_l              R-> (2014.0) 0x04c28b70
--32537--      libc.so*                  __GI_strcasecmp_l              R-> (2014.0) 0x04c28b70

These are caused by the merging of identical debug entries always
adding the two primary names, even if the entries are exactly the same.

This patch avoids duplicated names in debug info if the entry to merge
has only one name identical to the entry name to which we are merging.

This avoids the useless duplicated redir entries, and slightly decreases
the "dinfo" memory usage.
 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12554
2012-05-05 22:18:24 +00:00
Florian Krohm
0b75ca0c0b Fix svn:ignore on ppc test buckets
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12553
2012-05-05 19:22:41 +00:00
Philippe Waroquiers
35b77cecf7 Improve m_redir.c debug trace by adding filename.
Many objects (shared or non shared) have no soname.
In such case, showing the filename clarifies where the
redir spec is coming from.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12552
2012-05-03 21:09:51 +00:00
Florian Krohm
33eb733e4e Updated for s390.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12551
2012-05-03 01:39:45 +00:00
Florian Krohm
3f94a793ae Add ETF3 facility (valgrind bits). Part of fixing Bugzilla #289839.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12550
2012-05-03 01:31:24 +00:00
Philippe Waroquiers
c3c15c750d Remove unused variable in massif/tests/pages_as_heap.c (revision 12548)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12549
2012-05-01 20:21:30 +00:00
Philippe Waroquiers
5b67793443 fix 298943 massif asserts with --pages-as-heap=yes when brk is changing by value different of page size
* add a massif test to (somewhat) validate --pages-as-heap=yes
  with calls to brk not being a multiple of a page size

* fix the assert:
   only record new pages or unrecord old pages if at least one new
   full page (or one full old page) is added/removed.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12548
2012-05-01 20:02:30 +00:00
Julian Seward
52df50db1b Add DFP test cases that accidentally missed in r12546.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12547
2012-05-01 19:51:07 +00:00
Julian Seward
6e0e5e15c5 Test cases for POWER Power Decimal Floating Point (DFP) test class,
test group and test exponent instructions dtstdc, dtstdcq, dtstdg,
dtstdgq, dtstex and dtstexq.  Bug #298862.  (Carl Love,
carll@us.ibm.com and Maynard Johnson, maynardj@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12546
2012-04-29 20:20:16 +00:00
Julian Seward
3ba809deb6 Correctly parse DW_FORM_ref_addr -- its format is different in Dwarf2
vs Dwarf3 and later.  Fixes #298864.  (Tom Tromey, tromey@redhat.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12545
2012-04-29 11:35:37 +00:00
Philippe Waroquiers
f53053e7c9 add optional arg [aspacemgr] to v.info memory to show aspacemgr segments.
When investigating Valgrind out of memory situation,
it is useful to be able to output the list of segments of the
aspacemgr at any moment.
The GDB monitor command "v.info memory" has now an optional
argument allowing to output this list of segments



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12544
2012-04-27 22:59:43 +00:00
Julian Seward
a62fcf1d85 Add feature detection for amd64.avx, and (potentially) FMA.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12543
2012-04-26 14:17:50 +00:00
Julian Seward
bd9f3bb750 For --profile-flags=, weight the counts by the number of guest insns
in each IRSB, rather than considering each IRSB to have a weight of 1.
This probably gives more representative profiles, especially post
t-chain merge, which made inter-SB transitions more or less free
compared to what they were before.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12542
2012-04-24 11:50:49 +00:00
Julian Seward
72eb6b7a7e POWER Processor decimal floating point instruction support, part 3 --
test cases.  (Carl Love, carll@us.ibm.com).  Bug 298080.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12541
2012-04-23 11:22:05 +00:00
Julian Seward
a716c0f5c4 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12540
2012-04-23 09:53:36 +00:00