Commit Graph

69 Commits

Author SHA1 Message Date
Ivo Raisr
683c52fb7e Fix expected output of massif/tests/mmapunmap on Solaris.
On Solaris and Linux, mmap() is an optimized function without
prologue and epilogue. However, Solaris libc does not currently
bear any DWARF CFI. Therefore stack chain unwinder grabs only
two entries: IP inside mmap() and return address from the previous
frame which points inside _start(), right after where main()  
is invoked. By introducing an intermediate function f(), main()
is now visible in the stack trace even on Solaris.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15749
2015-12-14 20:14:44 +00:00
Ivo Raisr
bcea2454f3 Remove a temporary file after massif/tests/mmapunmap test run.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15746
2015-12-12 19:58:40 +00:00
Philippe Waroquiers
58ba63b7df Fix massif --pages-as-heap=yes does not report peak caused by mmap+munmap
ms_unrecord_page_mem was wrongly taking the (possible) peak snapshot
when unrecording the last block.
But the peak snapshot will be detected when unrecording the first block
of an munmap, not when unrecording the last block.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15745
2015-12-10 22:37:59 +00:00
Florian Krohm
75381eec6e In filter_stderr_basic do not remove lines beginning with
--pid:
i.e. debug output. Asserts originating from the address space
manager look exactly like that and we do not want to filter those
out by default.
Remove some specialised filter scripts that are no longer needed
and update a few .vgtest files accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15519
2015-08-11 20:37:28 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Carl Love
c131e6071e Patch 2 in a revised series of cleanup patches from Will Schmidt
Add a deep-D test .exp values for ppc64.
Depending on the system and the systems endianness, there are variances
in the library reference, and to the specific line number in the library.
I was able to add and modify existing filters to cover most of the variations,
but did need to add a .exp to cover the additional call stack entry as seen
on power.
This change allows the ppc64 targets to pass the massif/deep-D test.

 
This patch fixes Vagrind bugzilla 347686


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15228
2015-05-13 21:46:47 +00:00
Carl Love
96c0e76ef4 Patch 1 in a revised series of cleanup patches from Will Schmidt
Update the massif/big-alloc test for ppc64*.
In comparison to the existing .exp files, the time,total,extra-heap
values generated on ppc64* vary from the other architectures.

This .exp allows the ppc64 targets to pass the test.

   
This patch fixes Vagrind bugzilla 347322.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15226
2015-05-13 21:10:12 +00:00
Julian Seward
082f9298a1 Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
2015-04-10 12:30:09 +00:00
Florian Krohm
f7c5c06c5d Add limited support for printing floating point numbers to
VG_(debugLog_vprintf). 
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
    specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
    integral part fits into an ULong.
