260 Commits

Author SHA1 Message Date
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
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
9165e36246 First round of Char/HChar fixups for massif
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13065
2012-10-20 19:57:16 +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
Philippe Waroquiers
ab2d33788e fix n-i-bz report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dark_footix@yahoo.fr)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13015
2012-09-24 21:50:16 +00:00
Petar Jovanovic
feeaf10d21 A new post.exp file that provides more details for overloaded-new test.
Valgrind for MIPS will give more details on the heap allocation functions
(operator new) than the existing post.exp presents.
This fixes massif/tests/overloaded-new for MIPS and likely other arch if they
provide the info.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13011
2012-09-21 22:44:45 +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
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
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
Philippe Waroquiers
c953f410c8 Fix 247386 make perf does not run all performance tests :
* move memcheck/perf/many-loss-records test to perf directory
       massif/perf/many-xpts test to perf directory
* modified many-loss-records.vgperf and many-xpts.vgperf,
  so as to have tool specific options prefixed with their tool
* remove directory memcheck/perf and massif/perf (containing no test anymore)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12315
2011-12-23 11:42:20 +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
Nicholas Nethercote
a71f5978fc Fix a Massif bug: when realloc'ing a block, any values in the part of the
block beyond the original request weren't copied.  They are now.  This is
important because a program could use malloc_usable_size to gain legitimate
access to those extra bytes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11956
2011-08-08 01:58:50 +00:00
Julian Seward
080c67f88d Avoid excessive fragmentation in m_mallocfree facility by munmapping
unused superblocks in some circumstances.  Bug 250101 (==269884,
==275852)
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11911
2011-07-24 17:39:10 +00:00
Julian Seward
97c113e7e0 valgrind and tool mon. cmds prefixes changes + doc fixes + new vgdb option
--cmd-time-out

* changed prefixes of Valgrind core monitor commands from vg. to v.
* removed prefixes of Tool monitor commands
* memcheck leak_check 'leakpossible' arg renamed to 'possibleleak'
* memcheck make_memory 'ifaddressabledefined' arg renamed to
'Definedifaddressable'
    (with uppercase D to avoid confusion with 'defined' arg).
* vgdb options
  - Some doc updates : more logical option order documentation,
       specify 'standalone' for options aimed at standalone usage.
  - added option --cmd-time-out for standalone vgdb
     (comment of Josef Weindendorfer, needed to interface with a callgrind GUI)
* updated tests according to the above.
* updated documentation according to the above.
* some additional minor doc fixes/clarifications

(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 111.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11844
2011-06-28 08:20:39 +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
Julian Seward
48d69a241a Move the GDBserver documentation from the "Valgrind core" chapter
to the "Valgrind core: advanced topics" chapter.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11821
2011-06-17 08:31:22 +00:00
Bart Van Assche
da5eddc400 Follow-up for r11770: added missing 'void' keyword.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11776
2011-05-18 16:04:46 +00:00
Julian Seward
739bc05601 gdbserver: misc fixes (#214909 c 77)
Fix some tests on ppc-debian6,s390x + handled Nick Nethercote, Josef
Weidendorfer comments

* improved testing & related doc
  - added option --vex-iropt-precise-memory-exns=yes to mcsig(no)pass.vgtest
    + updated manual-core.xml
  - cleanup some comments in *.vgtest 
  - modified filter_gdb and filter_memcheck_monitor to
    handle specific ppc/debian6.0 mcsig(no)pass output
    handle specific s390x 'missing debug info'
  - added more information in README_DEVELOPPERS on how to
    investigate failing gdbserver tests.

* handled Nick Nethercote comment:
  Replaced kludgy ms.snapshot detailed
              by  ms.detailed_snaphot
  Updated documentation and test.

* handled Josef Weindendorfer comments:
   - do not report an error if ptrace_scope file can't be read.
     Instead, a debug trace is done if -d (debug) option given
   - added an option -l to give the list of active Valgrind
     gdbserver. Useful a.o. to support callgrind_control.
     Updated documentation
   - added ref. to  vgdb help in the vgdb --help message

(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11770
2011-05-17 17:15:07 +00:00
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +00:00
Bart Van Assche
8a3e9fdd7c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11682 2011-04-03 17:42:19 +00:00
Bart Van Assche
9df672f236 Add VALGRIND_RESIZEINPLACE_BLOCK() and hence close #267819.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11666
2011-03-25 20:07:25 +00:00
Nicholas Nethercote
c3ae8f0ad3 If Massif's --threshold value was less than 1.0, in lines like this:
->00.00% (0B) in 11 places, all below massif's threshold (00.00%)

the threshold would always be incorrectly printed as 00.00%.  This was
because the percentage printing was broken for percentages less than 1.0.
This change fixes this problem, and modifies a test to check for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11511
2011-01-27 23:07:56 +00:00
Julian Seward
1852adcac0 Memcheck, None: update avg translation size to be more realistic.
Massif: specify avg translation size at all, so as to avoid excessive
retranslations caused by the fact that the default value is far below
reality for Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11494
2011-01-10 15:01:03 +00:00
Nicholas Nethercote
13e1635450 Raise Massif's maximum --detailed-freq value from 10,000 to 1,000,000.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11484
2010-12-08 02:42:38 +00:00
Julian Seward
b43eec1219 Documentation update for 3.6.0 (not including NEWS).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11440
2010-10-13 21:47:29 +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
ddc229eb09 Add --pages-as-heap option to Massif. Bug 203256.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11200
2010-07-01 02:35:03 +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
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
Nicholas Nethercote
7c60dc05e8 Document the default value of --stacks correctly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11081
2010-03-07 22:15:48 +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
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
aeae3a302c wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10760
2009-08-10 01:34:27 +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
e06f6f7164 Manpage improvements:
- Added a manpage for ms_print.

- Added docs/xml/manpages-index.xml, which is just used as a convenient
  single file to hang all the man pages off so they can be generated in a
  single command.

- Added facility whereby manpage generation will attempt to find the
  stylesheet in multiple places.  This means I don't have to constantly edit
  XSL_MAN_STYLE to build manpages on my machine.

- Changed vg-docs-path to start with $INSTALL instead of /usr/, because we
  can't assume that's the installation dir.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10740
2009-08-07 06:54:44 +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
d25bd715c1 More Massif manual tweaks.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10711
2009-08-05 04:04:53 +00:00
Nicholas Nethercote
e16d2be3f4 Comment and docs wibbles.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10710
2009-08-05 02:02:31 +00:00
Nicholas Nethercote
b6b2867271 Add a bit more to Massif's manual chapter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10708
2009-08-04 06:48:09 +00:00
Nicholas Nethercote
05820177ef A couple of minor Massif manual improvements.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10707
2009-08-04 06:10:30 +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
8026c4766f Various option-related tweaks:
- Match the ordering of the non-tool-specific options in the usage message
  with the order in the user manual.  As a result, we now always print
  --alignment and --trace-malloc in the core's usage messages, which saves
  malloc-replacing tools from doing it themselves (and brings it in line
  with options that only apply to error-collecting tools).

- Improved the presentation of the Vex options with --help-debug.

- Removed documentation of -d in the manual because it's a debugging-only flag.

- Documented --read-var-info in the manual.  This fixes bug 201169.

- Renamed --auto-run-dsymutil as --dsymutil and documented it in the usage
  message.

- Fixed an XML error in manual-core-adv.xml.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10703
2009-08-04 02:32:55 +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