443 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
c904167a7f Added a --mod-funcname option to cg_diff.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11488
2010-12-17 00:45:19 +00:00
Julian Seward
2b84460a22 Fix up printing of the can't-autodetect-params message and the
filtering out thereof, so as to make Cachegrind and Callgrind
pass their regressiont tests on ARM-Linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11433
2010-10-12 10:14:43 +00:00
Julian Seward
1a187bd147 Update stderr filters so that regtests pass on machines with 3-level caches.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11411
2010-10-07 13:33:28 +00:00
Nicholas Nethercote
60d9b410d4 Change Cachegrind/Callgrind to talk about the LL (last-level) cache instead
of the L2 cache.  This is to accommodate machines with three levels of
cache.  We still only simulate two levels, the first and the last.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11404
2010-10-06 22:46:31 +00:00
Nicholas Nethercote
fd11394abf Speed up the --cache-sim=no case.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11383
2010-09-27 02:20:38 +00:00
Nicholas Nethercote
3f6bcea6aa In Cachegrind, allow --cache-sim=no --branch-sim=no. Sometimes just getting
instruction counts is useful.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11382
2010-09-27 01:04:20 +00:00
Josef Weidendorfer
afc1a37745 Fix branch predictor simulation in Cachegrind
* do indirect branch prediction simulation on calls
  via function pointers
* only call into conditional branch prediction simulation
  on real guest code branches (eg. not for VEX emulation of some
  instructions using branches of jumpkind Ijk_EmWarn)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11331
2010-09-02 17:06:49 +00:00
Nicholas Nethercote
11f94ef626 Make error messages at start-up more consistent. Every line of such
messages now begin with "valgrind: ", and they're more often printed before
the preamble.  This required introducing a new message kind, Vg_FailMsg, and
functions VG_(fmsg) and VG_(fmsg_bad_option), and removing
VG_(err_bad_option).

Where we used to have horrible output like this:

    [ocean:~/grind/ws2] vg5 --tool=massif --threshold=101 date
    ==31877== Massif, a heap profiler
    ==31877== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote
    ==31877== Using Valgrind-3.6.0.SVN and LibVEX; rerun with -h for copyright info
    ==31877== Command: date
    ==31877== 
    ==31877== --threshold must be between 0.0 and 100.0
    valgrind: Bad option '--threshold'; aborting.
    valgrind: Use --help for more information.

We now have nice output like this:

    [ocean:~/grind/ws2] vg2 --tool=massif --threshold=101 date
    valgrind: Bad option: --threshold=101
    valgrind: --threshold must be between 0.0 and 100.0
    valgrind: Use --help for more information or consult the user manual.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11209
2010-07-06 04:05:23 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Nicholas Nethercote
3dbf8e07a7 Added cg_diff.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11193
2010-06-30 05:23:34 +00:00
Nicholas Nethercote
cb2518d934 Fix bug in the previous commit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11185
2010-06-22 03:50:08 +00:00
Nicholas Nethercote
dab7abbbee Allow negative numbers in the cachegrind.out.* file. Also protect against
division-by-zero.  Both are required for cg_diff (not yet committed) to work
properly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11184
2010-06-22 03:40:04 +00:00
Nicholas Nethercote
d218ab755b Make better use of references, allowing data structure updates to be more
localised.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11183
2010-06-22 03:34:54 +00:00
Julian Seward
05124264b0 Remove link_tool_exe.c and replace it with perl scripts that do the
same thing.  A .c file doesn't work for cross compilation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11174
2010-06-13 22:13:58 +00:00
Julian Seward
c46347280b Add a new program (link_tool_exe.c) and use this to link the tool
executables.  Gets rid of the linker script kludgery and uniformly
uses -Ttext=0x38000000 (or whatever) on Linux, so as to accomodate
both traditional ld and gold.  Should fix #193413 although I have
been unable to test it.  Using a whole new program seems like
overkill, but this is infrastructure to support static linking of
the tool executables on MacOS too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11141
2010-06-02 00:31:34 +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
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
Julian Seward
be9f7279ce Track vex r1930 (Change the IR representation of load linked and store
conditional.)  Completes the fix of #215771.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10957
2009-11-26 17:20:21 +00:00
Tom Hughes
4c49d5080f Add support for some more Intel cache descriptors to stop Core i7 based
systems moaning.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10913
2009-10-28 09:21:53 +00:00
Julian Seward
68afc2a2a1 Fix another enum type error spotted by gcc-4.5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10880
2009-08-31 08:48:23 +00:00
Julian Seward
aa614775dd Add support for the L2 cache on Intel T4200.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10878
2009-08-28 22:34:09 +00:00
Julian Seward
ece823c75b Remove an empty <itemizedlist> which was causing the PDF doc build to fail.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10835
2009-08-17 11:27:45 +00:00
Nicholas Nethercote
86be4a7cf3 Update .exp files for r10783.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10784
2009-08-12 00:14:44 +00:00
Nicholas Nethercote
4e495edf4a Make "option" terminology consistent some more. Also tweaked the mempool
Memcheck section a little.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10759
2009-08-10 01:29:14 +00:00
Nicholas Nethercote
c149a17389 Make usage messages given by -h and man pages consistent for the scripts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10756
2009-08-09 23:27:00 +00:00
Julian Seward
8ffe2fdefa Tidy up of messaging:
* For all tools and the core, don't show statistics when -v is in
  effect.  Instead, try to restrict -v to mostly user-useful
  stuff.

