433 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
536e5133ef DARWIN sync: cachegrind filter change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9962
2009-05-19 06:00:04 +00:00
Nicholas Nethercote
131ab00744 Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch.  A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t.  Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876
2009-05-18 02:12:08 +00:00
Nicholas Nethercote
32bd1a00c2 Merge r9610 (AM_CCASFLAGS tweaks for test Makefiles) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9611
2009-04-24 20:17:07 +00:00
Nicholas Nethercote
3b383dab10 Merged r9602 and r9603 (make cpuid pass on Darwin, rename .s files to .S)
from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9604
2009-04-24 07:12:39 +00:00
Nicholas Nethercote
d834611463 Merge r9600 (separate VG_ and ML_ definitions for C and asm files) from the
DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9601
2009-04-24 04:57:07 +00:00
Nicholas Nethercote
b15e3d9a45 Fix all the non-VEX problems identified with the Clang Static Analyzer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416
2009-03-15 23:25:38 +00:00
Nicholas Nethercote
0e1eb4b6c9 A couple more VG_DMSG conversions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9368
2009-03-12 00:07:35 +00:00
Nicholas Nethercote
5b758688bd Added some shortcuts for VG_(message)(), and used them in a few places (but
certainly not all).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9367
2009-03-12 00:06:45 +00:00