You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(32) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
(8) |
2
(8) |
3
(15) |
4
(14) |
5
(12) |
6
(40) |
7
(9) |
|
8
(5) |
9
(12) |
10
(9) |
11
(13) |
12
(7) |
13
(7) |
14
(19) |
|
15
(18) |
16
(13) |
17
(16) |
18
(8) |
19
(16) |
20
(16) |
21
(12) |
|
22
(21) |
23
(39) |
24
(27) |
25
(33) |
26
(41) |
27
(17) |
28
(15) |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-04 22:54:04
|
On Thu, Feb 5, 2009 at 8:27 AM, Greg Parker <gp...@ap...> wrote: > On Feb 4, 2009, at 9:31 AM, Julian Seward wrote: >>> >>> I don't remember having any trouble with debug info back before I >>> turned dwarf on. But it's possible that the only info I saw came from >>> the ordinary symbols, not stabs. >> >> Indeedy. I would have thought that MachO (hence its reader) produced >> the symbol addresses, and Stabs produced info on line numbers >> (and types, etc). Same kind of work-split as with ELF+Stabs or >> ELF+Dwarf. > > I'm 99% sure that I was getting line numbers out of valgrind before dwarf, > though. (There was one bug where I had the line numbers but not the symbol > names, which looks awfully strange in a backtrace.) Perhaps the > valgrind-confusing stabs data ended up presenting good line numbers but > nothing else. Alternatively, it may have broken unnoticed at some later > point. I did get some correct line numbers out of it for at least one example. It was a total fluke, though, basically Valgrind was doing the wrong (for Darwin) calculations of addresses but it happened to work out to the right answer because the inputs were incorrect in just the right (wrong?) ways. The good news is that I've worked out how to run dsymutil for the regtests within the build system, and I'm close to a solution for vg_replace_malloc.c -- by avoiding building it as an archive. Nick |
|
From: Greg P. <gp...@ap...> - 2009-02-04 21:27:54
|
On Feb 4, 2009, at 9:31 AM, Julian Seward wrote: >> I don't remember having any trouble with debug info back before I >> turned dwarf on. But it's possible that the only info I saw came from >> the ordinary symbols, not stabs. > > Indeedy. I would have thought that MachO (hence its reader) produced > the symbol addresses, and Stabs produced info on line numbers > (and types, etc). Same kind of work-split as with ELF+Stabs or > ELF+Dwarf. I'm 99% sure that I was getting line numbers out of valgrind before dwarf, though. (There was one bug where I had the line numbers but not the symbol names, which looks awfully strange in a backtrace.) Perhaps the valgrind-confusing stabs data ended up presenting good line numbers but nothing else. Alternatively, it may have broken unnoticed at some later point. -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Greg P. <gp...@ap...> - 2009-02-04 21:23:57
|
On Feb 3, 2009, at 6:25 PM, Nicholas Nethercote wrote: > On Wed, Feb 4, 2009 at 12:56 PM, Greg Parker <gp...@ap...> > wrote: >> >> You're right. Looks like -gstabs doesn't work, but -gstabs+ does. >> How does >> Valgrind fare with -gstabs+ ? > > It doesn't work. -gstabs+ seems to be the same as -gstabs -gfull, > which I tried previously. > The differences with linux are: > - N_FUN symbols are at the end of functions, not the start > - N_SLINE addresses are relative to the start address of the > enclosing function > > So the stabs reader would have to be partly split in two. > > But stabs is old and people don't use it much any more. And Apple > doesn't seem to have qualms about dropping support for old features. > So I'm a bit reluctant to bet the farm on stabs, even though (if the > reader was modified) it is more convenient than .dSYM Dwarf. If you only get to use one, use dwarf. I wouldn't be surprised if stabs were eventually dropped from the rest of Apple's toolchain. (For example, I don't know if LLVM-based compilers can or ever will produce stabs.) -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Greg P. <gp...@ap...> - 2009-02-04 21:20:32
|
On Feb 4, 2009, at 9:31 AM, Julian Seward wrote: >> I don't remember having any trouble with debug info back before I >> turned dwarf on. But it's possible that the only info I saw came from >> the ordinary symbols, not stabs. > > Indeedy. I would have thought that MachO (hence its reader) produced > the symbol addresses, and Stabs produced info on line numbers > (and types, etc). Same kind of work-split as with ELF+Stabs or > ELF+Dwarf. > > Speaking of which, how does stack unwinding on 64-bit Darwin work? > Is it the same as for 32-bit -- that is, just follow the chain of > blocks %rbp, *%rbp, **%rbp, etc? Or does it use the same complicated, > ugly and fragile Dwarf-based scheme as on Linux? %rbp-based unwinding works most of the time; currently we have little code that uses -fomit-frame-pointer. DWARF-based eh_frame unwind info is present almost everywhere, but that info isn't correct at every instruction, so valgrind can't depend on it. DWARF dSYMs (when present) might provide more precise unwind info than eh_frame, and handle -fomit-frame-pointer correctly. (I'd expect Darwin's x86_64 ABI to be almost exactly the same as Linux; it's the SysV spec with a handful of small differences.) -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Julian S. <js...@ac...> - 2009-02-04 17:30:56
|
> I don't remember having any trouble with debug info back before I > turned dwarf on. But it's possible that the only info I saw came from > the ordinary symbols, not stabs. Indeedy. I would have thought that MachO (hence its reader) produced the symbol addresses, and Stabs produced info on line numbers (and types, etc). Same kind of work-split as with ELF+Stabs or ELF+Dwarf. Speaking of which, how does stack unwinding on 64-bit Darwin work? Is it the same as for 32-bit -- that is, just follow the chain of blocks %rbp, *%rbp, **%rbp, etc? Or does it use the same complicated, ugly and fragile Dwarf-based scheme as on Linux? J |
|
From: <sv...@va...> - 2009-02-04 06:50:31
|
Author: njn
Date: 2009-02-04 06:50:26 +0000 (Wed, 04 Feb 2009)
New Revision: 9106
Log:
Fix a minor bug, whereby a stack entry of zero would cause a "(heap
allocation functions)" line to be written.
Also invert some comparisons so the constant is first, to minimise the
chance of assignments in conditions.
Modified:
branches/DARWIN/massif/ms_main.c
Modified: branches/DARWIN/massif/ms_main.c
===================================================================
--- branches/DARWIN/massif/ms_main.c 2009-02-04 05:14:30 UTC (rev 9105)
+++ branches/DARWIN/massif/ms_main.c 2009-02-04 06:50:26 UTC (rev 9106)
@@ -561,7 +561,7 @@
if (hp + n_bytes > hp_lim) {
hp = (Addr)VG_(am_shadow_alloc)(SUPERBLOCK_SIZE);
- if (hp == 0)
+ if (0 == hp)
VG_(out_of_memory_NORETURN)( "massif:perm_malloc",
SUPERBLOCK_SIZE);
hp_lim = hp + SUPERBLOCK_SIZE - 1;
@@ -600,7 +600,7 @@
// Expand 'children' if necessary.
tl_assert(parent->n_children <= parent->max_children);
if (parent->n_children == parent->max_children) {
- if (parent->max_children == 0) {
+ if (0 == parent->max_children) {
parent->max_children = 4;
parent->children = VG_(malloc)( "ms.main.acx.1",
parent->max_children * sizeof(XPt*) );
@@ -654,7 +654,7 @@
//
// Nb: We do this once now, rather than once per child, because if we do
// that the cost of all the divisions adds up to something significant.
- if (total_szB == 0 && clo_threshold != 0) {
+ if (0 == total_szB && 0 != clo_threshold) {
sig_child_threshold_szB = 1;
} else {
sig_child_threshold_szB = (SizeT)((total_szB * clo_threshold) / 100);
@@ -1420,7 +1420,7 @@
if (n_skipped_snapshots_since_last_snapshot > 0) {
VERB(2, " (skipped %d snapshot%s)",
n_skipped_snapshots_since_last_snapshot,
- ( n_skipped_snapshots_since_last_snapshot == 1 ? "" : "s") );
+ ( 1 == n_skipped_snapshots_since_last_snapshot ? "" : "s") );
}
VERB_snapshot(2, what, next_snapshot_i);
n_skipped_snapshots_since_last_snapshot = 0;
@@ -1994,7 +1994,7 @@
switch (sxpt->tag) {
case SigSXPt:
// Print the SXPt itself.
- if (sxpt->Sig.ip == 0) {
+ if (0 == depth) {
ip_desc =
"(heap allocation functions) malloc/new/new[], --alloc-fns, etc.";
} else {
@@ -2094,7 +2094,7 @@
break;
case InsigSXPt: {
- Char* s = ( sxpt->Insig.n_xpts == 1 ? "," : "s, all" );
+ Char* s = ( 1 == sxpt->Insig.n_xpts ? "," : "s, all" );
perc = make_perc(sxpt->szB, snapshot_total_szB);
FP("%sn0: %lu in %d place%s below massif's threshold (%s)\n",
depth_str, sxpt->szB, sxpt->Insig.n_xpts, s,
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-04 06:46:53
|
Hi,
The main bit of x86 stack-unwinding code is as follows:
/* On x86, first try the old-fashioned method of following the
%ebp-chain. Code which doesn't use this (that is, compiled
with -fomit-frame-pointer) is not ABI compliant and so
relatively rare. Besides, trying the CFI first almost always
fails, and is expensive. */
/* Deal with frames resulting from functions which begin "pushl%
ebp ; movl %esp, %ebp" which is the ABI-mandated preamble. */
if (fp_min <= fp && fp <= fp_max
- 1 * sizeof(UWord)/*see comment below*/) {
/* fp looks sane, so use it. */
ip = (((UWord*)fp)[1]);
sp = fp + sizeof(Addr) /*saved %ebp*/
+ sizeof(Addr) /*ra*/;
fp = (((UWord*)fp)[0]);
if (sps) sps[i] = sp;
if (fps) fps[i] = fp;
ips[i++] = ip - 1; /* -1: refer to calling insn, not the RA */
VG_(printf)(" %#lx\n", ip);
if (debug)
VG_(printf)(" ipsF[%d]=0x%08lx\n", i-1, ips[i-1]);
ip = ip - 1; /* as per comment at the head of this loop */
continue;
}
I just hit an interesting case on Darwin where the last ips[] entry
written is 0. I.e. when assigned, ip-1 was 0, ie. ip was 1.
This led me to some confusion because VG_(apply_StackTrace), which is
used by VG_(pp_StackTrace), stops if it hits an ip of zero, even if
its before n_ips has been reached. So when I was printing such a
stack the last entry was not shown.
So it seems we're currently using two distinct methods for indicating
the end of a stack trace. First, there's n_ips, and second, there's
zero entries. I think we should probably not treat zero entries
specially, and just rely on n_ips. If we do want to try to filter
out zero addresses, I think it should be done in
VG_(get_StackTrace_wrk) and then n_ips adjusted accordingly, rather
than doing such filtering subsequently.
Thoughts?
N
|
|
From: <sv...@va...> - 2009-02-04 05:14:36
|
Author: njn Date: 2009-02-04 05:14:30 +0000 (Wed, 04 Feb 2009) New Revision: 9105 Log: Three minor corrections to .exp files for Massif. Modified: branches/DARWIN/massif/tests/alloc-fns-B.post.exp branches/DARWIN/massif/tests/big-alloc.post.exp branches/DARWIN/massif/tests/ignored.post.exp Modified: branches/DARWIN/massif/tests/alloc-fns-B.post.exp =================================================================== --- branches/DARWIN/massif/tests/alloc-fns-B.post.exp 2009-02-04 04:55:46 UTC (rev 9104) +++ branches/DARWIN/massif/tests/alloc-fns-B.post.exp 2009-02-04 05:14:30 UTC (rev 9105) @@ -1,7 +1,6 @@ -------------------------------------------------------------------------------- Command: ./alloc-fns Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element - ms_print arguments: massif.out -------------------------------------------------------------------------------- Modified: branches/DARWIN/massif/tests/big-alloc.post.exp =================================================================== --- branches/DARWIN/massif/tests/big-alloc.post.exp 2009-02-04 04:55:46 UTC (rev 9104) +++ branches/DARWIN/massif/tests/big-alloc.post.exp 2009-02-04 05:14:30 UTC (rev 9105) @@ -46,7 +46,7 @@ 8 83,886,144 83,886,144 83,886,080 64 0 9 94,371,912 94,371,912 94,371,840 72 0 100.00% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->100.00% (94,371,840B) 0x........: main (big-alloc.c:13) +->100.00% (94,371,840B) 0x........: main (big-alloc.c:12) -------------------------------------------------------------------------------- n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B) Modified: branches/DARWIN/massif/tests/ignored.post.exp =================================================================== --- branches/DARWIN/massif/tests/ignored.post.exp 2009-02-04 04:55:46 UTC (rev 9104) +++ branches/DARWIN/massif/tests/ignored.post.exp 2009-02-04 05:14:30 UTC (rev 9105) @@ -40,7 +40,7 @@ 2 800 800 800 0 0 3 800 800 800 0 0 100.00% (800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc. -->100.00% (800B) 0x........: main (ignored.c:31) +->100.00% (800B) 0x........: main (ignored.c:38) | ->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%) |
Author: njn
Date: 2009-02-04 04:55:46 +0000 (Wed, 04 Feb 2009)
New Revision: 9104
Log:
Now using a 'check-local' hook to run (on Darwin only) 'dsymutil' on all
regtest files "make check". This hook is defined in Makefile.tool-tests.am,
which all test Makefile.am files must now include.
This means that debug info for regtest executables can be found on Darwin.
31 fewer test failures occur as a result.
Also made a minor fix to Darwin DWARF reading.
Added:
branches/DARWIN/Makefile.tool-tests.am
Modified:
branches/DARWIN/cachegrind/tests/Makefile.am
branches/DARWIN/cachegrind/tests/x86/Makefile.am
branches/DARWIN/callgrind/tests/Makefile.am
branches/DARWIN/coregrind/m_debuginfo/d3basics.c
branches/DARWIN/drd/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/Makefile.am
branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
branches/DARWIN/helgrind/tests/Makefile.am
branches/DARWIN/massif/tests/Makefile.am
branches/DARWIN/memcheck/tests/Makefile.am
branches/DARWIN/memcheck/tests/amd64/Makefile.am
branches/DARWIN/memcheck/tests/linux/Makefile.am
branches/DARWIN/memcheck/tests/x86-linux/Makefile.am
branches/DARWIN/memcheck/tests/x86/Makefile.am
branches/DARWIN/none/tests/Makefile.am
branches/DARWIN/none/tests/amd64/Makefile.am
branches/DARWIN/none/tests/ppc32/Makefile.am
branches/DARWIN/none/tests/ppc64/Makefile.am
branches/DARWIN/none/tests/x86/Makefile.am
Added: branches/DARWIN/Makefile.tool-tests.am
===================================================================
--- branches/DARWIN/Makefile.tool-tests.am (rev 0)
+++ branches/DARWIN/Makefile.tool-tests.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -0,0 +1,21 @@
+# On Darwin, for a program 'p', the DWARF debug info is stored in the
+# directory 'p.dSYM'. This must be generated after the executable is
+# created, with 'dsymutil p'. We could redefine LINK with a script that
+# executes 'dsymutil' after linking, but that's a pain. Instead we use this
+# hook so that every time "make check" is run, we subsequently invoke
+# 'dsymutil' on all the executables that lack a .dSYM directory, or that are
+# newer than their corresponding .dSYM directory.
+if VGCONF_OS_IS_DARWIN
+check-local:
+ for i in $(check_PROGRAMS) ; do \
+ if [ ! -e $$i.dSYM -o $$i -nt $$i.dSYM ] ; then \
+ echo "dsymutil $$i"; \
+ dsymutil $$i; \
+ fi \
+ done
+
+clean-local:
+ for i in $(check_PROGRAMS) ; do \
+ rm -rf $$i.dSYM; \
+ done
+endif
Modified: branches/DARWIN/cachegrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/cachegrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
Modified: branches/DARWIN/cachegrind/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/cachegrind/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/callgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/callgrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/callgrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,6 +1,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
DIST_SUBDIRS = .
Modified: branches/DARWIN/coregrind/m_debuginfo/d3basics.c
===================================================================
--- branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/coregrind/m_debuginfo/d3basics.c 2009-02-04 04:55:46 UTC (rev 9104)
@@ -379,12 +379,12 @@
static Bool get_Dwarf_Reg( /*OUT*/Addr* a, Word regno, RegSummary* regs )
{
vg_assert(regs);
-# if defined(VGP_amd64_linux)
- if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
- if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
-# elif defined(VGP_x86_linux)
+# if defined(VGP_x86_linux) || defined(VGP_x86_darwin)
if (regno == 5/*EBP*/) { *a = regs->fp; return True; }
if (regno == 4/*ESP*/) { *a = regs->sp; return True; }
+# elif defined(VGP_amd64_linux) || defined(VGP_amd64_darwin)
+ if (regno == 6/*RBP*/) { *a = regs->fp; return True; }
+ if (regno == 7/*RSP*/) { *a = regs->sp; return True; }
# elif defined(VGP_ppc32_linux)
if (regno == 1/*SP*/) { *a = regs->sp; return True; }
if (regno == 31) return False;
@@ -395,8 +395,6 @@
vg_assert(0);
# elif defined(VGP_ppc32_aix5) || defined(VGP_ppc64_aix5)
vg_assert(0); /* this function should never be called */
-# elif defined(VGP_x86_darwin) || defined(VGP_amd64_darwin)
- vg_assert(0); /* this function should never be called */
# else
# error "Unknown platform"
# endif
Modified: branches/DARWIN/drd/tests/Makefile.am
===================================================================
--- branches/DARWIN/drd/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/drd/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,6 +1,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
DIST_SUBDIRS = .
Modified: branches/DARWIN/exp-ptrcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/exp-ptrcheck/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
#SUBDIRS = .
#if VGCONF_ARCHS_INCLUDE_X86
#SUBDIRS += x86
Modified: branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/exp-ptrcheck/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/helgrind/tests/Makefile.am
===================================================================
--- branches/DARWIN/helgrind/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/helgrind/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/massif/tests/Makefile.am
===================================================================
--- branches/DARWIN/massif/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/massif/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr filter_verbose
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/memcheck/tests/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
# Arch-specific tests.
Modified: branches/DARWIN/memcheck/tests/amd64/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/amd64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/amd64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
noinst_HEADERS =
Modified: branches/DARWIN/memcheck/tests/linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/linux/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
EXTRA_DIST = $(noinst_SCRIPTS) \
Modified: branches/DARWIN/memcheck/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr filter_pushfpopf filter_tronical
INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
Modified: branches/DARWIN/memcheck/tests/x86-linux/Makefile.am
===================================================================
--- branches/DARWIN/memcheck/tests/x86-linux/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/memcheck/tests/x86-linux/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_stderr
noinst_HEADERS = scalar.h
Modified: branches/DARWIN/none/tests/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -2,6 +2,9 @@
# For AM_FLAG_M3264_PRI
include $(top_srcdir)/Makefile.flags.am
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
SUBDIRS = .
if VGCONF_ARCHS_INCLUDE_X86
SUBDIRS += x86
Modified: branches/DARWIN/none/tests/amd64/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/amd64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/amd64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_cpuid filter_stderr filter_int gen_insn_test.pl
Modified: branches/DARWIN/none/tests/ppc32/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/ppc32/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/ppc32/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/none/tests/ppc64/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/ppc64/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/ppc64/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,5 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
noinst_SCRIPTS = filter_stderr
Modified: branches/DARWIN/none/tests/x86/Makefile.am
===================================================================
--- branches/DARWIN/none/tests/x86/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
+++ branches/DARWIN/none/tests/x86/Makefile.am 2009-02-04 04:55:46 UTC (rev 9104)
@@ -1,3 +1,6 @@
+# For check-local and clean-local
+include $(top_srcdir)/Makefile.tool-tests.am
+
noinst_SCRIPTS = filter_cpuid filter_stderr gen_insn_test.pl
CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
|
|
From: Tom H. <th...@cy...> - 2009-02-04 03:50:28
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-02-04 03:20:10 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 486 tests, 1 stderr failure, 0 stdout failures, 0 post failures == memcheck/tests/x86-linux/scalar (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 486 tests, 1 stderr failure, 1 stdout failure, 0 post failures == drd/tests/pth_detached2 (stdout) memcheck/tests/x86-linux/scalar (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Wed Feb 4 03:35:57 2009 --- new.short Wed Feb 4 03:50:22 2009 *************** *** 8,11 **** ! == 486 tests, 1 stderr failure, 1 stdout failure, 0 post failures == ! drd/tests/pth_detached2 (stdout) memcheck/tests/x86-linux/scalar (stderr) --- 8,10 ---- ! == 486 tests, 1 stderr failure, 0 stdout failures, 0 post failures == memcheck/tests/x86-linux/scalar (stderr) |
|
From: Tom H. <th...@cy...> - 2009-02-04 03:43:46
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-02-04 03:05:08 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 477 tests, 6 stderr failures, 0 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) helgrind/tests/tc20_verifywrap (stderr) memcheck/tests/x86-linux/scalar (stderr) |
|
From: Tom H. <th...@cy...> - 2009-02-04 03:31:52
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-02-04 03:10:06 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 483 tests, 5 stderr failures, 2 stdout failures, 0 post failures == exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/x86-linux/scalar (stderr) none/tests/mremap2 (stdout) |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-04 02:25:52
|
On Wed, Feb 4, 2009 at 12:56 PM, Greg Parker <gp...@ap...> wrote: > > You're right. Looks like -gstabs doesn't work, but -gstabs+ does. How does > Valgrind fare with -gstabs+ ? It doesn't work. -gstabs+ seems to be the same as -gstabs -gfull, which I tried previously. The differences with linux are: - N_FUN symbols are at the end of functions, not the start - N_SLINE addresses are relative to the start address of the enclosing function So the stabs reader would have to be partly split in two. But stabs is old and people don't use it much any more. And Apple doesn't seem to have qualms about dropping support for old features. So I'm a bit reluctant to bet the farm on stabs, even though (if the reader was modified) it is more convenient than .dSYM Dwarf. Nick |
|
From: Greg P. <gp...@ap...> - 2009-02-04 01:56:44
|
On Feb 3, 2009, at 3:59 PM, Nicholas Nethercote wrote: > On Wed, Feb 4, 2009 at 10:04 AM, Greg Parker <gp...@ap...> > wrote: >> On Feb 3, 2009, at 2:46 PM, Nicholas Nethercote wrote: >>> >>> I think the conclusion is that stabs is broken on Darwin and I will >>> give up trying to use it. >> >> stabs ought to work fine. It was until recently the only available >> debugging >> format, and is still supported. Can you package your "can't step in >> gdb" >> into a self-contained example? > > Compile the attached file: > > gcc -gstabs a.c > > Run gdb like I did in my previous email -- just try to single step > through, it works in 'main' but not in 'f'. You're right. Looks like -gstabs doesn't work, but -gstabs+ does. How does Valgrind fare with -gstabs+ ? > And the 'nm -a' output from the previous email shows the screwy > addresses. > > Also, reading "Mac OS X Internals" it appears that putting the the > N_FUN stabs entry at the end of a function (along with N_LSYM and > N_PSYM entries) is expected on Darwin. This is unfortunately > different to Linux where it's put at the start of a function. Maybe > Valgrind's stabs reader could be taught this, but the address problems > would have to be resolved first. I don't remember having any trouble with debug info back before I turned dwarf on. But it's possible that the only info I saw came from the ordinary symbols, not stabs. -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-03 23:59:35
|
On Wed, Feb 4, 2009 at 10:04 AM, Greg Parker <gp...@ap...> wrote: > On Feb 3, 2009, at 2:46 PM, Nicholas Nethercote wrote: >> >> I think the conclusion is that stabs is broken on Darwin and I will >> give up trying to use it. > > stabs ought to work fine. It was until recently the only available debugging > format, and is still supported. Can you package your "can't step in gdb" > into a self-contained example? Compile the attached file: gcc -gstabs a.c Run gdb like I did in my previous email -- just try to single step through, it works in 'main' but not in 'f'. And the 'nm -a' output from the previous email shows the screwy addresses. Also, reading "Mac OS X Internals" it appears that putting the the N_FUN stabs entry at the end of a function (along with N_LSYM and N_PSYM entries) is expected on Darwin. This is unfortunately different to Linux where it's put at the start of a function. Maybe Valgrind's stabs reader could be taught this, but the address problems would have to be resolved first. N |
|
From: Greg P. <gp...@ap...> - 2009-02-03 23:04:54
|
On Feb 3, 2009, at 2:46 PM, Nicholas Nethercote wrote: > I think the conclusion is that stabs is broken on Darwin and I will > give up trying to use it. stabs ought to work fine. It was until recently the only available debugging format, and is still supported. Can you package your "can't step in gdb" into a self-contained example? -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Nicholas N. <n.n...@gm...> - 2009-02-03 22:46:44
|
On Tue, Feb 3, 2009 at 7:53 PM, Julian Seward <js...@ac...> wrote:
>
> When you say "relative vs absolute" do you mean "svma vs avma", a la
> comment at top of debuginfo.c ?
Not quite. By "relative" I mean "offset from the start address of the
function". By "absolute"... well the given address matches where it
is loaded. And Darwin seems to reserve the first page so nothing can
go below 0x1000. So it seems to really be "absolute", ie. the stated
address matches where it is loaded.
> That's strange. So the difference between 0x0 (lowest svma for f) and
> 0x1f6e (lowest svma for main) is not reflected in the output of
> nm or objdump (or equivalent) on Darwin? What does the "nm" output
> for the executable look like?
The relevant part:
00000000 - 00 0000 OSO
00000000 - 00 0000 EINCL
00000000 - 00 0000 EINCL
00000000 - 00 0000 EINCL
00001fda - 01 0000 SO
00001fd4 - 01 001c SLINE
00001fcf - 01 001b SLINE
00001fc1 - 01 001a SLINE
00001fb3 - 01 0019 SLINE
00001fa5 - 01 0018 SLINE
00001f97 - 01 0017 SLINE
00001f89 - 01 0016 SLINE
00001f7b - 01 0015 SLINE
00001f6e - 01 0014 SLINE
00001f6e - 01 0000 RBRAC
00001ede - 01 0000 LBRAC
0000008a - 01 0011 SLINE
00000085 - 01 0010 SLINE
00000077 - 01 000f SLINE
00000067 - 01 000d SLINE
00000061 - 01 000c SLINE
00000053 - 01 000b SLINE
00000045 - 01 000a SLINE
00000037 - 01 0009 SLINE
00000029 - 01 0008 SLINE
0000001b - 01 0007 SLINE
0000000d - 01 0006 SLINE
00000000 - 01 0004 SLINE
Much the same info as Valgrind's debugging output showed.
> I'm sure the above q is poorly phrased. What I mean is, you are
> implying that different bias values need to be added to the svmas
> of f and main in order to get the correct avmas. Which is something
> I don't think I've ever seen for functions that come from the same
> source file.
Something like that. I think it's so broken and inconsistent that
there's not much point trying to accurately describe what it does.
> Is the native Darwin GDB or whatever, able to navigate correctly around
> this file, at the source line level, based on only the stabs info?
Actually, no! Here's a GDB session. Basically, I tried to single
step through the whole thing. I could do so in main(), but GDB
executed all of f() in a single step:
(gdb) break main
Breakpoint 1 at 0x1f7b: file a.c, line 21.
(gdb) run
Starting program: /Users/njn/grind/ws5/a.out
Reading symbols for shared libraries ++. done
Breakpoint 1, main () at a.c:21
21 printf("1\n");
(gdb) n
1
22 printf("2\n");
(gdb) n
2
23 printf("3\n");
(gdb) n
3
24 printf("4\n");
(gdb) n
4
25 printf("5\n");
(gdb) n
5
26 printf("6\n");
(gdb) n
6
27 return f();
(gdb) s
0x00001ee2 in f () at a.c:17
17 }
(gdb) n [I subsequently tried 's' here, got the same result]
f1
f2
f3
f4
f5
f6
f7a
main () at a.c:28
28 }
(gdb) n
0x00001eb2 in start ()
(gdb) n
Single stepping until exit from function start,
which has no line number information.
0x00003000 in dyld_stub_exit ()
I think the conclusion is that stabs is broken on Darwin and I will
give up trying to use it.
So I'm back to trying to work out how to get Dwarf info into a .a
file. Or, how to build libreplacemalloc_toolpreload_* as something
other than a .a file.
Nick
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-03 11:20:18
|
[sending again... the first attempt didn't seem to get through] ---------- Forwarded message ---------- From: Nicholas Nethercote <n.n...@gm...> Date: Tue, Feb 3, 2009 at 11:06 AM Subject: malloc alignment To: Valgrind Developers <val...@li...> Hi, The VG_MIN_MALLOC_SZB constant defines the minimum size of a malloc'd block, and also its minimum alignment. Currently its value is 8. However, glibc uses the following minimum sizes/alignments: - 32-bit machines: 8 - 64-bit machines: 16 And Darwin always uses 16. Should we make this #define platform-specific? Nick |
|
From: Julian S. <js...@ac...> - 2009-02-03 08:52:50
|
> Here's the x86-darwin stabs. Note that (a) the N_FUN comes at the *end* of > the function, not the start, and (b) some of the N_SLINE addresses are > relative, but some are absolute (furthermore, in bigger examples I can't > see any consistent > logic underlying the choice of relative vs. absolute): When you say "relative vs absolute" do you mean "svma vs avma", a la comment at top of debuginfo.c ? That's strange. So the difference between 0x0 (lowest svma for f) and 0x1f6e (lowest svma for main) is not reflected in the output of nm or objdump (or equivalent) on Darwin? What does the "nm" output for the executable look like? I'm sure the above q is poorly phrased. What I mean is, you are implying that different bias values need to be added to the svmas of f and main in order to get the correct avmas. Which is something I don't think I've ever seen for functions that come from the same source file. > Looks like I won't have a fix to check in after all, because it's not > the stabs reader that is > broken. Is the native Darwin GDB or whatever, able to navigate correctly around this file, at the source line level, based on only the stabs info? J |
|
From: <sv...@va...> - 2009-02-03 06:56:56
|
Author: njn
Date: 2009-02-03 06:56:50 +0000 (Tue, 03 Feb 2009)
New Revision: 9103
Log:
This commit avoids several Massif test failures on Darwin, and almost all
the others will pass once I get debug info created for the test executables.
massif/ms_main.c
massif/docs/ms-manual.xml
Add a --ignore-fn option to Massif. Heap allocation occurring in functions
specified with it are ignored. This is necessary for testing on Darwin,
because libc (well, libSystem.B.dylib) allocates some memory in a couple of
places which buggers up our results if we include them.
massif/tests/*.vgtest
Add appropriate --ignore-fn arguments to all tests.
massif/tests/*.post.exp*
Update these to account for the extra arguments passed in.
massif/tests/*.stderr.exp*
Update these for tests that use -v -v to account for minor changes to
verbose output relating to the addition of --ignore-fn.
massif/tests/ignored.*
Add a test for --ignore-fn.
tests/vg_regtest.in
In vg_regtest, allow multiple "vgopts:" lines. They are concatenated.
Added:
branches/DARWIN/massif/tests/ignored.c
branches/DARWIN/massif/tests/ignored.post.exp
branches/DARWIN/massif/tests/ignored.stderr.exp
branches/DARWIN/massif/tests/ignored.vgtest
Modified:
branches/DARWIN/massif/docs/ms-manual.xml
branches/DARWIN/massif/ms_main.c
branches/DARWIN/massif/tests/Makefile.am
branches/DARWIN/massif/tests/alloc-fns-A.post.exp
branches/DARWIN/massif/tests/alloc-fns-A.vgtest
branches/DARWIN/massif/tests/alloc-fns-B.post.exp
branches/DARWIN/massif/tests/alloc-fns-B.vgtest
branches/DARWIN/massif/tests/basic.post.exp
branches/DARWIN/massif/tests/basic.vgtest
branches/DARWIN/massif/tests/basic2.post.exp
branches/DARWIN/massif/tests/basic2.vgtest
branches/DARWIN/massif/tests/big-alloc.c
branches/DARWIN/massif/tests/big-alloc.post.exp
branches/DARWIN/massif/tests/big-alloc.vgtest
branches/DARWIN/massif/tests/culling1.stderr.exp
branches/DARWIN/massif/tests/culling1.vgtest
branches/DARWIN/massif/tests/culling2.stderr.exp
branches/DARWIN/massif/tests/culling2.vgtest
branches/DARWIN/massif/tests/custom_alloc.post.exp
branches/DARWIN/massif/tests/custom_alloc.vgtest
branches/DARWIN/massif/tests/deep-A.post.exp
branches/DARWIN/massif/tests/deep-A.vgtest
branches/DARWIN/massif/tests/deep-B.post.exp
branches/DARWIN/massif/tests/deep-B.stderr.exp
branches/DARWIN/massif/tests/deep-B.vgtest
branches/DARWIN/massif/tests/deep-C.post.exp
branches/DARWIN/massif/tests/deep-C.stderr.exp
branches/DARWIN/massif/tests/deep-C.vgtest
branches/DARWIN/massif/tests/deep-D.post.exp
branches/DARWIN/massif/tests/deep-D.vgtest
branches/DARWIN/massif/tests/filter_verbose
branches/DARWIN/massif/tests/ignoring.post.exp
branches/DARWIN/massif/tests/ignoring.vgtest
branches/DARWIN/massif/tests/insig.post.exp
branches/DARWIN/massif/tests/insig.vgtest
branches/DARWIN/massif/tests/long-names.post.exp
branches/DARWIN/massif/tests/long-names.vgtest
branches/DARWIN/massif/tests/long-time.post.exp
branches/DARWIN/massif/tests/long-time.vgtest
branches/DARWIN/massif/tests/new-cpp.post.exp
branches/DARWIN/massif/tests/new-cpp.vgtest
branches/DARWIN/massif/tests/no-stack-no-heap.post.exp
branches/DARWIN/massif/tests/no-stack-no-heap.vgtest
branches/DARWIN/massif/tests/null.post.exp
branches/DARWIN/massif/tests/null.vgtest
branches/DARWIN/massif/tests/one.post.exp
branches/DARWIN/massif/tests/one.post.exp2
branches/DARWIN/massif/tests/one.vgtest
branches/DARWIN/massif/tests/overloaded-new.post.exp
branches/DARWIN/massif/tests/overloaded-new.vgtest
branches/DARWIN/massif/tests/peak.post.exp
branches/DARWIN/massif/tests/peak.vgtest
branches/DARWIN/massif/tests/peak2.post.exp
branches/DARWIN/massif/tests/peak2.stderr.exp
branches/DARWIN/massif/tests/peak2.vgtest
branches/DARWIN/massif/tests/realloc.post.exp
branches/DARWIN/massif/tests/realloc.stderr.exp
branches/DARWIN/massif/tests/realloc.vgtest
branches/DARWIN/massif/tests/thresholds_0_0.post.exp
branches/DARWIN/massif/tests/thresholds_0_0.vgtest
branches/DARWIN/massif/tests/thresholds_0_10.post.exp
branches/DARWIN/massif/tests/thresholds_0_10.vgtest
branches/DARWIN/massif/tests/thresholds_10_0.post.exp
branches/DARWIN/massif/tests/thresholds_10_0.vgtest
branches/DARWIN/massif/tests/thresholds_10_10.post.exp
branches/DARWIN/massif/tests/thresholds_10_10.vgtest
branches/DARWIN/massif/tests/thresholds_5_0.post.exp
branches/DARWIN/massif/tests/thresholds_5_0.vgtest
branches/DARWIN/massif/tests/thresholds_5_10.post.exp
branches/DARWIN/massif/tests/thresholds_5_10.vgtest
branches/DARWIN/massif/tests/toobig-allocs.vgtest
branches/DARWIN/massif/tests/zero1.post.exp
branches/DARWIN/massif/tests/zero1.vgtest
branches/DARWIN/massif/tests/zero2.post.exp
branches/DARWIN/massif/tests/zero2.vgtest
branches/DARWIN/tests/vg_regtest.in
Modified: branches/DARWIN/massif/docs/ms-manual.xml
===================================================================
--- branches/DARWIN/massif/docs/ms-manual.xml 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/docs/ms-manual.xml 2009-02-03 06:56:50 UTC (rev 9103)
@@ -614,6 +614,33 @@
</listitem>
</varlistentry>
+ <varlistentry id="opt.ignore-fn" xreflabel="--ignore-fn">
+ <term>
+ <option><![CDATA[--ignore-fn=<name> ]]></option>
+ </term>
+ <listitem>
+ <para>Any direct heap allocation (i.e. a call to
+ <function>malloc</function>, <function>new</function>, etc, or a call
+ to a function name in a <computeroutput>--alloc-fn</computeroutput>
+ option) that occurs in a function specified by this option will be
+ ignored. This is mostly useful for testing purposes. This option can
+ be specified multiple times on the command line, to name multiple
+ functions.
+ </para>
+
+ <para>Any <function>realloc</function> of an ignored block will
+ also be ignored, even if the <function>realloc</function> call does
+ not occur in an ignored function. This avoids the possibility of
+ negative heap sizes if ignored blocks are shrunk with
+ <function>realloc</function>.
+ </para>
+
+ <para>Note that overloaded C++ names must be written in full, as for
+ <computeroutput>--alloc-fn</computeroutput> above.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="opt.threshold" xreflabel="--threshold">
<term>
<option><![CDATA[--threshold=<m.n> [default: 1.0] ]]></option>
Modified: branches/DARWIN/massif/ms_main.c
===================================================================
--- branches/DARWIN/massif/ms_main.c 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/ms_main.c 2009-02-03 06:56:50 UTC (rev 9103)
@@ -235,22 +235,25 @@
// - 15,000 XPts 800,000 XPts
// - 1,800 top-XPts
-static UInt n_heap_allocs = 0;
-static UInt n_heap_reallocs = 0;
-static UInt n_heap_frees = 0;
-static UInt n_stack_allocs = 0;
-static UInt n_stack_frees = 0;
-static UInt n_xpts = 0;
-static UInt n_xpt_init_expansions = 0;
-static UInt n_xpt_later_expansions = 0;
-static UInt n_sxpt_allocs = 0;
-static UInt n_sxpt_frees = 0;
-static UInt n_skipped_snapshots = 0;
-static UInt n_real_snapshots = 0;
-static UInt n_detailed_snapshots = 0;
-static UInt n_peak_snapshots = 0;
-static UInt n_cullings = 0;
-static UInt n_XCon_redos = 0;
+static UInt n_heap_allocs = 0;
+static UInt n_heap_reallocs = 0;
+static UInt n_heap_frees = 0;
+static UInt n_ignored_heap_allocs = 0;
+static UInt n_ignored_heap_frees = 0;
+static UInt n_ignored_heap_reallocs = 0;
+static UInt n_stack_allocs = 0;
+static UInt n_stack_frees = 0;
+static UInt n_xpts = 0;
+static UInt n_xpt_init_expansions = 0;
+static UInt n_xpt_later_expansions = 0;
+static UInt n_sxpt_allocs = 0;
+static UInt n_sxpt_frees = 0;
+static UInt n_skipped_snapshots = 0;
+static UInt n_real_snapshots = 0;
+static UInt n_detailed_snapshots = 0;
+static UInt n_peak_snapshots = 0;
+static UInt n_cullings = 0;
+static UInt n_XCon_redos = 0;
//------------------------------------------------------------//
//--- Globals ---//
@@ -288,6 +291,7 @@
//------------------------------------------------------------//
static XArray* alloc_fns;
+static XArray* ignore_fns;
static void init_alloc_fns(void)
{
@@ -317,18 +321,26 @@
DO("operator new[](unsigned long, std::nothrow_t const&)");
}
-static Bool is_alloc_fn(Char* fnname)
+static void init_ignore_fns(void)
{
- Char** alloc_fn_ptr;
+ // Create the (empty) list.
+ ignore_fns = VG_(newXA)(VG_(malloc), "ms.main.iif.1",
+ VG_(free), sizeof(Char*));
+}
+
+// Determines if the named function is a member of the XArray.
+static Bool is_member_fn(XArray* fns, Char* fnname)
+{
+ Char** fn_ptr;
Int i;
// Nb: It's a linear search through the list, because we're comparing
// strings rather than pointers to strings.
// Nb: This gets called a lot. It was an OSet, but they're quite slow to
// iterate through so it wasn't a good choice.
- for (i = 0; i < VG_(sizeXA)(alloc_fns); i++) {
- alloc_fn_ptr = VG_(indexXA)(alloc_fns, i);
- if (VG_STREQ(fnname, *alloc_fn_ptr))
+ for (i = 0; i < VG_(sizeXA)(fns); i++) {
+ fn_ptr = VG_(indexXA)(fns, i);
+ if (VG_STREQ(fnname, *fn_ptr))
return True;
}
return False;
@@ -397,6 +409,11 @@
VG_(addToXA)(alloc_fns, &alloc_fn);
}
+ else if (VG_CLO_STREQN(12, arg, "--ignore-fn=")) {
+ Char* ignore_fn = &arg[12];
+ VG_(addToXA)(ignore_fns, &ignore_fn);
+ }
+
else if (VG_CLO_STREQN(18, arg, "--massif-out-file=")) {
clo_massif_out_file = &arg[18];
}
@@ -415,7 +432,8 @@
" ignored if --heap=no [8]\n"
" --stacks=no|yes profile stack(s) [no]\n"
" --depth=<number> depth of contexts [30]\n"
-" --alloc-fn=<name> specify <fn> as an alloc function [empty]\n"
+" --alloc-fn=<name> specify <name> as an alloc function [empty]\n"
+" --ignore-fn=<name> ignore heap allocations within <name> [empty]\n"
" --threshold=<m.n> significance threshold, as a percentage [1.0]\n"
" --peak-inaccuracy=<m.n> maximum peak inaccuracy, as a percentage [1.0]\n"
" --time-unit=i|ms|B time unit: instructions executed, milliseconds\n"
@@ -783,6 +801,15 @@
// enough.
#define BUF_LEN 2048
+// Determine if the given IP belongs to a function that should be ignored.
+static Bool fn_should_be_ignored(Addr ip)
+{
+ static Char buf[BUF_LEN];
+ return
+ ( VG_(get_fnname)(ip, buf, BUF_LEN) && is_member_fn(ignore_fns, buf)
+ ? True : False );
+}
+
// Get the stack trace for an XCon, filtering out uninteresting entries:
// alloc-fns and entries above alloc-fns, and entries below main-or-below-main.
// Eg: alloc-fn1 / alloc-fn2 / a / b / main / (below main) / c
@@ -792,7 +819,7 @@
static
Int get_IPs( ThreadId tid, Bool is_custom_alloc, Addr ips[])
{
- Char buf[BUF_LEN];
+ static Char buf[BUF_LEN];
Int n_ips, i, n_alloc_fns_removed;
Int overestimate;
Bool redo;
@@ -835,7 +862,7 @@
// involves calls to VG_(malloc)/VG_(free)).
for (i = n_alloc_fns_removed; i < n_ips; i++) {
if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
- if (is_alloc_fn(buf)) {
+ if (is_member_fn(alloc_fns, buf)) {
n_alloc_fns_removed++;
} else {
break;
@@ -862,15 +889,22 @@
}
// Gets an XCon and puts it in the tree. Returns the XCon's bottom-XPt.
+// Unless the allocation should be ignored, in which case we return NULL.
static XPt* get_XCon( ThreadId tid, Bool is_custom_alloc )
{
- Addr ips[MAX_IPS];
+ static Addr ips[MAX_IPS];
Int i;
XPt* xpt = alloc_xpt;
// After this call, the IPs we want are in ips[0]..ips[n_ips-1].
Int n_ips = get_IPs(tid, is_custom_alloc, ips);
+ // Should we ignore this allocation? (Nb: n_ips can be zero, eg. if
+ // 'main' is marked as an alloc-fn.)
+ if (n_ips > 0 && fn_should_be_ignored(ips[0])) {
+ return NULL;
+ }
+
// Now do the search/insertion of the XCon.
for (i = 0; i < n_ips; i++) {
Addr ip = ips[i];
@@ -1496,19 +1530,28 @@
if (clo_heap) {
VERB(3, "<<< new_mem_heap (%lu, %lu)", req_szB, slop_szB);
- // Update statistics.
- n_heap_allocs++;
+ hc->where = get_XCon( tid, is_custom_alloc );
- // Update heap stats.
- update_heap_stats(req_szB, clo_heap_admin + slop_szB);
+ if (hc->where) {
+ // Update statistics.
+ n_heap_allocs++;
- // Update XTree.
- hc->where = get_XCon( tid, is_custom_alloc );
- update_XCon(hc->where, req_szB);
+ // Update heap stats.
+ update_heap_stats(req_szB, clo_heap_admin + slop_szB);
- // Maybe take a snapshot.
- maybe_take_snapshot(Normal, " alloc");
+ // Update XTree.
+ update_XCon(hc->where, req_szB);
+ // Maybe take a snapshot.
+ maybe_take_snapshot(Normal, " alloc");
+
+ } else {
+ // Ignored allocation.
+ n_ignored_heap_allocs++;
+
+ VERB(3, "(ignored)");
+ }
+
VERB(3, ">>>");
}
@@ -1529,21 +1572,28 @@
if (clo_heap) {
VERB(3, "<<< die_mem_heap");
- // Update statistics
- n_heap_frees++;
+ if (hc->where) {
+ // Update statistics.
+ n_heap_frees++;
- // Maybe take a peak snapshot, since it's a deallocation.
- maybe_take_snapshot(Peak, "de-PEAK");
+ // Maybe take a peak snapshot, since it's a deallocation.
+ maybe_take_snapshot(Peak, "de-PEAK");
- // Update heap stats.
- update_heap_stats(-hc->req_szB, -clo_heap_admin - hc->slop_szB);
+ // Update heap stats.
+ update_heap_stats(-hc->req_szB, -clo_heap_admin - hc->slop_szB);
- // Update XTree.
- update_XCon(hc->where, -hc->req_szB);
+ // Update XTree.
+ update_XCon(hc->where, -hc->req_szB);
- // Maybe take a snapshot.
- maybe_take_snapshot(Normal, "dealloc");
+ // Maybe take a snapshot.
+ maybe_take_snapshot(Normal, "dealloc");
+ } else {
+ n_ignored_heap_frees++;
+
+ VERB(3, "(ignored)");
+ }
+
VERB(3, ">>> (-%lu, -%lu)", hc->req_szB, hc->slop_szB);
}
@@ -1553,6 +1603,12 @@
VG_(cli_free)( p );
}
+// Nb: --ignore-fn is tricky for realloc. If the block's original alloc was
+// ignored, but the realloc is not requested to be ignored, and we are
+// shrinking the block, then we have to ignore the realloc -- otherwise we
+// could end up with negative heap sizes. This isn't a danger if we are
+// growing such a block, but for consistency (it also simplifies things) we
+// ignore such reallocs as well.
static __inline__
void* renew_block ( ThreadId tid, void* p_old, SizeT new_req_szB )
{
@@ -1560,6 +1616,7 @@
void* p_new;
SizeT old_req_szB, old_slop_szB, new_slop_szB, new_actual_szB;
XPt *old_where, *new_where;
+ Bool is_ignored = False;
// Remove the old block
hc = VG_(HT_remove)(malloc_list, (UWord)p_old);
@@ -1573,12 +1630,18 @@
if (clo_heap) {
VERB(3, "<<< renew_mem_heap (%lu)", new_req_szB);
- // Update statistics
- n_heap_reallocs++;
+ if (hc->where) {
+ // Update statistics.
+ n_heap_reallocs++;
- // Maybe take a peak snapshot, if it's (effectively) a deallocation.
- if (new_req_szB < old_req_szB) {
- maybe_take_snapshot(Peak, "re-PEAK");
+ // Maybe take a peak snapshot, if it's (effectively) a deallocation.
+ if (new_req_szB < old_req_szB) {
+ maybe_take_snapshot(Peak, "re-PEAK");
+ }
+ } else {
+ // The original malloc was ignored, so we have to ignore the
+ // realloc as well.
+ is_ignored = True;
}
}
@@ -1614,9 +1677,17 @@
// Update XTree.
if (clo_heap) {
new_where = get_XCon( tid, /*custom_malloc*/False);
- hc->where = new_where;
- update_XCon(old_where, -old_req_szB);
- update_XCon(new_where, new_req_szB);
+ if (!is_ignored && new_where) {
+ hc->where = new_where;
+ update_XCon(old_where, -old_req_szB);
+ update_XCon(new_where, new_req_szB);
+ } else {
+ // The realloc itself is ignored.
+ is_ignored = True;
+
+ // Update statistics.
+ n_ignored_heap_reallocs++;
+ }
}
}
@@ -1628,12 +1699,18 @@
VG_(HT_add_node)(malloc_list, hc);
if (clo_heap) {
- // Update heap stats.
- update_heap_stats(new_req_szB - old_req_szB, new_slop_szB - old_slop_szB);
+ if (!is_ignored) {
+ // Update heap stats.
+ update_heap_stats(new_req_szB - old_req_szB,
+ new_slop_szB - old_slop_szB);
- // Maybe take a snapshot.
- maybe_take_snapshot(Normal, "realloc");
+ // Maybe take a snapshot.
+ maybe_take_snapshot(Normal, "realloc");
+ } else {
+ VERB(3, "(ignored)");
+ }
+
VERB(3, ">>> (%ld, %ld)",
new_req_szB - old_req_szB, new_slop_szB - old_slop_szB);
}
@@ -2138,25 +2215,28 @@
// Stats
tl_assert(n_xpts > 0); // always have alloc_xpt
- VERB(1, "heap allocs: %u", n_heap_allocs);
- VERB(1, "heap reallocs: %u", n_heap_reallocs);
- VERB(1, "heap frees: %u", n_heap_frees);
- VERB(1, "stack allocs: %u", n_stack_allocs);
- VERB(1, "stack frees: %u", n_stack_frees);
- VERB(1, "XPts: %u", n_xpts);
- VERB(1, "top-XPts: %u (%d%%)",
+ VERB(1, "heap allocs: %u", n_heap_allocs);
+ VERB(1, "heap reallocs: %u", n_heap_reallocs);
+ VERB(1, "heap frees: %u", n_heap_frees);
+ VERB(1, "ignored heap allocs: %u", n_ignored_heap_allocs);
+ VERB(1, "ignored heap frees: %u", n_ignored_heap_frees);
+ VERB(1, "ignored heap reallocs: %u", n_ignored_heap_reallocs);
+ VERB(1, "stack allocs: %u", n_stack_allocs);
+ VERB(1, "stack frees: %u", n_stack_frees);
+ VERB(1, "XPts: %u", n_xpts);
+ VERB(1, "top-XPts: %u (%d%%)",
alloc_xpt->n_children,
( n_xpts ? alloc_xpt->n_children * 100 / n_xpts : 0));
- VERB(1, "XPt init expansions: %u", n_xpt_init_expansions);
- VERB(1, "XPt later expansions: %u", n_xpt_later_expansions);
- VERB(1, "SXPt allocs: %u", n_sxpt_allocs);
- VERB(1, "SXPt frees: %u", n_sxpt_frees);
- VERB(1, "skipped snapshots: %u", n_skipped_snapshots);
- VERB(1, "real snapshots: %u", n_real_snapshots);
- VERB(1, "detailed snapshots: %u", n_detailed_snapshots);
- VERB(1, "peak snapshots: %u", n_peak_snapshots);
- VERB(1, "cullings: %u", n_cullings);
- VERB(1, "XCon redos: %u", n_XCon_redos);
+ VERB(1, "XPt init expansions: %u", n_xpt_init_expansions);
+ VERB(1, "XPt later expansions: %u", n_xpt_later_expansions);
+ VERB(1, "SXPt allocs: %u", n_sxpt_allocs);
+ VERB(1, "SXPt frees: %u", n_sxpt_frees);
+ VERB(1, "skipped snapshots: %u", n_skipped_snapshots);
+ VERB(1, "real snapshots: %u", n_real_snapshots);
+ VERB(1, "detailed snapshots: %u", n_detailed_snapshots);
+ VERB(1, "peak snapshots: %u", n_peak_snapshots);
+ VERB(1, "cullings: %u", n_cullings);
+ VERB(1, "XCon redos: %u", n_XCon_redos);
}
@@ -2196,13 +2276,22 @@
clo_heap_admin = 0;
}
- // Print alloc-fns, if necessary.
+ // Print alloc-fns and ignore-fns, if necessary.
if (VG_(clo_verbosity) > 1) {
VERB(1, "alloc-fns:");
for (i = 0; i < VG_(sizeXA)(alloc_fns); i++) {
- Char** alloc_fn_ptr = VG_(indexXA)(alloc_fns, i);
- VERB(1, " %d: %s", i, *alloc_fn_ptr);
+ Char** fn_ptr = VG_(indexXA)(alloc_fns, i);
+ VERB(1, " %d: %s", i, *fn_ptr);
}
+
+ VERB(1, "ignore-fns:");
+ if (0 == VG_(sizeXA)(ignore_fns)) {
+ VERB(1, " <empty>");
+ }
+ for (i = 0; i < VG_(sizeXA)(ignore_fns); i++) {
+ Char** fn_ptr = VG_(indexXA)(ignore_fns, i);
+ VERB(1, " %d: %s", i, *fn_ptr);
+ }
}
// Events to track.
@@ -2233,12 +2322,12 @@
"Copyright (C) 2003-2008, and GNU GPL'd, by Nicholas Nethercote");
VG_(details_bug_reports_to) (VG_BUGS_TO);
- // Basic functions
+ // Basic functions.
VG_(basic_tool_funcs) (ms_post_clo_init,
ms_instrument,
ms_fini);
- // Needs
+ // Needs.
VG_(needs_libc_freeres)();
VG_(needs_command_line_options)(ms_process_cmd_line_option,
ms_print_usage,
@@ -2258,14 +2347,15 @@
NULL,
0 );
- // HP_Chunks
+ // HP_Chunks.
malloc_list = VG_(HT_construct)( "Massif's malloc list" );
// Dummy node at top of the context structure.
alloc_xpt = new_XPt(/*ip*/0, /*parent*/NULL);
- // Initialise alloc_fns.
+ // Initialise alloc_fns and ignore_fns.
init_alloc_fns();
+ init_ignore_fns();
// Initialise args_for_massif.
args_for_massif = VG_(newXA)(VG_(malloc), "ms.main.mprci.1",
Modified: branches/DARWIN/massif/tests/Makefile.am
===================================================================
--- branches/DARWIN/massif/tests/Makefile.am 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/Makefile.am 2009-02-03 06:56:50 UTC (rev 9103)
@@ -9,7 +9,6 @@
alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \
basic.post.exp basic.stderr.exp basic.vgtest \
basic2.post.exp basic2.stderr.exp basic2.vgtest \
- insig.post.exp insig.stderr.exp insig.vgtest \
big-alloc.post.exp big-alloc.stderr.exp big-alloc.vgtest \
deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \
deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
@@ -18,7 +17,9 @@
culling1.stderr.exp culling1.vgtest \
culling2.stderr.exp culling2.vgtest \
custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest
+ ignored.post.exp ignored.stderr.exp ignored.vgtest \
ignoring.post.exp ignoring.stderr.exp ignoring.vgtest \
+ insig.post.exp insig.stderr.exp insig.vgtest \
long-names.post.exp long-names.stderr.exp long-names.vgtest \
long-time.post.exp long-time.stderr.exp long-time.vgtest \
new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \
@@ -53,6 +54,7 @@
culling1 culling2 \
custom_alloc \
deep \
+ ignored \
ignoring \
insig \
long-names \
Modified: branches/DARWIN/massif/tests/alloc-fns-A.post.exp
===================================================================
--- branches/DARWIN/massif/tests/alloc-fns-A.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/alloc-fns-A.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./alloc-fns
-Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/alloc-fns-A.vgtest
===================================================================
--- branches/DARWIN/massif/tests/alloc-fns-A.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/alloc-fns-A.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: alloc-fns
vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/alloc-fns-B.post.exp
===================================================================
--- branches/DARWIN/massif/tests/alloc-fns-B.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/alloc-fns-B.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,7 @@
--------------------------------------------------------------------------------
Command: ./alloc-fns
-Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/alloc-fns-B.vgtest
===================================================================
--- branches/DARWIN/massif/tests/alloc-fns-B.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/alloc-fns-B.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: alloc-fns
vgopts: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/basic.post.exp
===================================================================
--- branches/DARWIN/massif/tests/basic.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/basic.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./basic
-Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/basic.vgtest
===================================================================
--- branches/DARWIN/massif/tests/basic.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/basic.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: basic
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/basic2.post.exp
===================================================================
--- branches/DARWIN/massif/tests/basic2.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/basic2.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./basic
-Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10
+Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/basic2.vgtest
===================================================================
--- branches/DARWIN/massif/tests/basic2.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/basic2.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: basic
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/big-alloc.c
===================================================================
--- branches/DARWIN/massif/tests/big-alloc.c 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/big-alloc.c 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,9 +1,8 @@
#include <stdlib.h>
// Do some big allocations. At one point, the threshold calculation was
-// multiplying the szB by 10000 without using a Long, which was causing this
-// was causing the threshold calculation to go wrong due to a 32-bit
-// overflow.
+// multiplying the szB by 10000 without using a Long, which was causing the
+// threshold calculation to go wrong due to a 32-bit overflow.
int main(void)
{
Modified: branches/DARWIN/massif/tests/big-alloc.post.exp
===================================================================
--- branches/DARWIN/massif/tests/big-alloc.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/big-alloc.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./big-alloc
-Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/big-alloc.vgtest
===================================================================
--- branches/DARWIN/massif/tests/big-alloc.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/big-alloc.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: big-alloc
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/culling1.stderr.exp
===================================================================
--- branches/DARWIN/massif/tests/culling1.stderr.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/culling1.stderr.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -13,6 +13,11 @@
Massif: 11: operator new[](unsigned, std::nothrow_t const&)
Massif: 12: operator new(unsigned long, std::nothrow_t const&)
Massif: 13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif: 0: __part_load_locale
+Massif: 1: __time_load_locale
+Massif: 2: dwarf2_unwind_dyld_add_image_hook
+Massif: 3: get_or_create_key_element
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
Massif: alloc S. 1 (t:32, hp:16, ex:16, st:0)
Massif: alloc S. 2 (t:64, hp:32, ex:32, st:0)
@@ -419,20 +424,23 @@
Massif: post-cull S. 48 (t:6240, hp:3120, ex:3120, st:0)
Massif: post-cull Sd 49 (t:6368, hp:3184, ex:3184, st:0)
Massif: New time interval = 128 (between snapshots 0 and 1)
-Massif: heap allocs: 200
-Massif: heap reallocs: 0
-Massif: heap frees: 0
-Massif: stack allocs: 0
-Massif: stack frees: 0
+Massif: heap allocs: 200
+Massif: heap reallocs: 0
+Massif: heap frees: 0
+Massif: ignored heap allocs: ...
+Massif: ignored heap frees: ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs: 0
+Massif: stack frees: 0
Massif: XPts: ...
Massif: top-XPts: ...
Massif: XPt init expansions: ...
Massif: XPt later expansions: ...
Massif: SXPt allocs: ...
Massif: SXPt frees: ...
-Massif: skipped snapshots: 51
-Massif: real snapshots: 150
-Massif: detailed snapshots: 15
-Massif: peak snapshots: 0
-Massif: cullings: 2
+Massif: skipped snapshots: 51
+Massif: real snapshots: 150
+Massif: detailed snapshots: 15
+Massif: peak snapshots: 0
+Massif: cullings: 2
Massif: XCon redos: ...
Modified: branches/DARWIN/massif/tests/culling1.vgtest
===================================================================
--- branches/DARWIN/massif/tests/culling1.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/culling1.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: culling1
vgopts: -v -v --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
stderr_filter: filter_verbose
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/culling2.stderr.exp
===================================================================
--- branches/DARWIN/massif/tests/culling2.stderr.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/culling2.stderr.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -13,6 +13,11 @@
Massif: 11: operator new[](unsigned, std::nothrow_t const&)
Massif: 12: operator new(unsigned long, std::nothrow_t const&)
Massif: 13: operator new[](unsigned long, std::nothrow_t const&)
+Massif: ignore-fns:
+Massif: 0: __part_load_locale
+Massif: 1: __time_load_locale
+Massif: 2: dwarf2_unwind_dyld_add_image_hook
+Massif: 3: get_or_create_key_element
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
Massif: alloc S. 1 (t:16, hp:0, ex:16, st:0)
Massif: alloc S. 2 (t:432, hp:400, ex:32, st:0)
@@ -522,20 +527,23 @@
Massif: post-cull S. 48 (t:7647136, hp:7644000, ex:3136, st:0)
Massif: post-cull Sd 49 (t:7883584, hp:7880400, ex:3184, st:0)
Massif: New time interval = 113728 (between snapshots 1 and 2)
-Massif: heap allocs: 200
-Massif: heap reallocs: 0
-Massif: heap frees: 0
-Massif: stack allocs: 0
-Massif: stack frees: 0
+Massif: heap allocs: 200
+Massif: heap reallocs: 0
+Massif: heap frees: 0
+Massif: ignored heap allocs: ...
+Massif: ignored heap frees: ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs: 0
+Massif: stack frees: 0
Massif: XPts: ...
Massif: top-XPts: ...
Massif: XPt init expansions: ...
Massif: XPt later expansions: ...
Massif: SXPt allocs: ...
Massif: SXPt frees: ...
-Massif: skipped snapshots: 1
-Massif: real snapshots: 200
-Massif: detailed snapshots: 20
-Massif: peak snapshots: 0
-Massif: cullings: 3
+Massif: skipped snapshots: 1
+Massif: real snapshots: 200
+Massif: detailed snapshots: 20
+Massif: peak snapshots: 0
+Massif: cullings: 3
Massif: XCon redos: ...
Modified: branches/DARWIN/massif/tests/culling2.vgtest
===================================================================
--- branches/DARWIN/massif/tests/culling2.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/culling2.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: culling2
vgopts: -v -v --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
stderr_filter: filter_verbose
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/custom_alloc.post.exp
===================================================================
--- branches/DARWIN/massif/tests/custom_alloc.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/custom_alloc.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./custom_alloc
-Massif arguments: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/custom_alloc.vgtest
===================================================================
--- branches/DARWIN/massif/tests/custom_alloc.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/custom_alloc.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: custom_alloc
vgopts: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/deep-A.post.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-A.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-A.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/deep-A.vgtest
===================================================================
--- branches/DARWIN/massif/tests/deep-A.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-A.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: deep
vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/deep-B.post.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-B.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-B.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/deep-B.stderr.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-B.stderr.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-B.stderr.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -20,6 +20,11 @@
Massif: 18: a10
Massif: 19: a11
Massif: 20: a12
+Massif: ignore-fns:
+Massif: 0: __part_load_locale
+Massif: 1: __time_load_locale
+Massif: 2: dwarf2_unwind_dyld_add_image_hook
+Massif: 3: get_or_create_key_element
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0)
Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0)
@@ -31,20 +36,23 @@
Massif: alloc S. 8 (t:3264, hp:3200, ex:64, st:0)
Massif: alloc Sd 9 (t:3672, hp:3600, ex:72, st:0)
Massif: alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
-Massif: heap allocs: 10
-Massif: heap reallocs: 0
-Massif: heap frees: 0
-Massif: stack allocs: 0
-Massif: stack frees: 0
+Massif: heap allocs: 10
+Massif: heap reallocs: 0
+Massif: heap frees: 0
+Massif: ignored heap allocs: ...
+Massif: ignored heap frees: ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs: 0
+Massif: stack frees: 0
Massif: XPts: ...
Massif: top-XPts: ...
Massif: XPt init expansions: ...
Massif: XPt later expansions: ...
Massif: SXPt allocs: ...
Massif: SXPt frees: ...
-Massif: skipped snapshots: 0
-Massif: real snapshots: 11
-Massif: detailed snapshots: 1
-Massif: peak snapshots: 0
-Massif: cullings: 0
+Massif: skipped snapshots: 0
+Massif: real snapshots: 11
+Massif: detailed snapshots: 1
+Massif: peak snapshots: 0
+Massif: cullings: 0
Massif: XCon redos: ...
Modified: branches/DARWIN/massif/tests/deep-B.vgtest
===================================================================
--- branches/DARWIN/massif/tests/deep-B.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-B.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,5 +1,6 @@
prog: deep
vgopts: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
stderr_filter: filter_verbose
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/deep-C.post.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-C.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-C.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/deep-C.stderr.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-C.stderr.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-C.stderr.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -23,6 +23,11 @@
Massif: 21: a10
Massif: 22: a11
Massif: 23: a12
+Massif: ignore-fns:
+Massif: 0: __part_load_locale
+Massif: 1: __time_load_locale
+Massif: 2: dwarf2_unwind_dyld_add_image_hook
+Massif: 3: get_or_create_key_element
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0)
Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0)
@@ -34,20 +39,23 @@
Massif: alloc S. 8 (t:3264, hp:3200, ex:64, st:0)
Massif: alloc Sd 9 (t:3672, hp:3600, ex:72, st:0)
Massif: alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
-Massif: heap allocs: 10
-Massif: heap reallocs: 0
-Massif: heap frees: 0
-Massif: stack allocs: 0
-Massif: stack frees: 0
+Massif: heap allocs: 10
+Massif: heap reallocs: 0
+Massif: heap frees: 0
+Massif: ignored heap allocs: ...
+Massif: ignored heap frees: ...
+Massif: ignored heap reallocs: ...
+Massif: stack allocs: 0
+Massif: stack frees: 0
Massif: XPts: ...
Massif: top-XPts: ...
Massif: XPt init expansions: ...
Massif: XPt later expansions: ...
Massif: SXPt allocs: ...
Massif: SXPt frees: ...
-Massif: skipped snapshots: 0
-Massif: real snapshots: 11
-Massif: detailed snapshots: 1
-Massif: peak snapshots: 0
-Massif: cullings: 0
+Massif: skipped snapshots: 0
+Massif: real snapshots: 11
+Massif: detailed snapshots: 1
+Massif: peak snapshots: 0
+Massif: cullings: 0
Massif: XCon redos: ...
Modified: branches/DARWIN/massif/tests/deep-C.vgtest
===================================================================
--- branches/DARWIN/massif/tests/deep-C.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-C.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,5 +1,6 @@
prog: deep
vgopts: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --depth=8 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
stderr_filter: filter_verbose
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/deep-D.post.exp
===================================================================
--- branches/DARWIN/massif/tests/deep-D.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-D.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/deep-D.vgtest
===================================================================
--- branches/DARWIN/massif/tests/deep-D.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/deep-D.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: deep
vgopts: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ../../tests/filter_libc
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/filter_verbose
===================================================================
--- branches/DARWIN/massif/tests/filter_verbose 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/filter_verbose 2009-02-03 06:56:50 UTC (rev 9103)
@@ -11,6 +11,11 @@
# lines by default, and the 'p' means do print those that match the pattern.
sed -n "/Massif:/p" |
+# These ignored heap counts could vary from machine to machine.
+sed "s/\(Massif: ignored heap allocs:\).*/\1 .../" |
+sed "s/\(Massif: ignored heap frees:\).*/\1 .../" |
+sed "s/\(Massif: ignored heap reallocs:\).*/\1 .../" |
+
# These XPt counts vary from machine to machine, because the size of the
# stack trace can vary -- eg. some machines have more stack frames below
# zero than other machines. So filter them out.
Added: branches/DARWIN/massif/tests/ignored.c
===================================================================
--- branches/DARWIN/massif/tests/ignored.c (rev 0)
+++ branches/DARWIN/massif/tests/ignored.c 2009-02-03 06:56:50 UTC (rev 9103)
@@ -0,0 +1,49 @@
+#include <stdlib.h>
+
+// All sizes are divisible by 16 -- no slop.
+
+int* ignore1(void)
+{
+ // Allocating/freeing in an ignored function: ignored.
+ int* ignored_x1 = malloc(400);
+ int* ignored_x2 = malloc(400);
+ free(ignored_x2);
+ return ignored_x1;
+}
+
+void ignore2(int* x, int* ignored_x)
+{
+ // Growing/shrinking a non-ignored block in an ignored function: ignored.
+ x = realloc(x, 800);
+ x = realloc(x, 400);
+
+ // Growing/shrinking an ignored block in an ignored function: ignored.
+ ignored_x = realloc(ignored_x, 800);
+ ignored_x = realloc(ignored_x, 400);
+}
+
+int main(void)
+{
+ int* x;
+ int* ignored_x;
+
+ // Not ignored.
+ x = malloc(400);
+
+ // Get an ignored block.
+ ignored_x = ignore1();
+
+ // Growing/shrinking a non-ignored block in a non-ignored function:
+ // not ignored.
+ x = realloc(x, 800);
+ x = realloc(x, 400);
+
+ // Growing/shrinking an ignored block in a non-ignored function: ignored.
+ ignored_x = realloc(ignored_x, 800);
+ ignored_x = realloc(ignored_x, 400);
+
+ ignore2(x, ignored_x);
+
+ x = realloc(ignored_x, 0); // equivalent to 'free(ignored_x)'.
+}
+
Added: branches/DARWIN/massif/tests/ignored.post.exp
===================================================================
--- branches/DARWIN/massif/tests/ignored.post.exp (rev 0)
+++ branches/DARWIN/massif/tests/ignored.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -0,0 +1,50 @@
+--------------------------------------------------------------------------------
+Command: ./ignored
+Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=ignore1 --ignore-fn=ignore2 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+ B
+ 800^ #
+ | #
+ | #
+ | #
+ | #
+ | #
+ | #
+ | #
+ | #
+ | #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ | : #
+ 0 +----------------------------------------------------------------------->B
+ 0 800
+
+Number of snapshots: 5
+ Detailed snapshots: [3 (peak)]
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 400 400 400 0 0
+ 2 800 800 800 0 0
+ 3 800 800 800 0 0
+100.00% (800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->100.00% (800B) 0x........: main (ignored.c:31)
+|
+->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 4 800 800 400 400 0
Added: branches/DARWIN/massif/tests/ignored.stderr.exp
===================================================================
--- branches/DARWIN/massif/tests/ignored.stderr.exp (rev 0)
+++ branches/DARWIN/massif/tests/ignored.stderr.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -0,0 +1,2 @@
+
+
Added: branches/DARWIN/massif/tests/ignored.vgtest
===================================================================
--- branches/DARWIN/massif/tests/ignored.vgtest (rev 0)
+++ branches/DARWIN/massif/tests/ignored.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -0,0 +1,6 @@
+prog: ignored
+vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
+vgopts: --ignore-fn=ignore1 --ignore-fn=ignore2
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
+post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
+cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/ignoring.post.exp
===================================================================
--- branches/DARWIN/massif/tests/ignoring.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/ignoring.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./ignoring
-Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/ignoring.vgtest
===================================================================
--- branches/DARWIN/massif/tests/ignoring.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/ignoring.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: ignoring
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/insig.post.exp
===================================================================
--- branches/DARWIN/massif/tests/insig.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/insig.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./insig
-Massif arguments: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out
+Massif arguments: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/DARWIN/massif/tests/insig.vgtest
===================================================================
--- branches/DARWIN/massif/tests/insig.vgtest 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/insig.vgtest 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,4 +1,5 @@
prog: insig
vgopts: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out
+vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
cleanup: rm massif.out
Modified: branches/DARWIN/massif/tests/long-names.post.exp
===================================================================
--- branches/DARWIN/massif/tests/long-names.post.exp 2009-02-03 05:50:44 UTC (rev 9102)
+++ branches/DARWIN/massif/tests/long-names.post.exp 2009-02-03 06:56:50 UTC (rev 9103)
@@ -1,6 +1,6 @@
---------------------------------------------------------------------...
[truncated message content] |
|
From: <sv...@va...> - 2009-02-03 05:50:49
|
Author: njn Date: 2009-02-03 05:50:44 +0000 (Tue, 03 Feb 2009) New Revision: 9102 Log: Add a missing file to the Makefile.am. Modified: branches/DARWIN/massif/tests/Makefile.am Modified: branches/DARWIN/massif/tests/Makefile.am =================================================================== --- branches/DARWIN/massif/tests/Makefile.am 2009-02-03 04:41:02 UTC (rev 9101) +++ branches/DARWIN/massif/tests/Makefile.am 2009-02-03 05:50:44 UTC (rev 9102) @@ -24,7 +24,7 @@ new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \ no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \ null.post.exp null.stderr.exp null.vgtest \ - one.post.exp one.stderr.exp one.vgtest \ + one.post.exp one.post.exp2 one.stderr.exp one.vgtest \ overloaded-new.post.exp overloaded-new.stderr.exp overloaded-new.vgtest \ params.post.exp params.stderr.exp params.vgtest \ peak.post.exp peak.stderr.exp peak.vgtest \ |
|
From: <sv...@va...> - 2009-02-03 04:41:07
|
Author: njn Date: 2009-02-03 04:41:02 +0000 (Tue, 03 Feb 2009) New Revision: 9101 Log: Modify lots of the tests so that they all succeed if VG_MIN_MALLOC_SZB equals 8 or 16. This is because some platforms need 8 (eg. x86-linux) and some platforms need 16 (eg. *-Darwin, amd64-linux(?)). Also tweak the truncation of long names so that the truncation point in a function name isn't affected by the length of the address that precedes it. This avoids the need for multiple *.post.exp* files for 'long-names'. Added: branches/DARWIN/massif/tests/one.post.exp2 Removed: branches/DARWIN/massif/tests/long-names.post.exp2 Modified: branches/DARWIN/massif/ms_main.c branches/DARWIN/massif/tests/alloc-fns-A.post.exp branches/DARWIN/massif/tests/alloc-fns-B.post.exp branches/DARWIN/massif/tests/alloc-fns.c branches/DARWIN/massif/tests/basic.c branches/DARWIN/massif/tests/basic.post.exp branches/DARWIN/massif/tests/basic2.post.exp branches/DARWIN/massif/tests/culling1.c branches/DARWIN/massif/tests/culling1.stderr.exp branches/DARWIN/massif/tests/culling1.vgtest branches/DARWIN/massif/tests/culling2.c branches/DARWIN/massif/tests/culling2.stderr.exp branches/DARWIN/massif/tests/culling2.vgtest branches/DARWIN/massif/tests/custom_alloc.c branches/DARWIN/massif/tests/custom_alloc.post.exp branches/DARWIN/massif/tests/custom_alloc.vgtest branches/DARWIN/massif/tests/deep-A.post.exp branches/DARWIN/massif/tests/deep-B.post.exp branches/DARWIN/massif/tests/deep-B.stderr.exp branches/DARWIN/massif/tests/deep-C.post.exp branches/DARWIN/massif/tests/deep-C.stderr.exp branches/DARWIN/massif/tests/deep-D.post.exp branches/DARWIN/massif/tests/deep.c branches/DARWIN/massif/tests/insig.c branches/DARWIN/massif/tests/insig.post.exp branches/DARWIN/massif/tests/insig.vgtest branches/DARWIN/massif/tests/long-names.c branches/DARWIN/massif/tests/long-names.post.exp branches/DARWIN/massif/tests/one.c branches/DARWIN/massif/tests/peak.c branches/DARWIN/massif/tests/peak.post.exp branches/DARWIN/massif/tests/peak.vgtest branches/DARWIN/massif/tests/peak2.post.exp branches/DARWIN/massif/tests/peak2.stderr.exp branches/DARWIN/massif/tests/peak2.vgtest branches/DARWIN/massif/tests/realloc.c branches/DARWIN/massif/tests/realloc.post.exp branches/DARWIN/massif/tests/realloc.stderr.exp branches/DARWIN/massif/tests/thresholds.c branches/DARWIN/massif/tests/thresholds_0_0.post.exp branches/DARWIN/massif/tests/thresholds_0_10.post.exp branches/DARWIN/massif/tests/thresholds_10_0.post.exp branches/DARWIN/massif/tests/thresholds_10_10.post.exp branches/DARWIN/massif/tests/thresholds_5_0.post.exp branches/DARWIN/massif/tests/thresholds_5_10.post.exp [... diff too large to include ...] |
|
From: <sv...@va...> - 2009-02-03 04:14:30
|
Author: njn
Date: 2009-02-03 04:14:20 +0000 (Tue, 03 Feb 2009)
New Revision: 9100
Log:
Merge r9099 (fix problem with --massif-out-file= checking) from the trunk.
Modified:
branches/VALGRIND_3_4_BRANCH/massif/ms_main.c
Modified: branches/VALGRIND_3_4_BRANCH/massif/ms_main.c
===================================================================
--- branches/VALGRIND_3_4_BRANCH/massif/ms_main.c 2009-02-03 03:59:05 UTC (rev 9099)
+++ branches/VALGRIND_3_4_BRANCH/massif/ms_main.c 2009-02-03 04:14:20 UTC (rev 9100)
@@ -397,7 +397,7 @@
VG_(addToXA)(alloc_fns, &alloc_fn);
}
- else if (VG_CLO_STREQN(14, arg, "--massif-out-file=")) {
+ else if (VG_CLO_STREQN(18, arg, "--massif-out-file=")) {
clo_massif_out_file = &arg[18];
}
|
|
From: <sv...@va...> - 2009-02-03 03:59:25
|
Author: njn
Date: 2009-02-03 03:59:05 +0000 (Tue, 03 Feb 2009)
New Revision: 9099
Log:
Fix a minor defect: only the first 14 chars of the 18 chars in the
--massif-out-file= option was being checked, which meant that if you did
--massif-out-filename=foo by mistake it would accept it and produce a file
called "ame=foo".
MERGE to 3_4_BRANCH
Modified:
trunk/massif/ms_main.c
Modified: trunk/massif/ms_main.c
===================================================================
--- trunk/massif/ms_main.c 2009-02-01 21:46:28 UTC (rev 9098)
+++ trunk/massif/ms_main.c 2009-02-03 03:59:05 UTC (rev 9099)
@@ -397,7 +397,7 @@
VG_(addToXA)(alloc_fns, &alloc_fn);
}
- else if (VG_CLO_STREQN(14, arg, "--massif-out-file=")) {
+ else if (VG_CLO_STREQN(18, arg, "--massif-out-file=")) {
clo_massif_out_file = &arg[18];
}
|
|
From: Tom H. <th...@cy...> - 2009-02-03 03:47:49
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) started at 2009-02-03 03:20:06 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 486 tests, 1 stderr failure, 0 stdout failures, 0 post failures == memcheck/tests/x86-linux/scalar (stderr) |