482 Commits

Author SHA1 Message Date
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Julian Seward
5d7649ffe9 Rename cg-arch.c to cg_arch.c so as to be consistent with other
filenames, including cg_arch.h :)  No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13527
2013-09-03 08:39:28 +00:00
Mark Wielaard
7d4cc60c1f Bug 321730 Add cg_merge and cg_diff man pages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13442
2013-07-03 10:00:17 +00:00
Mark Wielaard
b81e3c86b6 Fix double 'the the' in documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363
2013-04-05 13:19:12 +00:00
Philippe Waroquiers
0e086ed3b1 Fix 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Patch by Mark Wielaard.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13324
2013-03-10 16:29:02 +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
c826b773d4 Fix statement order. Found by Coverity's checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13241
2013-01-19 02:27:41 +00:00
Julian Seward
661c1c2b7b Merge, from branches/COMEM, revisions 13139 to 13235.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13236
2013-01-17 14:24:35 +00:00
Florian Krohm
d62fe23131 Fix two memory leaks. Spotted by Coverity.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13234
2013-01-16 03:18:19 +00:00
Julian Seward
d8f44a112c Teach Cachegrind about IRLoadG and IRStoreG.
git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13194
2012-12-21 10:34:08 +00:00
Josef Weidendorfer
840c6d8437 Before LL, instrument outstanding helper calls.
Callgrind, Cachegrind, and Lackey call
helpers for memory accesses in bunches, to reduce
register save/restore overhead (and merge load/store
within same instruction into a "modify" event).

The calls should not be done within a RMW section
enclosed by LL/SC instructions, as this reduces the
chance of SC to succeed, and can result in hangs.
For Callgrind, this definitly helped MIPS, and was
committed in r13136. Do the same for Cachegrind/Lackey.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13143
2012-11-26 18:16:58 +00:00
Florian Krohm
e7f4d4f57f Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13138
2012-11-24 19:41:54 +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
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
Christian Borntraeger
ad1814e451 s390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13106
2012-11-07 07:57:01 +00:00
Josef Weidendorfer
ca4eecd8d2 Cachegrind: introduce special case for Ir
Because most Ir accesses touch only one line, and this
can be detected at instrumentation time, use a special
handler for that. This handler does not need to check
cache line crossing at runtime.

This does not change the results of the simulator at all,
but improves runtime by around 15% on perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13095
2012-10-30 00:28:29 +00:00
Josef Weidendorfer
9309e156a7 Get rid of compiler warning
In addition to "__attribute__((always_inline))", gcc wants
"__inline__" to be used, otherwise the warning

  warning: always_inline function might not be inlinable

is printed. However, this does not have any effect on
performance (probably "static" makes gcc 4.7 already inlining
the functions?).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13092
2012-10-29 21:28:03 +00:00
Florian Krohm
5337376bf2 More Char/HChar fixes and constification.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088
2012-10-27 18:39:11 +00:00
Florian Krohm
4d2d9aca2d Fix a few Char/HChar mixups for cachegrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13068
2012-10-21 02:39:42 +00:00
Philippe Waroquiers
3ba803f746 Follow-up to cache reorg: update trace cache warning
Update trace cache warning so that it is the same as before the cache reorg
(avoid failure of some tests on Pentium4 as the warning output
must match what is filtered by cachegrind/tests/filter_stderr)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13060
2012-10-20 17:18:35 +00:00
Florian Krohm
8a6563f826 Issue warning about missing L2 cache only if there are any
caches in the first place.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13058
2012-10-19 03:20:37 +00:00
Florian Krohm
52cb6c14fa Change cache detection for x86/amd64 to fill in VexCacheInfo directly.
New function write_cache_info to dump what was detected for debugging
purposes. 
New function cache_info_is_sensible to ensure that autodetected
cache info lives up to the promises made in libvex.h.
Moved the trace-cache related kludgery to cachegrind where it belongs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13053
2012-10-18 03:16:45 +00:00
Petar Jovanovic
110060a9d2 Fix syntax error from r13028.
Typo in r130128 broke the build on MIPS arch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13033
2012-10-08 10:07:08 +00:00
Florian Krohm
83fbb427ee s390: Consolidate information about caches for older machines levels.
Unfortunately, there is only incomplete L2 data.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13032
2012-10-08 00:09:22 +00:00
Florian Krohm
7d59048401 This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031
2012-10-07 21:59:42 +00:00
Florian Krohm
bd10a6b0f9 Use last-level cache for simulation. Even if there are more than
3 cache levels. Update documentation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13030
2012-10-07 21:03:27 +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
Josef Weidendorfer
5b8eeb6545 Cachegrind: use memory block numbers as tags.
This saves instructions in hot path, resulting in
3% improvement on average with perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13025
2012-10-05 23:58:23 +00:00
Josef Weidendorfer
2a505ac120 cachegrind: replace huge macro with inlined functions
Makes modifications simpler in the future, and
should result in the same code.

This patch was already discussed some time ago on the
dev mailing list, and did not make a difference on
various architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13024
2012-10-05 23:58:17 +00:00
Florian Krohm
dc87cc40e8 s390: Fix the default cache configuration. As z10-EC has an L3
cache, use that instead of the L2 -- bringing the code in synch
with documentation. 
Also improve the warning message to be more meaningful.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12911
2012-08-29 02:50:56 +00:00
Philippe Waroquiers
15493bb541 Implement --vex-iropt-register-updates=sp-at-mem-access
Option sp-at-mem-access can be used by tools which do not
need an up to date BP and IP at each mem access.
It is needed however to have SP up to date at each memory
access, as an up to date SP is needed to grow the stack in
m_signals.c

Tools massif, cachegrind and callgrind are using sp-at-mem-access
as default.
None tool could also use sp-at-mem-access but default is kept
to unwindregs-at-mem-access (similar to memcheck, drd, helgrind, exp-sgcheck).

exp-dhat, exp-bbv, lackey have not been looked at to see if they
could make use of sp-at-mem-access.

Validated on x86, amd64, ppc64 and s390x.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12872
2012-08-14 22:28:31 +00:00
Florian Krohm
5fd9d2ae08 Change script to also handle IBM's copyright notice.
Update copyright notices.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12853
2012-08-06 18:34:24 +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
Julian Seward
d971e9300f Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: new non-test files for mips32-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12617
2012-06-07 09:23:23 +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
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
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
Bart Van Assche
aea944631e Remove an obsolete regression test output file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12139
2011-10-12 17:29:23 +00:00
Florian Krohm
6e43c5d786 Fix a NULL pointer dereference issue spotted by IBM's BEAM checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12062
2011-09-28 17:43:44 +00:00
Josef Weidendorfer
7617408d27 Allow overriding not-supported auto-detected cache configs
Patch by Philippe Waroquiers, slightly changed.

This actually was a regression from 3.6.1, but the patch
also improves on printed messages, and refactors common
code between cachegrind and callgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12013
2011-09-06 19:08:31 +00:00
Florian Krohm
0ef00056eb Add more info about cache sizes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11996
2011-08-19 19:41:57 +00:00
Tom Hughes
f1d216c8d7 Report the detected cache configuration with "-v -v" before we
validate it to make validation failures easier to diagnose.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11994
2011-08-19 09:01:22 +00:00
Tom Hughes
fa93278fcb Add missing break statements to example code. Fix to #264644.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11983
2011-08-15 11:11:41 +00:00
Josef Weidendorfer
04003f215d Suppress warning about associativity change for tests
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11840
2011-06-27 17:26:19 +00:00
Julian Seward
a12e858c35 Try to handle LL caches which are of size 50% above a power of 2 (eg,
6MB, 12MB) and have a non-power-of-2 number of sets.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11812
2011-06-13 13:14:00 +00:00
Josef Weidendorfer
170911abdf Add cpuid cache values from Intel SDM 5/11
For a Sandybridge desktop, previously this resulted in
...
--14842-- warning: Unknown Intel cache config value (0x76), ignoring
...
with Cachegrind/Callgrind

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11811
2011-06-10 20:29:27 +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
Tom Hughes
ba58058f83 Use the precomputed sets_min_1 value consistently when masking
off bits from an address to find which cache set it is in.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11809
2011-06-09 12: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