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
(19) |
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-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) |
|
From: Tom H. <th...@cy...> - 2009-02-03 03:44:14
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2009-02-03 03:05: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 == 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-03 03:32:00
|
Nightly build on mg ( x86_64, Fedora 9 ) started at 2009-02-03 03:10:05 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-03 00:23:35
|
On Sat, Jan 31, 2009 at 9:09 AM, Nicholas Nethercote
<n.n...@gm...> wrote:
> On Wed, Jan 28, 2009 at 10:14 PM, Julian Seward <js...@ac...> wrote:
>>
>> If there are any other high priority bug fixes that should go in
>> 3.4.1, please let me know, preferably with trunk rev numbers. But
>> please no build system changes.
>
> On Monday I might have a fix for some borked line number reading in
> the stabs reader, believe it or not -- I was looking into it for the
> Darwin port because DWARF is such a pain on Darwin. But it probably
> doesn't matter for 3.4.1, I don't think stabs gets much use any more.
Or not. Turns out that GCC's stabs generation on Darwin is totally borked,
or, at least, follows a different convention to that used on Linux.
Consider this program:
----
#include <stdio.h>
int f(void)
{
int x;
printf("f1\n");
printf("f2\n");
printf("f3\n");
printf("f4\n");
printf("f5\n");
printf("f6\n");
if (x)
printf("f7a\n");
else
printf("f7b\n");
return 0;
}
int main(void)
{
printf("1\n");
printf("2\n");
printf("3\n");
printf("4\n");
printf("5\n");
printf("6\n");
return f();
}
----
Here's the x86-linux stabs. N_SO indicates a new file, N_FUN indicates a new
function, N_SLINE indicates a new line.
N_SO(L): string=a.c, n_value(addr)=0x80483c4
N_FUN: string=f:F(0,1), n_desc(linenum)=0, n_value(addr)=0x80483c4
N_SLINE: n_value(addr)=0x0, n_desc(line_num)=4
N_SLINE: n_value(addr)=0x6, n_desc(line_num)=6
N_SLINE: n_value(addr)=0x12, n_desc(line_num)=7
N_SLINE: n_value(addr)=0x1e, n_desc(line_num)=8
N_SLINE: n_value(addr)=0x2a, n_desc(line_num)=9
N_SLINE: n_value(addr)=0x36, n_desc(line_num)=10
N_SLINE: n_value(addr)=0x42, n_desc(line_num)=11
N_SLINE: n_value(addr)=0x4e, n_desc(line_num)=12
N_SLINE: n_value(addr)=0x54, n_desc(line_num)=13
N_SLINE: n_value(addr)=0x62, n_desc(line_num)=15
N_SLINE: n_value(addr)=0x6e, n_desc(line_num)=16
N_SLINE: n_value(addr)=0x73, n_desc(line_num)=17
N_FUN: string=main:F(0,1), n_desc(linenum)=0, n_value(addr)=0x8048439
N_SLINE: n_value(addr)=0x0, n_desc(line_num)=20
N_SLINE: n_value(addr)=0x11, n_desc(line_num)=21
N_SLINE: n_value(addr)=0x1d, n_desc(line_num)=22
N_SLINE: n_value(addr)=0x29, n_desc(line_num)=23
N_SLINE: n_value(addr)=0x35, n_desc(line_num)=24
N_SLINE: n_value(addr)=0x41, n_desc(line_num)=25
N_SLINE: n_value(addr)=0x4d, n_desc(line_num)=26
N_SLINE: n_value(addr)=0x59, n_desc(line_num)=27
N_SLINE: n_value(addr)=0x5e, n_desc(line_num)=28
N_SO(L): string=, n_value(addr)=0x80484a0
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):
--5677-- Looking for debug info in ./a.out ...
--5677-- Reading nlist symbols and STABS debuginfo for ./a.out (0x1000) (8 160)
N_SO(L): string=a.c, n_value(addr)=0x1ede
N_SLINE: n_value(addr)=0x0, n_desc(line_num)=4
N_SLINE: n_value(addr)=0xd, n_desc(line_num)=6
N_SLINE: n_value(addr)=0x1b, n_desc(line_num)=7
N_SLINE: n_value(addr)=0x29, n_desc(line_num)=8
N_SLINE: n_value(addr)=0x37, n_desc(line_num)=9
N_SLINE: n_value(addr)=0x45, n_desc(line_num)=10
N_SLINE: n_value(addr)=0x53, n_desc(line_num)=11
N_SLINE: n_value(addr)=0x61, n_desc(line_num)=12
N_SLINE: n_value(addr)=0x67, n_desc(line_num)=13
N_SLINE: n_value(addr)=0x77, n_desc(line_num)=15
N_SLINE: n_value(addr)=0x85, n_desc(line_num)=16
N_SLINE: n_value(addr)=0x8a, n_desc(line_num)=17
N_FUN: string=f:F(0,1), n_desc(linenum)=0, n_value(addr)=0x1ede
N_SLINE: n_value(addr)=0x1f6e, n_desc(line_num)=20
N_SLINE: n_value(addr)=0x1f7b, n_desc(line_num)=21
N_SLINE: n_value(addr)=0x1f89, n_desc(line_num)=22
N_SLINE: n_value(addr)=0x1f97, n_desc(line_num)=23
N_SLINE: n_value(addr)=0x1fa5, n_desc(line_num)=24
N_SLINE: n_value(addr)=0x1fb3, n_desc(line_num)=25
N_SLINE: n_value(addr)=0x1fc1, n_desc(line_num)=26
N_SLINE: n_value(addr)=0x1fcf, n_desc(line_num)=27
N_SLINE: n_value(addr)=0x1fd4, n_desc(line_num)=28
N_FUN: string=main:F(0,1), n_desc(linenum)=0, n_value(addr)=0x1f6e
N_SO(L): string=, n_value(addr)=0x1fda
Argh. No wonder -gstabs wasn't helping on Darwin. (It turns out
there's a -gfull option which adds some extra stab entries and almost
makes it work, but N_FUNs are still at the function ends.)
Looks like I won't have a fix to check in after all, because it's not
the stabs reader that is
broken.
N
|
|
From: Nicholas N. <n.n...@gm...> - 2009-02-03 00:06:43
|
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 |