This is good enough for our purposes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806
2014-12-12 19:32:10 +00:00
Florian Krohm
d2723ddc9b Merge r14308 from the BUF_REMOVAL branch to trunk
Changes VG_(describe_IP) to return the untruncated result in a statically
allocated local buffer. Fix call sites and update two .exp files who had
truncated names.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14685
2014-11-03 22:43:42 +00:00
Florian Krohm
5d5fefeb24 Fix exception specification for operator delete as spotted by clang 3.3
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13598
2013-10-01 22:18:14 +00:00
Bart Van Assche
8ad32c57d3 massif/tests/pages_as_heap.c: Fix a compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13318
2013-03-10 12:37:48 +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
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
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
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
Bart Van Assche
8a3e9fdd7c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11682 2011-04-03 17:42:19 +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
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
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
b22bb6d5b9 Add some more functions to the default --alloc-fns list. Had to tweak how
verbose output is printed so that the tests would be ok, now that different
platforms have different alloc-fns lists.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10389
2009-07-01 02:44:12 +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
790fbdfa1a DARWIN sync: make VG_MIN_MALLOC_SZB 16 bytes where appropriate. Add another
output for massif/tests/one to account for it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10066
2009-05-21 03:36:21 +00:00
Nicholas Nethercote
afe5e9b805 tweak test
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9954
2009-05-19 05:36:23 +00:00
Nicholas Nethercote
03cb74ca22 Make the graphs drawn by ms_print less confusing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9642
2009-04-27 01:27:58 +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
52cf1f5f05 Merge r9103 and r9105 (add --ignore-fn to Massif) from the Darwin branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9567
2009-04-17 04:26:41 +00:00
Nicholas Nethercote
f3f801ed48 Merge r9533..9536 (add tests/{asm.h,sys_mman.h,malloc.h} from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9537
2009-04-15 03:12:43 +00:00
Nicholas Nethercote
0f8ef63874 Remove an unused, empty .exp file that was somehow still hanging around.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9403
2009-03-13 20:08:03 +00:00
Bart Van Assche
f8080bd125 Un-break 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9360
2009-03-11 18:30:59 +00:00
Nicholas Nethercote
e67c3fc54e Remove toobig-allocs.c -- it was unreliable and didn't test any
functionality of note.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9261
2009-02-25 04:34:44 +00:00
Nicholas Nethercote
94ed569cdc Fix some more 'make check' warnings, ones that appear on non-Linux
platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9238
2009-02-23 07:17:08 +00:00
Nicholas Nethercote
a6448a3006 Test files were being passed multiple arch options (eg. "-m32 -m64") when
built.  This worked fine on the x86/Linux and AMD64/Linux but broke
ppc*/Linux.  This commit fixes the problem.  Thanks to Bart for spotting it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9222
2009-02-22 23:38:10 +00:00
Nicholas Nethercote
c8d150dbaa Various build system clean-ups and simplifications:
- Created Makefile.tool-tests.am, put standard AM_CFLAGS et al for tests in
  it.
- A number of tests are shared between Helgrind and DRD.  They used to be
  built in both directories.  Now they are only built in helgrind/tests/,
  and the DRD .vgtest files just point to the executable in helgrind/tests/.
  Most of these (about 30) had the source files in helgrind/tests/;  I moved
  the three that were in drd/tests/ into helgrind/tests/ for consistency.
- Fixed rwlock_test, which was failing to run due to a wrong name in the
  .vgtest file.
- Removed remnants of unused 'hello' test for Memcheck.
- Avoided redundant flag specification in various places, esp.
  memcheck/tests/Makefile.am.
- Removed unnecessary _AIX guards in some Linux-only tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9202
2009-02-19 09:52:05 +00:00
Nicholas Nethercote
4ddcff03b9 Merged r9101 (make Massif tests work if VG_MIN_MALLOC_SZB==16) from the
DARWIN branch, along with a few other minor things.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9197
2009-02-18 05:14:44 +00:00
Nicholas Nethercote
3ed4532cde In the core, include malloc_usable_size() as one of the functions that must
be replaced if malloc() et al are replaced by a tool.  This is because
different tools implement the function in different ways.

Add an appropriate malloc_usable_size() replacement to each of Memcheck,
Helgrind, DRD, Ptrcheck, Massif.

Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable.

Merged from the DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9193
2009-02-17 04:31:18 +00:00
Nicholas Nethercote
f3240d6950 Filter out everything after "(below main)" in a line. This will help with
Darwin, for which such entries can occur within the executable, rather than
within libc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9142
2009-02-12 00:51:50 +00:00
Julian Seward
48c4779e66 Mark allocation operators as no-inline so as to make the test more
repeatable across different gccs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8737
2008-11-08 15:01:22 +00:00
Nicholas Nethercote
754e7ca6ba Update for the new VG_(ssort) algorithm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7542
2008-03-03 02:13:16 +00:00
Nicholas Nethercote
601dd142a1 comment-only change
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7360
2008-01-29 04:12:48 +00:00
Nicholas Nethercote
5233a5de62 Add an alternative .post.exp output for Massif's long-names test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7359
2008-01-29 04:11:00 +00:00
Nicholas Nethercote
dc0ecff28e When truncating long lines in the output file, make sure they end with a
newline.  Fixes bug #155929.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7355
2008-01-20 22:30:52 +00:00
Nicholas Nethercote
8905fb6038 This should have gone in with r7233.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7234
2007-11-27 00:59:17 +00:00
Nicholas Nethercote
8d6ffee32a Minor tweak to x-axis positioning of bars.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7230
2007-11-26 22:17:19 +00:00
Nicholas Nethercote
01e4f950f2 - Rewrote documentation.
- Added a new time unit, instructions executed, and made it the default -- it's
  much more reproducible and consistent than milliseconds.  Requires IRSB
  instrumentation and so slows down some programs (malloc-light ones such as
  bzip2) by about 20%, others by less.
- ms_print now doesn't overwrite the x-axis in the graphs.
- Added a test for --detailed-freq and --max-snapshots


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7229
2007-11-26 21:59:04 +00:00
Nicholas Nethercote
40dce903a2 Do Massif output file name properly. Default is massif.out.%p, where %p
expands to the PID.  Updated the tests.  Still todo:  handle %q for
environment variables, and do the same for the core and
Cachegrind/Callgrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7190
2007-11-20 07:55:40 +00:00
Nicholas Nethercote
f57a498ccf Another attempt at fixing some Massif regtest failures.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7153
2007-11-12 07:05:07 +00:00
Nicholas Nethercote
982c23d403 Fix verbose output filtering for Massif.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7152
2007-11-12 01:16:24 +00:00