Commit Graph

96 Commits

Author SHA1 Message Date
Florian Krohm
30f32f46d2 s390: valgrind side support for PFPO. New hwcap added.
See companion patch VEX r2719.

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13387
2013-05-11 15:05:04 +00:00
Julian Seward
dc0e01ab4d Build system and hwcaps fixes pertaining to #305728, which added
support for AVX2, BMI1, BMI2 and FMA instructions.
(Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13340
2013-03-27 11:43:20 +00:00
Julian Seward
0ebe62078c Add hwcaps checking on amd64 for RDTSCP. Part of the fix for #251569
and its dups.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13337
2013-03-26 13:57:48 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Florian Krohm
22703eb26f Remove a fixme.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13204
2012-12-26 21:12:07 +00:00
Florian Krohm
566b492554 Clean up the code for facility detection.
First, use STFLE whenever possible (i.e. for all facilities that
were introduced at the same time STFLE was or later). Turns out,
that is most facilities we're interesting in probing, except long
displacement.
Secondly, remove magic constants denoting facility bits and use
the definition from libvex_s390x_common.h
Thirdly, build up the debugging message that shows the status of
the probed facilities in a generic way so it won't have to be
changed when facilities are added.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13174
2012-12-09 17:30:45 +00:00
Florian Krohm
fbf7bb8f00 Probe host for conditional load/store facility.
New hwcaps: VEX_HWCAPS_S390X_LSCOND


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13149
2012-12-03 13:33:03 +00:00
Florian Krohm
af66466ce4 Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13137
2012-11-23 16:17:43 +00:00
Julian Seward
6f44cae342 Fix a couple of x86 char-signedness stragglers
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13128
2012-11-19 14:55:15 +00:00
Florian Krohm
d0aa69c331 Fix more Char/HChar mixups. Closing in...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119
2012-11-10 22:29:54 +00:00
Florian Krohm
a9b2103cf2 This patch is the first installment of the cache info reorganisation.
It's reorg only. No new cache autodetection stuff has been added.

coregrind
pub_tool_cpuid.h is removed as it is no longer exposed to tools.
Its contents has moved to pub_core_cpuid.h.
New file: coregrind/m_cache.c to contain the autodetect code for
cache configurations and define other cache characteristics that
cannot be autodetected (i.e. icaches_maintain_coherence). Most of 
cg-arch/x86-amd64.c was moved here. The cache detection code for
x86-64 needs to be fixed to properly initialise VexCacheInfo. It
currently has cachegrind bias.
m_cache.c exports a single function (to coregrind): 
   VG_(machine_get_cache_info)(VexArchInfo *vai)
This function is called from VG_(machine_get_hwcaps) after hwcaps have
been detected.

cachegrind
Remove cachegrind/cg-{ppc32,ppc43,arm,mips32,s390x,x86-amd64}.c
With the exception of x86/mamd64 those were only establishing a
default cache configuration and that is so small a code snippet that
a separate file is no longer warranted. So, the code was moved to
cg-arch.c. Code was added to extract the relevant info from 
x86-amd64.
New function maybe_tweak_LLc which captures the code to massage the
LLc cache configuration into something the simulator can handle. This
was originally in cg-x86-amd64.c but should be used to all architectures.
Changed warning message about missing cache auto-detect feature
to be more useful. Adapted filter-stderr scripts accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13028
2012-10-07 19:47:04 +00:00
Florian Krohm
7ccbc2abb5 Fix an uninitialised variable found be BEAM.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12927
2012-09-01 23:48:09 +00:00
Florian Krohm
6805920360 s390: Detect floating point extension facility. Update s390-features.c
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12920
2012-08-30 20:30:32 +00:00
Florian Krohm
e32ad1d0ae s390: Add zEC12 machine model. Fix spelling for some older models.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12905
2012-08-28 13:33:10 +00:00
Florian Krohm
7bea862277 On s390: detect presence of stckf hardware facility.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12902
2012-08-26 04:23:08 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Petar Jovanovic
4898947711 Removing the warning about defined yet unused function on MIPS.
Getting rid of the warning for the function handler_unsup_insn which is not
used on MIPS.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12686
2012-06-30 02:12:13 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Julian Seward
76d7802c9f m_machine: add new function VG_(machine_get_size_of_largest_guest_register)
cachegrind: use the new function to abort startup if the minumum line
  size is smaller than the size of the largest guest register.
Partially derived from a patch by Josef Weidendorfer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12605
2012-06-03 22:40:07 +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
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
Florian Krohm
f5ce342333 Be lenient if the machine model could not be determined. Assume it's
a new machine as opposed to a too old machine.
Patch by Christian Borntraeger (borntraeger@de.ibm.com) with additional
commentary. Fixes 298394.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12534
2012-04-22 03:50:20 +00:00
Florian Krohm
d135100a42 Consolidate and update information about dependencies of
VG_(machine_get_hwcaps) for all architectures in pub_core_machine.h
and avoid double maintenance.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12532
2012-04-22 02:48:20 +00:00
Florian Krohm
10962f4094 Set VEX_HWCAPS_S390X_STFLE if available.
This should have been part of r12335.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12525
2012-04-21 15:43:25 +00:00
Julian Seward
2d0cef6d37 Fixes for capabilities checking w.r.t. Power DFP instructions
(Valgrind side).  Fixes #297329.
(Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12483
2012-04-02 21:25:14 +00:00
Philippe Waroquiers
ce806ed31f (fixes bug 289939 wish: complete monitor cmd 'leak_check' with details
about leaked or reachable blocks)

This patch implements two new memcheck gdbserver monitor commands:
  block_list <loss_record_nr>
        after a leak search, shows the list of blocks of <loss_record_nr>
  who_points_at <addr> [<len>]
        shows places pointing inside <len> (default 1) bytes at <addr>
        (with len 1, only shows "start pointers" pointing exactly to <addr>,
         with len > 1, will also show "interior pointers")


Compiled and reg-tested on f12/x86, deb5/amd64, f16/ppc64.

The 'block_list' command is implemented on top of the 
lr_array/lc_chunks/lc_extras arrays used during the last leak search.
NB: no impact on the memory for the typical Valgrind usage where a leak
search is only done at the end of the run.
Printing the block_list of a loss record simply consists in scanning the
lc_chunks to find back the chunks corresponding to the loss record for which
block lists is requested.

The 'who_points_at' command is implemented by doing a scan similar to 
(but simpler than) the leak search scan.
lc_scan_memory has been enhanced to have a mode to search for a specific
address, rather than to search for all allocated blocks.
VG_(apply_to_GP_regs) has been enhanced to also provide the ThreadId and
register name in the callback function.

The patch touches multiple files (but most changes are easy/trivial or factorise
existing code).

Most significant changes are in memcheck/mc_leakcheck.c :
    * changed the LC_Extra struct to remember the clique for indirect leaks
      (size of structure not changed).
    * made lr_array a static global
    * changed lc_scan_memory:
        to have a search mode for a specific address (for who_points_at)
        (for leak search) to pass a 'current clique' in addition to the clique
         leader
         so as to have a proper clique hierarchy for indirectly leaked blocks.
    * print_results: reset values at the beginning of the print_result of the
      next leak search, rather than at the end of print_results of the previous
       leak search.
      This allows to continue showing the same info for loss records till a new
      leak search is done.
    * new function print_clique which recursively prints a group of leaked
      blocks, starting from the clique leader.
    * new function MC_(print_block_list) : calls print_clique for each clique
      leader found for the given loss record.
    * static void scan_memory_root_set : code extracted from
      MC_(detect_memory_leaks) (no relevant change)
    * void MC_(who_points_at) : calls scan_memory_root_set, lc_scan_memory
        and VG_(apply_to_GP_regs)(search_address_in_GP_reg) to search 
        pointers to the given address.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12357
2012-01-26 23:13:52 +00:00
Florian Krohm
4b9b13911c Add support for the s390's TROO insn. These are the valgrind bits.
Detect ETF2 enhancement facility using STFLE. Add testcases.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com) with
modifications. Partial fix of #273114


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12335
2012-01-15 21:02:44 +00:00
Florian Krohm
22af00bcad Fix an out-of-bounds array access found by IBM's BEAM checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12232
2011-10-25 21:37:15 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Florian Krohm
e70a5000eb Add support for s390x model z114. See also VEX r2198
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12005
2011-09-02 22:20:41 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Tom Hughes
c5931781bc Teach cachegrind/callgrind how to parse the cache description
in the CPUID data on recent Intel processors.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11810
2011-06-10 15:04:22 +00:00
Julian Seward
482237674c s390x: fpr - gpr transfer facility -- valgrind side fixes,
and test cases.  Fixes #268619.
(Florian Krohm, britzel@acm.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11713
2011-04-27 12:00:51 +00:00
Julian Seward
8dd8315914 Add support for IBM Power ISA 2.06 -- stage 1. Valgrind-side changes
and test cases. Bug #267630 and followup fix #270794.
(Maynard Johnson, maynardj@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11697
2011-04-15 11:57:05 +00:00
Julian Seward
7681f394c3 s390x: reconsider "long displacement" requirement -- hwcaps detection
changes.  See #268620.  (Florian Krohm, britzel@acm.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11695
2011-04-13 15:40:10 +00:00
Julian Seward
c2120cadde Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11688
2011-04-11 18:36:34 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
9c6d0dc9c9 Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673
2011-03-28 16:26:42 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
0bb6f49531 On arm-linux, add r7 to the set of registers that the CFI unwinder
knows how to unwind.  This is important when unwinding Thumb code
the CFA is often stated as being at some offset from r7.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11377
2010-09-23 22:05:59 +00:00
Julian Seward
19bc251432 arm-linux: determine whether the host supports Neon by looking at our
AUXV at startup, rather than by trying to execute a Neon instruction
and seeing whether it SIGILLs.  Apparently the latter is not a
reliable way to ascertain the presence of usable Neon support.  Fixes
#249775.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11347
2010-09-09 07:25:58 +00:00
Julian Seward
437bec2e42 Fix somewhat nonsensical ifdeffery.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11345
2010-09-08 15:12:33 +00:00
Julian Seward
f150e720c1 Stop gcc complaining that dcbz_szB is used uninitialised.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11339
2010-09-04 00:43:14 +00:00
Julian Seward
efef31093f Support the DCBZL instruction. Also, query the host CPU at startup
time to find out how much space DCBZL really clears, and make the
guest CPU act accordingly.  (valgrind-side changes).
(Dave Goodell, goodell@mcs.anl.gov)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11337
2010-09-03 15:51:34 +00:00
Bart Van Assche
0bf86ce7b9 Added functions for querying the properties of the alternate stack.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11324
2010-09-02 14:38:38 +00:00
Julian Seward
ad584ebb64 Merge from branches/THUMB: m_machine changes needed for Thumb support:
* track guest_R15 -> guest_R15T renaming
* change min instruction size to 2
* tidy up VG_(get_IP) etc functions a bit
* add hwcaps detection code for ARM



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11283
2010-08-22 12:21:14 +00:00
Julian Seward
7935ce249e x86/amd64: detect whether the CPU supports LZCNT. Followup to
#212335.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11241
2010-07-29 15:40:32 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Julian Seward
6a9a4015c7 Various minor fixups to make ppc32/64-linux work again following
recent ARM-Linux merge.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10992
2010-01-02 13:24:58 +00:00
Julian Seward
e9de458500 Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982
2010-01-01 11:59:33 +00:00