|
From: <sv...@va...> - 2007-10-16 07:25:53
|
Author: njn
Date: 2007-10-16 08:25:53 +0100 (Tue, 16 Oct 2007)
New Revision: 7001
Log:
Made many-xpts run for longer.
Modified:
branches/MASSIF2/massif/ms_main.c
branches/MASSIF2/massif/perf/many-xpts.c
Modified: branches/MASSIF2/massif/ms_main.c
===================================================================
--- branches/MASSIF2/massif/ms_main.c 2007-10-16 02:48:57 UTC (rev 7000)
+++ branches/MASSIF2/massif/ms_main.c 2007-10-16 07:25:53 UTC (rev 7001)
@@ -60,6 +60,11 @@
// tinycc 0.49s ma: 7.6s (15.4x, -----)
// many-xpts 0.04s ma: 1.9s (46.2x, -----)
//
+// Many many-xpts run for longer (r7001):
+// heap 0.59s ma:20.3s (34.5x, -----)
+// tinycc 0.49s ma: 7.6s (15.4x, -----)
+// many-xpts 0.13s ma: 2.8s (21.6x, -----)
+//
// Todo:
// - for regtests, need to filter out code addresses in *.post.* files
// - do snapshots on client requests
Modified: branches/MASSIF2/massif/perf/many-xpts.c
===================================================================
--- branches/MASSIF2/massif/perf/many-xpts.c 2007-10-16 02:48:57 UTC (rev 7000)
+++ branches/MASSIF2/massif/perf/many-xpts.c 2007-10-16 07:25:53 UTC (rev 7001)
@@ -2,7 +2,7 @@
#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); }
+ void* a##N(int x) { return ( nth_bit(x, N) ? a##Np1(x) : 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
@@ -10,9 +10,9 @@
// '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)
+void* a999(int x)
{
- malloc(100);
+ return malloc(100);
}
Fn(17, 999)
@@ -43,8 +43,9 @@
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));
+ for (i = 0; i < 100000; i++) {
+ free(a1(234));
+ free(a2(111));
}
return 0;
|