* A new flag --stats=no|yes [no] produces statistics output instead.

* Fix longstanding problem in that Memcheck's leak checker ran after
  the core's error manager module shut down, thereby not showing use
  counts of leak suppressions.  This fixes #186790.

* As a consequence, the leak checker text output of Memcheck has
  changed a bit -- leak check is done before the final error
  summary is done (much more logical), and the output has been
  tidied up a bit.

* Helgrind, Drd and Ptrcheck now also print "For counts of
  detected and suppressed errors, rerun with: -v", which makes
  them consistent with Memcheck in this regard.  These are
  filtered out by the regtest filter scripts.

For all tools except Memcheck, the regtests are unchanged.  On
Memcheck regtests still fail due to rearrangements of the leak
checker output.  This will be fixed by a followup commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10746
2009-08-07 15:46:56 +00:00
Nicholas Nethercote
6fcbcab519 Add a manpage for cg_annotate. Now only valgrind-listener and cg_merge lack
a manpage, and they're so simple I can't be bothered doing ones for them
(they don't even have sections in the manual).

Also fixed a few minor things relating to manpages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10744
2009-08-07 07:56:20 +00:00
Nicholas Nethercote
41876dfd59 Went over the FAQ. Also tweaked vg-entities.xml a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10732
2009-08-07 02:58:11 +00:00
Nicholas Nethercote
88a2f8bed1 Thoroughly overhauled the Cachegrind manual chapter, mostly by putting
things in a more sensible order.  Also tweaked the Massif chapter a bit
more.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10730
2009-08-07 00:18:25 +00:00
Nicholas Nethercote
dbcea71779 More docs build tweaks:
- Actually remove the dead docs/images/massif*.png files (this was meant to
  happen in r10720).

- Inline $TOOL/docs/Makefile.am into $TOOL/Makefile.am for all 10 tools.  10
  fewer Makefile.am files FTW!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10721
2009-08-05 08:08:18 +00:00
Nicholas Nethercote
74c920d729 Overhaul Massif's manual, and a few minor related things.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10706
2009-08-04 05:59:46 +00:00
Nicholas Nethercote
d5b384f852 Various manual fix-ups:
- Use "heap blocks" rather than "malloc'd blocks" as heap blocks covers
  calloc, realloc, new, new[], memalign, etc.

- Used "GDB" and "GCC" throughout rather than "gcc" and "gdb".

- Made various tag uses more consistent.

- Greatly clarified the instructions on --xml=yes and its friends.

- Lots of other little improvements and fixes to out-of-date things and
  Linux-centric things, mostly in Section 2.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10701
2009-08-04 01:16:01 +00:00
Nicholas Nethercote
c6482fe114 Use <variablelist> for ms_print's and cg_annotate's options list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10665
2009-07-30 04:48:05 +00:00
Nicholas Nethercote
20e8e05b33 Improve the "acting on Cachegrind's info" section.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10660
2009-07-30 03:21:42 +00:00
Nicholas Nethercote
ac7761261a We currently use a mix of <option> and <computeroutput> tags for command
line options.  This commit changes them to all <option>.

Also make consistent how options with multiple names (eg. -h --help) are
shown.

Also, remove section describing --help and --version in Callgrind's chapter;
these aren't necessary and are presumably a hangover from when Callgrind was
a separate tool.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10659
2009-07-30 02:57:52 +00:00
Nicholas Nethercote
78b2e5c83e Started overhauling the documentation:
- There were detailed descriptions of all the tools in the Quick Start
  Guide, the Manual introduction, and the start of each tool chapter.  To
  avoid duplication/overlap, I removed these altogether from the Quick Start
  Guide, and shortened them in the intro.

- Improved the description of what errors Memcheck can find.

- Made all tool chapters start with "Overview" section, for consistency.

- Made the "run with --tool=XXX" bit consistent in each tool chapter.

- Made all tool chapter titles match the description given when running them.

- Added BBV to the User Manual intro.

- Generally clarified, updated, and future-proofed various bits of text in
  the Quick Start Guide and User Manual introduction. 

Also:
- Changed Nulgrind's start-up description to "the minimal Valgrind tool".

- Fixed some punctuation in the usage message.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10652
2009-07-29 02:36:21 +00:00
Julian Seward
48ade20d6d Merge cachegrind/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10472
2009-07-15 14:51:17 +00:00
Julian Seward
3109865279 Merge in branches/DCAS.
This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901.  They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392
2009-07-01 08:10:49 +00:00
Nicholas Nethercote
512909dd91 Fix 'make check' for automake-1.7. Fixes bugs 197898 and 197901.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10378
2009-06-25 23:46:23 +00:00