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
(10) |
2
(8) |
3
(17) |
4
(28) |
5
(22) |
6
(8) |
|
7
(8) |
8
(22) |
9
(12) |
10
(17) |
11
(14) |
12
(15) |
13
(6) |
|
14
(9) |
15
(9) |
16
(16) |
17
(13) |
18
(18) |
19
(7) |
20
(5) |
|
21
(6) |
22
(5) |
23
(11) |
24
(5) |
25
(11) |
26
(7) |
27
(15) |
|
28
(11) |
29
(12) |
30
(12) |
31
(15) |
|
|
|
|
From: <js...@ac...> - 2007-10-11 15:07:26
|
Nightly build on minnie ( SuSE 10.0, ppc32 ) started at 2007-10-11 09:00:02 BST 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 == 220 tests, 10 stderr failures, 6 stdout failures, 0 posttest failures == memcheck/tests/leak-tree (stderr) memcheck/tests/leakotron (stdout) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/xml1 (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-fp (stderr) none/tests/ppc32/round (stdout) none/tests/ppc32/round (stderr) none/tests/ppc32/test_fx (stdout) none/tests/ppc32/test_fx (stderr) none/tests/ppc32/test_gx (stdout) |
|
From: <sv...@va...> - 2007-10-11 08:46:58
|
Author: njn
Date: 2007-10-11 09:46:56 +0100 (Thu, 11 Oct 2007)
New Revision: 6983
Log:
- Make alloc-fn handling more efficient.
- Correct times for prior invocations of 'many-xpts'.
Removed:
branches/MASSIF2/massif/tests/deep-E.post.exp
branches/MASSIF2/massif/tests/deep-E.stderr.exp
branches/MASSIF2/massif/tests/deep-E.vgtest
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/tests/Makefile.am
branches/MASSIF2/massif/tests/alloc-fns-B.post.exp
branches/MASSIF2/massif/tests/alloc-fns-B.vgtest
branches/MASSIF2/massif/tests/deep-B.post.exp
branches/MASSIF2/massif/tests/deep-B.stderr.exp
branches/MASSIF2/massif/tests/deep-B.vgtest
branches/MASSIF2/massif/tests/deep-C.post.exp
branches/MASSIF2/massif/tests/deep-C.stderr.exp
branches/MASSIF2/massif/tests/deep-C.vgtest
branches/MASSIF2/massif/tests/deep-D.post.exp
branches/MASSIF2/massif/tests/deep-D.vgtest
branches/MASSIF2/massif/tests/deep.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 08:46:56 UTC (rev 6983)
@@ -30,6 +30,30 @@
//---------------------------------------------------------------------------
// XXX:
//---------------------------------------------------------------------------
+// Performance:
+//
+// perl perf/vg_perf --tools=massif --reps=3 perf/{heap,tinycc} massif
+//
+// The other benchmarks don't do much allocation, and so give similar speeds
+// to Nulgrind.
+//
+// Initial slowdown (r6976 + r6979):
+// heap 0.24s ma:26.7s (111.4x, -----)
+// tinycc 0.44s ma:10.7s (24.4x, -----)
+// many-xpts 0.11s ma:32.8s (298.0x, -----)
+//
+// Changed alloc_fns from an OSet to an XArray (r6981):
+// heap 0.24s ma:19.4s (80.6x, -----)
+// tinycc 0.49s ma: 7.8s (16.0x, -----)
+// many-xpts 0.12s ma:26.8s (223.4x, -----)
+//
+// Changed get_IPs so that all alloc_fns in a chain must be mentioned, not
+// just the bottom one, greatly reducing the number of calls to is_alloc_fn
+// (r6983):
+// heap 0.24s ma:18.8s (78.5x, -----)
+// tinycc 0.45s ma: 7.4s (16.4x, -----)
+// many-xpts 0.05s ma:23.5s (470.6x, -----)
+//
// Todo:
// - do snapshots on client requests
// - C++ tests -- for each of the allocators, and overloaded versions of
@@ -121,12 +145,6 @@
// - allow the output file name to be changed
//
// Docs:
-// - need to explain that --alloc-fn changed slightly -- now if an entry
-// matches an alloc-fn, that entry *and all above it* are removed. So you
-// can cut out allc-fn chains at the bottom, rather than having to name
-// all of them, which is better.
-// - Mention that the C++ overloadable new/new[] operators aren't include in
-// alloc-fns by default.
// - Mention that complex functions names are best protected with single
// quotes, eg:
// --alloc-fn='operator new(unsigned, std::nothrow_t const&)'
@@ -143,25 +161,6 @@
// Tests:
// - tests/overloaded_new.cpp is there
//
-// Performance:
-//
-// perl perf/vg_perf --tools=massif --reps=3 perf/{bz2,heap,tinycc} massif
-//
-// The other benchmarks don't do much allocation, and so give similar speeds
-// to Nulgrind.
-//
-// Initial slowdown:
-// bz2 1.18s ma: 5.3s ( 4.5x, -----)
-// heap 0.24s ma:26.7s (111.4x, -----)
-// tinycc 0.44s ma:10.7s (24.4x, -----)
-// many-xpts 0.11s ma:32.8s (298.0x, -----)
-//
-// Changed alloc_fns from an OSet to an XArray:
-// bz2 1.20s ma: 5.4s ( 4.5x, -----)
-// heap 0.24s ma:19.4s (80.6x, -----)
-// tinycc 0.49s ma: 7.8s (16.0x, -----)
-// many-xpts 0.12s ma:11.2s (93.3x, -----)
-//
//---------------------------------------------------------------------------
#include "pub_tool_basics.h"
@@ -686,7 +685,7 @@
{
#define BUF_LEN 1024
Char buf[BUF_LEN];
- Int n_ips, i, n_alloc_fns_removed = 0;
+ Int n_ips, i, n_alloc_fns_removed;
Int overestimate;
Bool fewer_IPs_than_asked_for = False;
Bool removed_below_main = False;
@@ -730,30 +729,35 @@
fewer_IPs_than_asked_for = True;
}
- // Filter uninteresting entries out of the stack trace. n_ips is
- // updated accordingly.
- for (i = n_ips-1; i >= 0; i--) {
- if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
-
- // If it's a main-or-below-main function, we (may) want to
- // ignore everything after it.
- // If we see one of these functions, redo=False.
- if (should_hide_below_main && is_main_or_below_main(buf)) {
- n_ips = i+1; // Ignore everything below here.
- removed_below_main = True;
+ // Filter out entries that are below main, if necessary.
+ // XXX: stats -- should record how often this happens.
+ if (should_hide_below_main) {
+ for (i = n_ips-1; i >= 0; i--) {
+ if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
+ if (VG_STREQ(buf, "main")) {
+ // We found main. Ignore everything below it, and stop
+ // looking. redo=False.
+ n_ips = i+1;
+ removed_below_main = True;
+ break;
+ } else if (VG_STREQ(buf, "(below main)")) {
+ // We found "(below main)". Ignore everything below it,
+ // but keep looking. redo=False.
+ n_ips = i+1;
+ removed_below_main = True;
+ }
}
+ }
+ }
- // If it's an alloc-fn, we want to delete it and everything
- // before it.
+ // Filter out alloc fns.
+ n_alloc_fns_removed = 0;
+ for (i = 0; i < n_ips; i++) {
+ if (VG_(get_fnname)(ips[i], buf, BUF_LEN)) {
+ // If it's an alloc-fn, we ignore it.
if (is_alloc_fn(buf)) {
- Int j;
- n_alloc_fns_removed = i+1;
-
- // Shuffle the rest down.
- for (j = 0; j < n_ips; j++) {
- ips[j] = ips[j + n_alloc_fns_removed];
- }
- n_ips -= n_alloc_fns_removed;
+ n_alloc_fns_removed++;
+ } else {
break;
}
}
@@ -775,6 +779,12 @@
}
}
+ // Ignore the alloc fns; shuffle the rest down.
+ n_ips -= n_alloc_fns_removed;
+ for (i = 0; i < n_ips; i++) {
+ ips[i] = ips[i + n_alloc_fns_removed];
+ }
+
// Did we get enough IPs after filtering? If so, redo=False.
if (n_ips >= clo_depth) {
n_ips = clo_depth; // Ignore any IPs below --depth.
Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/Makefile.am 2007-10-11 08:46:56 UTC (rev 6983)
@@ -13,7 +13,6 @@
deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \
deep-D.post.exp deep-D.stderr.exp deep-D.vgtest \
- deep-E.post.exp deep-E.stderr.exp deep-E.vgtest \
culling1.stderr.exp culling1.vgtest \
culling2.stderr.exp culling2.vgtest \
custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest
Modified: branches/MASSIF2/massif/tests/alloc-fns-B.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/alloc-fns-B.post.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/alloc-fns-B.post.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./alloc-fns
-Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b3 --alloc-fn=c2 --alloc-fn=d1 --alloc-fn=d3
+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
ms_print arguments: massif.out
--------------------------------------------------------------------------------
@@ -63,11 +63,9 @@
|
->11.11% (100B) 0x8048546: main (alloc-fns.c:30)
|
-->11.11% (100B) 0x80484C4: d2 (alloc-fns.c:20)
-| ->11.11% (100B) 0x8048553: main (alloc-fns.c:31)
-|
+->11.11% (100B) 0x8048553: main (alloc-fns.c:31)
+|
->11.11% (100B) 0x8048560: main (alloc-fns.c:32)
|
-->11.11% (100B) 0x8048498: d4 (alloc-fns.c:18)
- ->11.11% (100B) 0x804856D: main (alloc-fns.c:33)
-
+->11.11% (100B) 0x804856D: main (alloc-fns.c:33)
+
Modified: branches/MASSIF2/massif/tests/alloc-fns-B.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/alloc-fns-B.vgtest 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/alloc-fns-B.vgtest 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,6 +1,4 @@
prog: alloc-fns
-# We deliberately do d1 and d3 as alloc-fns, so we can test calling into the
-# middle of a chain of functions above and below some alloc-fns.
-vgopts: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b3 --alloc-fn=c2 --alloc-fn=d1 --alloc-fn=d3
+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
post: perl ../../massif/ms_print massif.out
cleanup: rm massif.out
Modified: branches/MASSIF2/massif/tests/deep-B.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-B.post.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-B.post.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6
+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
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/deep-B.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-B.stderr.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-B.stderr.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -14,6 +14,12 @@
Massif: 12: operator new(unsigned long, std::nothrow_t const&)
Massif: 13: operator new[](unsigned long, std::nothrow_t const&)
Massif: 14: a6
+Massif: 15: a7
+Massif: 16: a8
+Massif: 17: a9
+Massif: 18: a10
+Massif: 19: a11
+Massif: 20: a12
Massif: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:108, hp:100, ad:8, st:0)
Massif: alloc S. 2 (t:216, hp:200, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/deep-B.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/deep-B.vgtest 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-B.vgtest 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,5 +1,5 @@
prog: deep
-vgopts: --stacks=no --time-unit=B --alloc-fn=a6 -v
+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
stderr_filter: filter_verbose
post: perl ../../massif/ms_print massif.out
cleanup: rm massif.out
Modified: branches/MASSIF2/massif/tests/deep-C.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-C.post.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-C.post.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3
+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
ms_print arguments: massif.out
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/deep-C.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-C.stderr.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-C.stderr.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -14,6 +14,15 @@
Massif: 12: operator new(unsigned long, std::nothrow_t const&)
Massif: 13: operator new[](unsigned long, std::nothrow_t const&)
Massif: 14: a3
+Massif: 15: a4
+Massif: 16: a5
+Massif: 17: a6
+Massif: 18: a7
+Massif: 19: a8
+Massif: 20: a9
+Massif: 21: a10
+Massif: 22: a11
+Massif: 23: a12
Massif: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:108, hp:100, ad:8, st:0)
Massif: alloc S. 2 (t:216, hp:200, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/deep-C.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/deep-C.vgtest 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-C.vgtest 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,5 +1,5 @@
prog: deep
-vgopts: --stacks=no --time-unit=B --alloc-fn=a3 -v
+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
stderr_filter: filter_verbose
post: perl ../../massif/ms_print massif.out
cleanup: rm massif.out
Modified: branches/MASSIF2/massif/tests/deep-D.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-D.post.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-D.post.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,6 +1,6 @@
--------------------------------------------------------------------------------
Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=main
+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
ms_print arguments: massif.out
--------------------------------------------------------------------------------
@@ -45,15 +45,7 @@
8 864 864 800 64 0
9 972 972 900 72 0
92.59% (900B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-->92.59% (900B) 0x804838D: a12 (deep.c:18)
- ->92.59% (900B) 0x80483A3: a11 (deep.c:19)
- ->92.59% (900B) 0x80483B9: a10 (deep.c:20)
- ->92.59% (900B) 0x80483CF: a9 (deep.c:21)
- ->92.59% (900B) 0x80483E5: a8 (deep.c:22)
- ->92.59% (900B) 0x80483FB: a7 (deep.c:23)
- ->92.59% (900B) 0x8048411: a6 (deep.c:24)
- ->92.59% (900B) 0x8048427: a5 (deep.c:25)
-
+
--------------------------------------------------------------------------------
n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
--------------------------------------------------------------------------------
Modified: branches/MASSIF2/massif/tests/deep-D.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/deep-D.vgtest 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-D.vgtest 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,4 +1,4 @@
prog: deep
-vgopts: --stacks=no --time-unit=B --alloc-fn=main
+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
post: perl ../../massif/ms_print massif.out
cleanup: rm massif.out
Deleted: branches/MASSIF2/massif/tests/deep-E.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-E.post.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-E.post.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,52 +0,0 @@
---------------------------------------------------------------------------------
-Command: ./deep
-Massif arguments: --stacks=no --time-unit=B --alloc-fn=main --depth=20
-ms_print arguments: massif.out
---------------------------------------------------------------------------------
-
-
- KB
-1.055^ :
- | :
- | @ :
- | @ :
- | : @ :
- | : @ :
- | : : @ :
- | : : @ :
- | : : : @ :
- | : : : @ :
- | : : : : @ :
- | : : : : @ :
- | : : : : : @ :
- | : : : : : @ :
- | : : : : : : @ :
- | : : : : : : @ :
- | : : : : : : : @ :
- | : : : : : : : @ :
- | : : : : : : : : @ :
- | : : : : : : : : @ :
- 0 +----------------------------------------------------------------@------>KB
- 0 1.055
-
-Number of snapshots: 11
- Detailed snapshots: [9]
---------------------------------------------------------------------------------
- n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
---------------------------------------------------------------------------------
- 0 0 0 0 0 0
- 1 108 108 100 8 0
- 2 216 216 200 16 0
- 3 324 324 300 24 0
- 4 432 432 400 32 0
- 5 540 540 500 40 0
- 6 648 648 600 48 0
- 7 756 756 700 56 0
- 8 864 864 800 64 0
- 9 972 972 900 72 0
-92.59% (900B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
-
---------------------------------------------------------------------------------
- n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
---------------------------------------------------------------------------------
- 10 1,080 1,080 1,000 80 0
Deleted: branches/MASSIF2/massif/tests/deep-E.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-E.stderr.exp 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-E.stderr.exp 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,2 +0,0 @@
-
-
Deleted: branches/MASSIF2/massif/tests/deep-E.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/deep-E.vgtest 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep-E.vgtest 2007-10-11 08:46:56 UTC (rev 6983)
@@ -1,4 +0,0 @@
-prog: deep
-vgopts: --stacks=no --time-unit=B --alloc-fn=main --depth=20
-post: perl ../../massif/ms_print massif.out
-cleanup: rm massif.out
Modified: branches/MASSIF2/massif/tests/deep.c
===================================================================
--- branches/MASSIF2/massif/tests/deep.c 2007-10-11 07:42:18 UTC (rev 6982)
+++ branches/MASSIF2/massif/tests/deep.c 2007-10-11 08:46:56 UTC (rev 6983)
@@ -2,16 +2,14 @@
//
// - In deep-A.vgtest, the stack trace is larger than the asked-for depth
// (12 vs. 8) so not all of the trace is shown.
-// - In deep-B.vgtest, we have --alloc-fn=a6, which means that get_XCon
+// - In deep-B.vgtest, we have --alloc-fn=a6..a12, which means that get_XCon
// needs to redo the IP getting, because 7 functions get removed from the
// trace, which is more than the initial overestimate of 3.
-// - In deep-C.vgtest, we have --alloc-fn=a3, which means that get_XCon
+// - In deep-C.vgtest, we have --alloc-fn=a3..a12, which means that get_XCon
// ends up with an empty stack trace after removing all the alloc-fns.
// It then redoes it.
-// - In deep-D.vgtest, we have --alloc-fn=main. It would be an empty stack
-// trace, except the default depth doesn't get us down to 'main'.
-// - In deep-E.vgtest, we have --alloc-fn=main --depth=20, which means that
-// we have an empty stack trace. That's ok.
+// - In deep-D.vgtest, we have --alloc-fn=main..a12, which means we have an empty
+// stack trace. That's ok.
#include <stdlib.h>
|
|
From: <sv...@va...> - 2007-10-11 07:42:18
|
Author: njn
Date: 2007-10-11 08:42:18 +0100 (Thu, 11 Oct 2007)
New Revision: 6982
Log:
wibble
Modified:
branches/MASSIF2/massif/ms_main.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-11 07:40:10 UTC (rev 6981)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 07:42:18 UTC (rev 6982)
@@ -1941,7 +1941,6 @@
// Print alloc-fns, if necessary.
if (VG_(clo_verbosity) > 1) {
- i = 1;
VERB(1, "alloc-fns:");
for (i = 0; i < VG_(sizeXA)(alloc_fns); i++) {
Char** alloc_fn_ptr = VG_(indexXA)(alloc_fns, i);
|
|
From: <sv...@va...> - 2007-10-11 07:40:11
|
Author: njn
Date: 2007-10-11 08:40:10 +0100 (Thu, 11 Oct 2007)
New Revision: 6981
Log:
Changed alloc_fns from an OSet to an XArray. Way faster because the main
operation is iteration over it, for which OSets are quite slow. Speeds up
'heap' by 1.4x, and 'many-xpts' by almost 3x.
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/tests/culling1.stderr.exp
branches/MASSIF2/massif/tests/culling2.stderr.exp
branches/MASSIF2/massif/tests/deep-B.stderr.exp
branches/MASSIF2/massif/tests/deep-C.stderr.exp
branches/MASSIF2/massif/tests/realloc.stderr.exp
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 07:40:10 UTC (rev 6981)
@@ -85,7 +85,7 @@
// 142197 nor massif tool ignores --massif:alloc-fn parameters in .valg...
// - fixed in trunk
// 142491 nor Maximise use of alloc_fns array
-// - addressed, it's now an OSet and thus unlimited in size
+// - addressed, it's now an XArray and thus unlimited in size
// 144453 (get_XCon): Assertion 'xpt->max_children != 0' failed.
// - relevant code now gone
//
@@ -156,6 +156,12 @@
// tinycc 0.44s ma:10.7s (24.4x, -----)
// many-xpts 0.11s ma:32.8s (298.0x, -----)
//
+// Changed alloc_fns from an OSet to an XArray:
+// bz2 1.20s ma: 5.4s ( 4.5x, -----)
+// heap 0.24s ma:19.4s (80.6x, -----)
+// tinycc 0.49s ma: 7.8s (16.0x, -----)
+// many-xpts 0.12s ma:11.2s (93.3x, -----)
+//
//---------------------------------------------------------------------------
#include "pub_tool_basics.h"
@@ -171,7 +177,6 @@
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h"
#include "pub_tool_options.h"
-#include "pub_tool_oset.h"
#include "pub_tool_replacemalloc.h"
#include "pub_tool_stacktrace.h"
#include "pub_tool_tooliface.h"
@@ -288,44 +293,51 @@
//--- Alloc fns ---//
//------------------------------------------------------------//
-OSet* alloc_fns;
+static XArray* alloc_fns;
static void init_alloc_fns(void)
{
- // Create the OSet, and add the default elements.
- alloc_fns = VG_(OSetWord_Create)(VG_(malloc), VG_(free));
- #define DO(x) VG_(OSetWord_Insert)(alloc_fns, (Word)x);
- DO("malloc" );
- DO("calloc" );
- DO("realloc" );
- DO("memalign" );
- DO("__builtin_new" );
- DO("__builtin_vec_new");
- // The following C++ allocators are overloadable. It's conceivable that
- // someone would want to not consider them as allocators, in order to see
- // what's happening beneath them. But if they're not in alloc_fns, then
- // when they're not overloaded they won't be seen as alloc-fns, which
- // will screw things up. So we always consider them to be, and tough
- // luck for anyone who wants to see inside them.
- DO("operator new(unsigned)");
- DO("operator new[](unsigned)");
- DO("operator new(unsigned long)");
- DO("operator new[](unsigned long)");
- DO("operator new(unsigned, std::nothrow_t const&)");
- DO("operator new[](unsigned, std::nothrow_t const&)");
- DO("operator new(unsigned long, std::nothrow_t const&)");
+ // Create the list, and add the default elements.
+ alloc_fns = VG_(newXA)(VG_(malloc), VG_(free), sizeof(Char*));
+ #define DO(x) { Char* s = x; VG_(addToXA)(alloc_fns, &s); }
+
+ // Ordered according to (presumed) frequency.
+ // Nb: The C++ "operator new*" ones are overloadable. It's conceivable
+ // that someone would want to not consider them as allocators, in order
+ // to see what's happening beneath them. But if they're not in
+ // alloc_fns, then when they're not overloaded they won't be seen as
+ // alloc-fns, which will screw things up. So we always consider them to
+ // be, and tough luck for anyone who wants to see inside them.
+ // XXX: not actually necessarily true with the new (ie. old
+ // Massif1-style) alloc-fn approach.
+ DO("malloc" );
+ DO("__builtin_new" );
+ DO("operator new(unsigned)" );
+ DO("operator new(unsigned long)" );
+ DO("__builtin_vec_new" );
+ DO("operator new[](unsigned)" );
+ DO("operator new[](unsigned long)" );
+ DO("calloc" );
+ DO("realloc" );
+ DO("memalign" );
+ DO("operator new(unsigned, std::nothrow_t const&)" );
+ DO("operator new[](unsigned, std::nothrow_t const&)" );
+ DO("operator new(unsigned long, std::nothrow_t const&)" );
DO("operator new[](unsigned long, std::nothrow_t const&)");
}
static Bool is_alloc_fn(Char* fnname)
{
- Word alloc_fn_word;
-
+ Char** alloc_fn_ptr;
+ Int i;
+
// Nb: It's a linear search through the list, because we're comparing
// strings rather than pointers to strings.
- VG_(OSetWord_ResetIter)(alloc_fns);
- while ( VG_(OSetWord_Next)(alloc_fns, &alloc_fn_word) ) {
- if (VG_STREQ(fnname, (Char*)alloc_fn_word))
+ // 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))
return True;
}
return False;
@@ -381,7 +393,8 @@
else if (VG_CLO_STREQ(arg, "--time-unit=B")) clo_time_unit = TimeB;
else if (VG_CLO_STREQN(11, arg, "--alloc-fn=")) {
- VG_(OSetWord_Insert)(alloc_fns, (Word) & arg[11]);
+ Char* alloc_fn = &arg[11];
+ VG_(addToXA)(alloc_fns, &alloc_fn);
}
else
@@ -1897,7 +1910,6 @@
static void ms_post_clo_init(void)
{
Int i;
- Word alloc_fn_word;
// Check options.
if (clo_heap_admin < 0 || clo_heap_admin > 1024) {
@@ -1931,10 +1943,9 @@
if (VG_(clo_verbosity) > 1) {
i = 1;
VERB(1, "alloc-fns:");
- VG_(OSetWord_ResetIter)(alloc_fns);
- while ( VG_(OSetWord_Next)(alloc_fns, &alloc_fn_word) ) {
- VERB(1, " %d: %s", i, (Char*)alloc_fn_word);
- i++;
+ 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);
}
}
Modified: branches/MASSIF2/massif/tests/culling1.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/tests/culling1.stderr.exp 2007-10-11 07:40:10 UTC (rev 6981)
@@ -1,18 +1,18 @@
Massif: alloc-fns:
-Massif: 1: calloc
-Massif: 2: realloc
-Massif: 3: memalign
-Massif: 4: __builtin_new
-Massif: 5: __builtin_vec_new
-Massif: 6: operator new(unsigned)
-Massif: 7: operator new[](unsigned)
-Massif: 8: operator new(unsigned long)
-Massif: 9: operator new[](unsigned long)
-Massif: 10: malloc
-Massif: 11: operator new(unsigned, std::nothrow_t const&)
-Massif: 12: operator new[](unsigned, std::nothrow_t const&)
-Massif: 13: operator new(unsigned long, std::nothrow_t const&)
-Massif: 14: operator new[](unsigned long, std::nothrow_t const&)
+Massif: 0: malloc
+Massif: 1: __builtin_new
+Massif: 2: operator new(unsigned)
+Massif: 3: operator new(unsigned long)
+Massif: 4: __builtin_vec_new
+Massif: 5: operator new[](unsigned)
+Massif: 6: operator new[](unsigned long)
+Massif: 7: calloc
+Massif: 8: realloc
+Massif: 9: memalign
+Massif: 10: operator new(unsigned, std::nothrow_t const&)
+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: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:18, hp:10, ad:8, st:0)
Massif: alloc S. 2 (t:36, hp:20, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/culling2.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/culling2.stderr.exp 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/tests/culling2.stderr.exp 2007-10-11 07:40:10 UTC (rev 6981)
@@ -1,18 +1,18 @@
Massif: alloc-fns:
-Massif: 1: calloc
-Massif: 2: realloc
-Massif: 3: memalign
-Massif: 4: __builtin_new
-Massif: 5: __builtin_vec_new
-Massif: 6: operator new(unsigned)
-Massif: 7: operator new[](unsigned)
-Massif: 8: operator new(unsigned long)
-Massif: 9: operator new[](unsigned long)
-Massif: 10: malloc
-Massif: 11: operator new(unsigned, std::nothrow_t const&)
-Massif: 12: operator new[](unsigned, std::nothrow_t const&)
-Massif: 13: operator new(unsigned long, std::nothrow_t const&)
-Massif: 14: operator new[](unsigned long, std::nothrow_t const&)
+Massif: 0: malloc
+Massif: 1: __builtin_new
+Massif: 2: operator new(unsigned)
+Massif: 3: operator new(unsigned long)
+Massif: 4: __builtin_vec_new
+Massif: 5: operator new[](unsigned)
+Massif: 6: operator new[](unsigned long)
+Massif: 7: calloc
+Massif: 8: realloc
+Massif: 9: memalign
+Massif: 10: operator new(unsigned, std::nothrow_t const&)
+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: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:8, hp:0, ad:8, st:0)
Massif: alloc S. 2 (t:17, hp:1, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/deep-B.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-B.stderr.exp 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/tests/deep-B.stderr.exp 2007-10-11 07:40:10 UTC (rev 6981)
@@ -1,19 +1,19 @@
Massif: alloc-fns:
-Massif: 1: a6
-Massif: 2: calloc
-Massif: 3: realloc
-Massif: 4: memalign
-Massif: 5: __builtin_new
-Massif: 6: __builtin_vec_new
-Massif: 7: operator new(unsigned)
-Massif: 8: operator new[](unsigned)
-Massif: 9: operator new(unsigned long)
-Massif: 10: operator new[](unsigned long)
-Massif: 11: malloc
-Massif: 12: operator new(unsigned, std::nothrow_t const&)
-Massif: 13: operator new[](unsigned, std::nothrow_t const&)
-Massif: 14: operator new(unsigned long, std::nothrow_t const&)
-Massif: 15: operator new[](unsigned long, std::nothrow_t const&)
+Massif: 0: malloc
+Massif: 1: __builtin_new
+Massif: 2: operator new(unsigned)
+Massif: 3: operator new(unsigned long)
+Massif: 4: __builtin_vec_new
+Massif: 5: operator new[](unsigned)
+Massif: 6: operator new[](unsigned long)
+Massif: 7: calloc
+Massif: 8: realloc
+Massif: 9: memalign
+Massif: 10: operator new(unsigned, std::nothrow_t const&)
+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: 14: a6
Massif: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:108, hp:100, ad:8, st:0)
Massif: alloc S. 2 (t:216, hp:200, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/deep-C.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/deep-C.stderr.exp 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/tests/deep-C.stderr.exp 2007-10-11 07:40:10 UTC (rev 6981)
@@ -1,19 +1,19 @@
Massif: alloc-fns:
-Massif: 1: a3
-Massif: 2: calloc
-Massif: 3: realloc
-Massif: 4: memalign
-Massif: 5: __builtin_new
-Massif: 6: __builtin_vec_new
-Massif: 7: operator new(unsigned)
-Massif: 8: operator new[](unsigned)
-Massif: 9: operator new(unsigned long)
-Massif: 10: operator new[](unsigned long)
-Massif: 11: malloc
-Massif: 12: operator new(unsigned, std::nothrow_t const&)
-Massif: 13: operator new[](unsigned, std::nothrow_t const&)
-Massif: 14: operator new(unsigned long, std::nothrow_t const&)
-Massif: 15: operator new[](unsigned long, std::nothrow_t const&)
+Massif: 0: malloc
+Massif: 1: __builtin_new
+Massif: 2: operator new(unsigned)
+Massif: 3: operator new(unsigned long)
+Massif: 4: __builtin_vec_new
+Massif: 5: operator new[](unsigned)
+Massif: 6: operator new[](unsigned long)
+Massif: 7: calloc
+Massif: 8: realloc
+Massif: 9: memalign
+Massif: 10: operator new(unsigned, std::nothrow_t const&)
+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: 14: a3
Massif: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:108, hp:100, ad:8, st:0)
Massif: alloc S. 2 (t:216, hp:200, ad:16, st:0)
Modified: branches/MASSIF2/massif/tests/realloc.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/realloc.stderr.exp 2007-10-11 07:28:16 UTC (rev 6980)
+++ branches/MASSIF2/massif/tests/realloc.stderr.exp 2007-10-11 07:40:10 UTC (rev 6981)
@@ -1,18 +1,18 @@
Massif: alloc-fns:
-Massif: 1: calloc
-Massif: 2: realloc
-Massif: 3: memalign
-Massif: 4: __builtin_new
-Massif: 5: __builtin_vec_new
-Massif: 6: operator new(unsigned)
-Massif: 7: operator new[](unsigned)
-Massif: 8: operator new(unsigned long)
-Massif: 9: operator new[](unsigned long)
-Massif: 10: malloc
-Massif: 11: operator new(unsigned, std::nothrow_t const&)
-Massif: 12: operator new[](unsigned, std::nothrow_t const&)
-Massif: 13: operator new(unsigned long, std::nothrow_t const&)
-Massif: 14: operator new[](unsigned long, std::nothrow_t const&)
+Massif: 0: malloc
+Massif: 1: __builtin_new
+Massif: 2: operator new(unsigned)
+Massif: 3: operator new(unsigned long)
+Massif: 4: __builtin_vec_new
+Massif: 5: operator new[](unsigned)
+Massif: 6: operator new[](unsigned long)
+Massif: 7: calloc
+Massif: 8: realloc
+Massif: 9: memalign
+Massif: 10: operator new(unsigned, std::nothrow_t const&)
+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: startup S. 0 (t:0, hp:0, ad:0, st:0)
Massif: alloc S. 1 (t:100, hp:100, ad:0, st:0)
Massif: realloc S. 2 (t:100, hp:100, ad:0, st:0)
|
|
From: <sv...@va...> - 2007-10-11 07:28:17
|
Author: njn
Date: 2007-10-11 08:28:16 +0100 (Thu, 11 Oct 2007)
New Revision: 6980
Log:
- Hooked in massif/perf/ properly.
- Made massif/perf/many-xpts.c run for longer.
Modified:
branches/MASSIF2/configure.in
branches/MASSIF2/massif/Makefile.am
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/perf/many-xpts.c
Modified: branches/MASSIF2/configure.in
===================================================================
--- branches/MASSIF2/configure.in 2007-10-11 07:11:24 UTC (rev 6979)
+++ branches/MASSIF2/configure.in 2007-10-11 07:28:16 UTC (rev 6980)
@@ -941,6 +941,7 @@
massif/Makefile
massif/hp2ps/Makefile
massif/tests/Makefile
+ massif/perf/Makefile
massif/docs/Makefile
lackey/Makefile
lackey/tests/Makefile
Modified: branches/MASSIF2/massif/Makefile.am
===================================================================
--- branches/MASSIF2/massif/Makefile.am 2007-10-11 07:11:24 UTC (rev 6979)
+++ branches/MASSIF2/massif/Makefile.am 2007-10-11 07:28:16 UTC (rev 6980)
@@ -1,6 +1,6 @@
include $(top_srcdir)/Makefile.tool.am
-SUBDIRS += hp2ps
+SUBDIRS += perf hp2ps
noinst_PROGRAMS =
if VGP_X86_LINUX
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-11 07:11:24 UTC (rev 6979)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 07:28:16 UTC (rev 6980)
@@ -145,17 +145,17 @@
//
// Performance:
//
-// perl perf/vg_perf --tools=massif --reps=3 perf/{bz2,heap,tinycc}
+// perl perf/vg_perf --tools=massif --reps=3 perf/{bz2,heap,tinycc} massif
//
// The other benchmarks don't do much allocation, and so give similar speeds
// to Nulgrind.
//
// Initial slowdown:
-// bz2 massif1 :1.18s ma: 5.3s ( 4.5x, -----)
-// heap massif1 :0.24s ma:26.7s (111.4x, -----)
-// tinycc massif1 :0.44s ma:10.7s (24.4x, -----)
+// bz2 1.18s ma: 5.3s ( 4.5x, -----)
+// heap 0.24s ma:26.7s (111.4x, -----)
+// tinycc 0.44s ma:10.7s (24.4x, -----)
+// many-xpts 0.11s ma:32.8s (298.0x, -----)
//
-//
//---------------------------------------------------------------------------
#include "pub_tool_basics.h"
Modified: branches/MASSIF2/massif/perf/many-xpts.c
===================================================================
--- branches/MASSIF2/massif/perf/many-xpts.c 2007-10-11 07:11:24 UTC (rev 6979)
+++ branches/MASSIF2/massif/perf/many-xpts.c 2007-10-11 07:28:16 UTC (rev 6980)
@@ -38,8 +38,14 @@
{
int i;
+ // Create a large XTree.
for (i = 0; i < (1 << 18); i++)
a0(i);
+ // Do a lot of allocations so it gets dup'd a lot of times.
+ for (i = 0; i < 3000; i++) {
+ free(malloc(20000));
+ }
+
return 0;
}
|
|
From: <sv...@va...> - 2007-10-11 07:11:24
|
Author: njn
Date: 2007-10-11 08:11:24 +0100 (Thu, 11 Oct 2007)
New Revision: 6979
Log:
Add a Massif-specific performance test.
Added:
branches/MASSIF2/massif/perf/
branches/MASSIF2/massif/perf/Makefile.am
branches/MASSIF2/massif/perf/many-xpts.c
branches/MASSIF2/massif/perf/many-xpts.vgperf
Added: branches/MASSIF2/massif/perf/Makefile.am
===================================================================
--- branches/MASSIF2/massif/perf/Makefile.am (rev 0)
+++ branches/MASSIF2/massif/perf/Makefile.am 2007-10-11 07:11:24 UTC (rev 6979)
@@ -0,0 +1,13 @@
+
+# For AM_FLAG_M3264_PRI
+include $(top_srcdir)/Makefile.flags.am
+
+EXTRA_DIST = $(noinst_SCRIPTS) \
+ many-xpts.vgperf
+
+check_PROGRAMS = \
+ many-xpts
+
+AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -O $(AM_FLAG_M3264_PRI)
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CXXFLAGS = $(AM_CFLAGS)
Added: branches/MASSIF2/massif/perf/many-xpts.c
===================================================================
--- branches/MASSIF2/massif/perf/many-xpts.c (rev 0)
+++ branches/MASSIF2/massif/perf/many-xpts.c 2007-10-11 07:11:24 UTC (rev 6979)
@@ -0,0 +1,45 @@
+#include <stdlib.h>
+
+#define nth_bit(x, n) ((x >> n) & 1)
+#define Fn(N, Np1) \
+ void a##N(int x) { if (nth_bit(x, N)) a##Np1(x); else a##Np1(x); }
+
+// This test allocates a lot of heap memory, and every allocation features a
+// different stack trace -- the stack traces are effectively a
+// representation of the number 'i', where each function represents a bit in
+// 'i', and if it's a 1 the first function is called, and if it's a 0 the
+// second function is called.
+
+void a999(int x)
+{
+ malloc(100);
+}
+
+Fn(17, 999)
+Fn(16, 17)
+Fn(15, 16)
+Fn(14, 15)
+Fn(13, 14)
+Fn(12, 13)
+Fn(11, 12)
+Fn(10, 11)
+Fn( 9, 10)
+Fn( 8, 9)
+Fn( 7, 8)
+Fn( 6, 7)
+Fn( 5, 6)
+Fn( 4, 5)
+Fn( 3, 4)
+Fn( 2, 3)
+Fn( 1, 2)
+Fn( 0, 1)
+
+int main(void)
+{
+ int i;
+
+ for (i = 0; i < (1 << 18); i++)
+ a0(i);
+
+ return 0;
+}
Added: branches/MASSIF2/massif/perf/many-xpts.vgperf
===================================================================
--- branches/MASSIF2/massif/perf/many-xpts.vgperf (rev 0)
+++ branches/MASSIF2/massif/perf/many-xpts.vgperf 2007-10-11 07:11:24 UTC (rev 6979)
@@ -0,0 +1,2 @@
+prog: many-xpts
+vgopts: --tool=massif --time-unit=B --depth=100
|
|
From: <sv...@va...> - 2007-10-11 06:51:45
|
Author: njn
Date: 2007-10-11 07:51:47 +0100 (Thu, 11 Oct 2007)
New Revision: 6978
Log:
Fix an overflow bug in threshold testing. Add a test for it.
Added:
branches/MASSIF2/massif/tests/big-alloc.c
branches/MASSIF2/massif/tests/big-alloc.post.exp
branches/MASSIF2/massif/tests/big-alloc.stderr.exp
branches/MASSIF2/massif/tests/big-alloc.vgtest
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/tests/Makefile.am
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-11 06:37:07 UTC (rev 6977)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 06:51:47 UTC (rev 6978)
@@ -1698,7 +1698,8 @@
tl_assert(xpt->curr_szB <= curr_total_szB);
return xpt == alloc_xpt || 0 == clo_threshold ||
(0 != curr_total_szB &&
- xpt->curr_szB * 10000 / curr_total_szB >= clo_threshold);
+ // Nb: 10000 is a ULong to avoid possible overflow problems.
+ xpt->curr_szB * 10000ULL / curr_total_szB >= clo_threshold);
}
static void pp_snapshot_XPt(Int fd, XPt* xpt, Int depth, Char* depth_str,
Modified: branches/MASSIF2/massif/tests/Makefile.am
===================================================================
--- branches/MASSIF2/massif/tests/Makefile.am 2007-10-11 06:37:07 UTC (rev 6977)
+++ branches/MASSIF2/massif/tests/Makefile.am 2007-10-11 06:51:47 UTC (rev 6978)
@@ -8,6 +8,7 @@
alloc-fns-A.post.exp alloc-fns-A.stderr.exp alloc-fns-A.vgtest \
alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \
basic.post.exp basic.stderr.exp basic.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 \
deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \
@@ -43,6 +44,7 @@
check_PROGRAMS = \
alloc-fns \
basic \
+ big-alloc \
culling1 culling2 \
custom_alloc \
deep \
Added: branches/MASSIF2/massif/tests/big-alloc.c
===================================================================
--- branches/MASSIF2/massif/tests/big-alloc.c (rev 0)
+++ branches/MASSIF2/massif/tests/big-alloc.c 2007-10-11 06:51:47 UTC (rev 6978)
@@ -0,0 +1,17 @@
+#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.
+
+int main(void)
+{
+ // 100MB all up.
+ int i;
+ for (i = 0; i < 10; i++) {
+ malloc(10 * 1024 * 1024);
+ }
+
+ return 0;
+}
Added: branches/MASSIF2/massif/tests/big-alloc.post.exp
===================================================================
--- branches/MASSIF2/massif/tests/big-alloc.post.exp (rev 0)
+++ branches/MASSIF2/massif/tests/big-alloc.post.exp 2007-10-11 06:51:47 UTC (rev 6978)
@@ -0,0 +1,53 @@
+--------------------------------------------------------------------------------
+Command: ./big-alloc
+Massif arguments: --stacks=no --time-unit=B
+ms_print arguments: massif.out
+--------------------------------------------------------------------------------
+
+
+ MB
+100.0^ :
+ | :
+ | @ :
+ | @ :
+ | : @ :
+ | : @ :
+ | : : @ :
+ | : : @ :
+ | : : : @ :
+ | : : : @ :
+ | : : : : @ :
+ | : : : : @ :
+ | : : : : : @ :
+ | : : : : : @ :
+ | : : : : : : @ :
+ | : : : : : : @ :
+ | : : : : : : : @ :
+ | : : : : : : : @ :
+ | : : : : : : : : @ :
+ | : : : : : : : : @ :
+ 0 +----------------------------------------------------------------@------>MB
+ 0 100.0
+
+Number of snapshots: 11
+ Detailed snapshots: [9]
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 0 0 0 0 0 0
+ 1 10,485,768 10,485,768 10,485,760 8 0
+ 2 20,971,536 20,971,536 20,971,520 16 0
+ 3 31,457,304 31,457,304 31,457,280 24 0
+ 4 41,943,072 41,943,072 41,943,040 32 0
+ 5 52,428,840 52,428,840 52,428,800 40 0
+ 6 62,914,608 62,914,608 62,914,560 48 0
+ 7 73,400,376 73,400,376 73,400,320 56 0
+ 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% (94371840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
+->100.00% (94371840B) 0x80483AD: main (big-alloc.c:13)
+
+--------------------------------------------------------------------------------
+ n time(B) total(B) useful-heap(B) admin-heap(B) stacks(B)
+--------------------------------------------------------------------------------
+ 10 104,857,680 104,857,680 104,857,600 80 0
Added: branches/MASSIF2/massif/tests/big-alloc.stderr.exp
===================================================================
--- branches/MASSIF2/massif/tests/big-alloc.stderr.exp (rev 0)
+++ branches/MASSIF2/massif/tests/big-alloc.stderr.exp 2007-10-11 06:51:47 UTC (rev 6978)
@@ -0,0 +1,2 @@
+
+
Added: branches/MASSIF2/massif/tests/big-alloc.vgtest
===================================================================
--- branches/MASSIF2/massif/tests/big-alloc.vgtest (rev 0)
+++ branches/MASSIF2/massif/tests/big-alloc.vgtest 2007-10-11 06:51:47 UTC (rev 6978)
@@ -0,0 +1,4 @@
+prog: big-alloc
+vgopts: --stacks=no --time-unit=B
+post: perl ../../massif/ms_print massif.out
+cleanup: rm massif.out
|
|
From: <sv...@va...> - 2007-10-11 06:37:06
|
Author: njn Date: 2007-10-11 07:37:07 +0100 (Thu, 11 Oct 2007) New Revision: 6977 Log: comment Modified: branches/MASSIF2/massif/ms_print Modified: branches/MASSIF2/massif/ms_print =================================================================== --- branches/MASSIF2/massif/ms_print 2007-10-11 06:00:18 UTC (rev 6976) +++ branches/MASSIF2/massif/ms_print 2007-10-11 06:37:07 UTC (rev 6977) @@ -30,6 +30,8 @@ use warnings; use strict; +# XXX: put commas in sizes in heap trees? + #---------------------------------------------------------------------------- # Global variables, main data structures #---------------------------------------------------------------------------- |
|
From: <sv...@va...> - 2007-10-11 06:00:21
|
Author: njn
Date: 2007-10-11 07:00:18 +0100 (Thu, 11 Oct 2007)
New Revision: 6976
Log:
- remove an out-of-date comment
- add first performance figures
Modified:
branches/MASSIF2/massif/ms_main.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-10 07:08:27 UTC (rev 6975)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-11 06:00:18 UTC (rev 6976)
@@ -44,7 +44,6 @@
// - do a graph-drawing test
// - write a good basic test that shows how the tool works, suitable for
// documentation
-// - with --heap=no, --heap-admin still counts. should it?
//
// Possible ideas for the future:
// - Consider 'instructions executed' as a time unit -- more regular than
@@ -144,6 +143,19 @@
// Tests:
// - tests/overloaded_new.cpp is there
//
+// Performance:
+//
+// perl perf/vg_perf --tools=massif --reps=3 perf/{bz2,heap,tinycc}
+//
+// The other benchmarks don't do much allocation, and so give similar speeds
+// to Nulgrind.
+//
+// Initial slowdown:
+// bz2 massif1 :1.18s ma: 5.3s ( 4.5x, -----)
+// heap massif1 :0.24s ma:26.7s (111.4x, -----)
+// tinycc massif1 :0.44s ma:10.7s (24.4x, -----)
+//
+//
//---------------------------------------------------------------------------
#include "pub_tool_basics.h"
|
|
From: Tom H. <th...@cy...> - 2007-10-11 02:31:33
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-11 03:15:02 BST 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 == 260 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-11 02:24:18
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-11 03:05:06 BST 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-11 02:23:34
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-11 03:10:04 BST 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Thu Oct 11 03:16:57 2007 --- new.short Thu Oct 11 03:23:37 2007 *************** *** 8,10 **** ! == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,17 **** none/tests/mremap2 (stdout) - none/tests/pth_detached (stdout) --- 15,16 ---- |
|
From: Tom H. <th...@cy...> - 2007-10-11 02:11:32
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-11 03:00:02 BST 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-10-11 00:16:42
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-11 02:00:01 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |