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
(9) |
2
(13) |
3
(12) |
4
(4) |
5
(5) |
|
6
(5) |
7
(16) |
8
(9) |
9
(14) |
10
(15) |
11
(7) |
12
(2) |
|
13
(7) |
14
(9) |
15
(8) |
16
(6) |
17
|
18
(2) |
19
(4) |
|
20
|
21
(7) |
22
(12) |
23
(6) |
24
(2) |
25
(3) |
26
(2) |
|
27
(2) |
28
(5) |
29
(7) |
30
(10) |
|
|
|
|
From: <sv...@va...> - 2010-06-09 23:55:35
|
Author: njn
Date: 2010-06-10 00:55:25 +0100 (Thu, 10 Jun 2010)
New Revision: 11168
Log:
Make this test build on 64-bit Mac.
Modified:
branches/MACOSX106/drd/tests/tsan_unittest.cpp
Modified: branches/MACOSX106/drd/tests/tsan_unittest.cpp
===================================================================
--- branches/MACOSX106/drd/tests/tsan_unittest.cpp 2010-06-09 22:33:02 UTC (rev 11167)
+++ branches/MACOSX106/drd/tests/tsan_unittest.cpp 2010-06-09 23:55:25 UTC (rev 11168)
@@ -6620,8 +6620,8 @@
}
usleep(1000);
}
- printf("T=%d: non_zero_received=%d\n",
- (int)pthread_self(), non_zero_received);
+ printf("T=%ld: non_zero_received=%d\n",
+ (size_t)pthread_self(), non_zero_received);
}
void Run() {
|
|
From: <sv...@va...> - 2010-06-09 22:33:11
|
Author: weidendo
Date: 2010-06-09 23:33:02 +0100 (Wed, 09 Jun 2010)
New Revision: 11167
Log:
Callgrind new feature: count global bus lock events "Ge"
To count global bus lock events, use "--collect-bus=yes".
For x86, this will count the number of executed instructions
with a lock prefix; for architectures with LL/SC, this will
count the number of executed SC instructions.
Modified:
trunk/callgrind/clo.c
trunk/callgrind/docs/cl-manual.xml
trunk/callgrind/global.h
trunk/callgrind/main.c
trunk/callgrind/sim.c
Modified: trunk/callgrind/clo.c
===================================================================
--- trunk/callgrind/clo.c 2010-06-09 22:32:58 UTC (rev 11166)
+++ trunk/callgrind/clo.c 2010-06-09 22:33:02 UTC (rev 11167)
@@ -415,6 +415,8 @@
/* compatibility alias, deprecated option */
else if VG_BOOL_CLO(arg, "--trace-jump", CLG_(clo).collect_jumps) {}
+ else if VG_BOOL_CLO(arg, "--collect-bus", CLG_(clo).collect_bus) {}
+
else if VG_BOOL_CLO(arg, "--combine-dumps", CLG_(clo).combine_dumps) {}
else if VG_BOOL_CLO(arg, "--collect-atstart", CLG_(clo).collect_atstart) {}
@@ -572,6 +574,7 @@
" --collect-atstart=no|yes Collect at process/thread start [yes]\n"
" --toggle-collect=<func> Toggle collection on enter/leave function\n"
" --collect-jumps=no|yes Collect jumps? [no]\n"
+" --collect-bus=no|yes Collect global bus events? [no]\n"
#if CLG_EXPERIMENTAL
" --collect-alloc=no|yes Collect memory allocation info? [no]\n"
#endif
Modified: trunk/callgrind/docs/cl-manual.xml
===================================================================
--- trunk/callgrind/docs/cl-manual.xml 2010-06-09 22:32:58 UTC (rev 11166)
+++ trunk/callgrind/docs/cl-manual.xml 2010-06-09 22:33:02 UTC (rev 11167)
@@ -353,11 +353,28 @@
start event collection a few million instructions after you have enabled
instrumentation.</para>
-
</sect2>
+ <sect2 id="cl-manual.busevents" xreflabel="Counting global bus events">
+ <title>Counting global bus events</title>
+ <para>For access to shared data among threads in a multithreaded
+ code, synchronization is required to avoid raced conditions.
+ Synchronization primitives are usually implemented via atomic instructions.
+ However, excessive use of such instructions can lead to performance
+ issues.</para>
+ <para>To enable analysis of this problem, Callgrind optionally can count
+ the number of atomic instructions executed. More precisely, for x86/x86_64,
+ these are instructions using a lock prefix. For architectures supporting
+ LL/SC, these are the number of SC instructions executed. For both, the term
+ "global bus events" is used.</para>
+
+ <para>The short name of the event type used for global bus events is "Ge".
+ To count global bus events, use <option><xref linkend="opt.collect-bus"/></option>.
+ </para>
+ </sect2>
+
<sect2 id="cl-manual.cycles" xreflabel="Avoiding cycles">
<title>Avoiding cycles</title>
@@ -762,6 +779,16 @@
</listitem>
</varlistentry>
+ <varlistentry id="opt.collect-bus" xreflabel="--collect-bus">
+ <term>
+ <option><![CDATA[--collect-bus=<no|yes> [default: no] ]]></option>
+ </term>
+ <listitem>
+ <para>This specifies whether the number of global bus events executed
+ should be collected. The event type "Ge" is used for these events.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<!-- end of xi:include in the manpage -->
</sect2>
Modified: trunk/callgrind/global.h
===================================================================
--- trunk/callgrind/global.h 2010-06-09 22:32:58 UTC (rev 11166)
+++ trunk/callgrind/global.h 2010-06-09 22:33:02 UTC (rev 11167)
@@ -87,6 +87,8 @@
Bool collect_alloc; /* Collect size of allocated memory */
Bool collect_systime; /* Collect time for system calls */
+ Bool collect_bus; /* Collect global bus events */
+
/* Instrument options */
Bool instrument_atstart; /* Instrument at start? */
Bool simulate_cache; /* Call into cache simulator ? */
@@ -679,8 +681,9 @@
#define EG_IR 1
#define EG_DR 2
#define EG_DW 3
-#define EG_ALLOC 4
-#define EG_SYS 5
+#define EG_BUS 4
+#define EG_ALLOC 5
+#define EG_SYS 6
struct event_sets {
EventSet *base, *full;
Modified: trunk/callgrind/main.c
===================================================================
--- trunk/callgrind/main.c 2010-06-09 22:32:58 UTC (rev 11166)
+++ trunk/callgrind/main.c 2010-06-09 22:33:02 UTC (rev 11167)
@@ -95,6 +95,30 @@
/*------------------------------------------------------------*/
+/*--- Simple callbacks (not cache similator) ---*/
+/*------------------------------------------------------------*/
+
+VG_REGPARM(1)
+static void log_global_event(InstrInfo* ii)
+{
+ ULong* cost_Bus;
+
+ CLG_DEBUG(0, "log_global_event: Ir %#lx/%u\n",
+ CLG_(bb_base) + ii->instr_offset, ii->instr_size);
+
+ if (!CLG_(current_state).collect) return;
+
+ CLG_(current_state).cost[ fullOffset(EG_BUS) ]++;
+
+ if (CLG_(current_state).nonskipped)
+ cost_Bus = CLG_(current_state).nonskipped->skipped + fullOffset(EG_BUS);
+ else
+ cost_Bus = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_BUS];
+ cost_Bus[0]++;
+}
+
+
+/*------------------------------------------------------------*/
/*--- Instrumentation structures and event queue handling ---*/
/*------------------------------------------------------------*/
@@ -137,6 +161,7 @@
Ev_Dr, // Data read
Ev_Dw, // Data write
Ev_Dm, // Data modify (read then write)
+ Ev_G // Global bus event
}
EventTag;
@@ -159,6 +184,8 @@
IRAtom* ea;
Int szB;
} Dm;
+ struct {
+ } G;
} Ev;
}
Event;
@@ -242,6 +269,9 @@
ppIRExpr(ev->Ev.Dm.ea);
VG_(printf)("\n");
break;
+ case Ev_G:
+ VG_(printf)("G %p\n", ev->inode);
+ break;
default:
tl_assert(0);
break;
@@ -286,6 +316,11 @@
ev->inode->eventset = CLG_(add_event_group)(ev->inode->eventset,
EG_DW);
break;
+ case Ev_G:
+ // extend event set by Bus counter
+ ev->inode->eventset = CLG_(add_event_group)(ev->inode->eventset,
+ EG_BUS);
+ break;
default:
tl_assert(0);
}
@@ -401,6 +436,14 @@
regparms = 3;
inew = i+1;
break;
+ case Ev_G:
+ /* Global bus event (CAS, LOCK-prefix, LL-SC, etc) */
+ helperName = "log_global_event";
+ helperAddr = &log_global_event;
+ argv = mkIRExprVec_1( i_node_expr );
+ regparms = 1;
+ inew = i+1;
+ break;
default:
tl_assert(0);
}
@@ -505,6 +548,21 @@
clgs->events_used++;
}
+static
+void addEvent_G ( ClgState* clgs, InstrInfo* inode )
+{
+ Event* evt;
+ if (!CLG_(clo).collect_bus) return;
+ if (clgs->events_used == N_EVENTS)
+ flushEvents(clgs);
+ tl_assert(clgs->events_used >= 0 && clgs->events_used < N_EVENTS);
+ evt = &clgs->events[clgs->events_used];
+ init_Event(evt);
+ evt->tag = Ev_G;
+ evt->inode = inode;
+ clgs->events_used++;
+}
+
/* Initialise or check (if already seen before) an InstrInfo for next insn.
We only can set instr_offset/instr_size here. The required event set and
resulting cost offset depend on events (Ir/Dr/Dw/Dm) in guest
@@ -840,6 +898,7 @@
dataSize *= 2; /* since this is a doubleword-cas */
addEvent_Dr( &clgs, curr_inode, dataSize, cas->addr );
addEvent_Dw( &clgs, curr_inode, dataSize, cas->addr );
+ addEvent_G( &clgs, curr_inode );
break;
}
@@ -855,6 +914,12 @@
dataTy = typeOfIRExpr(sbIn->tyenv, st->Ist.LLSC.storedata);
addEvent_Dw( &clgs, curr_inode,
sizeofIRType(dataTy), st->Ist.LLSC.addr );
+ /* I don't know whether the global-bus-lock cost should
+ be attributed to the LL or the SC, but it doesn't
+ really matter since they always have to be used in
+ pairs anyway. Hence put it (quite arbitrarily) on
+ the SC. */
+ addEvent_G( &clgs, curr_inode );
}
break;
}
Modified: trunk/callgrind/sim.c
===================================================================
--- trunk/callgrind/sim.c 2010-06-09 22:32:58 UTC (rev 11166)
+++ trunk/callgrind/sim.c 2010-06-09 22:33:02 UTC (rev 11167)
@@ -1782,6 +1782,9 @@
CLG_(register_event_group4)(EG_DW, "Dw", "D1mw", "D2mw", "I2dmw");
}
+ if (CLG_(clo).collect_bus)
+ CLG_(register_event_group)(EG_BUS, "Ge");
+
if (CLG_(clo).collect_alloc)
CLG_(register_event_group2)(EG_ALLOC, "allocCount", "allocSize");
@@ -1793,6 +1796,7 @@
// event set comprising all event groups, used for inclusive cost
CLG_(sets).full = CLG_(add_event_group2)(CLG_(sets).base, EG_DR, EG_DW);
+ CLG_(sets).full = CLG_(add_event_group) (CLG_(sets).full, EG_BUS);
CLG_(sets).full = CLG_(add_event_group2)(CLG_(sets).full, EG_ALLOC, EG_SYS);
CLG_DEBUGIF(1) {
@@ -1819,6 +1823,7 @@
CLG_(append_event)(CLG_(dumpmap), "SpLoss1");
CLG_(append_event)(CLG_(dumpmap), "AcCost2");
CLG_(append_event)(CLG_(dumpmap), "SpLoss2");
+ CLG_(append_event)(CLG_(dumpmap), "Ge");
CLG_(append_event)(CLG_(dumpmap), "allocCount");
CLG_(append_event)(CLG_(dumpmap), "allocSize");
CLG_(append_event)(CLG_(dumpmap), "sysCount");
@@ -1832,7 +1837,8 @@
{
if (!CLG_(clo).simulate_cache)
cost[ fullOffset(EG_IR) ] += exe_count;
- else
+
+ if (ii->eventset)
CLG_(add_and_zero_cost2)( CLG_(sets).full, cost,
ii->eventset, bbcc->cost + ii->cost_offset);
}
|
|
From: <sv...@va...> - 2010-06-09 22:33:07
|
Author: weidendo
Date: 2010-06-09 23:32:58 +0100 (Wed, 09 Jun 2010)
New Revision: 11166
Log:
Callgrind: make globals for log_* helpers visible outside sim.c
At beginning of each BB, Callgrind inserts a call to setup_bbcc,
which (among a lot other things), sets global vars needed for
the log_* helpers called afterwards in this BB.
These globals, bb_base and cost_base, previously we static declared
and only visible in sim.c. Make them visible also in the rest of
callgrind to allow for log_* handlers outside sim.c.
Modified:
trunk/callgrind/bbcc.c
trunk/callgrind/global.h
trunk/callgrind/sim.c
Modified: trunk/callgrind/bbcc.c
===================================================================
--- trunk/callgrind/bbcc.c 2010-06-09 22:32:53 UTC (rev 11165)
+++ trunk/callgrind/bbcc.c 2010-06-09 22:32:58 UTC (rev 11166)
@@ -864,6 +864,9 @@
}
CLG_(current_state).bbcc = bbcc;
+ // needed for log_* handlers called in this BB
+ CLG_(bb_base) = bb->obj->offset + bb->offset;
+ CLG_(cost_base) = bbcc->cost;
CLG_DEBUGIF(1) {
VG_(printf)(" ");
@@ -878,7 +881,5 @@
CLG_(print_cxt)(-8, CLG_(current_state).cxt, bbcc->rec_index);
CLG_DEBUG(3,"\n");
- (*CLG_(cachesim).after_bbsetup)();
-
CLG_(stat).bb_executions++;
}
Modified: trunk/callgrind/global.h
===================================================================
--- trunk/callgrind/global.h 2010-06-09 22:32:53 UTC (rev 11165)
+++ trunk/callgrind/global.h 2010-06-09 22:32:58 UTC (rev 11166)
@@ -652,7 +652,6 @@
void (*getdesc)(Char* buf);
void (*printstat)(void);
void (*add_icost)(SimCost, BBCC*, InstrInfo*, ULong);
- void (*after_bbsetup)(void);
void (*finish)(void);
void (*log_1I0D)(InstrInfo*) VG_REGPARM(1);
@@ -671,6 +670,10 @@
Char *log_0I1Dr_name, *log_0I1Dw_name;
};
+// set by setup_bbcc at start of every BB, and needed by log_* helpers
+extern Addr CLG_(bb_base);
+extern ULong* CLG_(cost_base);
+
// Event groups
#define EG_USE 0
#define EG_IR 1
Modified: trunk/callgrind/sim.c
===================================================================
--- trunk/callgrind/sim.c 2010-06-09 22:32:53 UTC (rev 11165)
+++ trunk/callgrind/sim.c 2010-06-09 22:32:58 UTC (rev 11166)
@@ -104,16 +104,15 @@
static Bool clo_simulate_sectors = False;
static Bool clo_collect_cacheuse = False;
-/* Following global vars are setup before by
- * setup_bbcc()/cachesim_after_bbsetup():
+/* Following global vars are setup before by setup_bbcc():
*
- * - Addr bb_base (instruction start address of original BB)
- * - ULong* cost_base (start of cost array for BB)
- * - BBCC* nonskipped (only != 0 when in a function not skipped)
+ * - Addr CLG_(bb_base) (instruction start address of original BB)
+ * - ULong* CLG_(cost_base) (start of cost array for BB)
*/
-static Addr bb_base;
-static ULong* cost_base;
+Addr CLG_(bb_base);
+ULong* CLG_(cost_base);
+
static InstrInfo* current_ii;
/* Cache use offsets */
@@ -845,7 +844,7 @@
int i = ((32 - countBits(use->mask)) * L2.line_size)>>5;
CLG_DEBUG(2, " L2.miss [%d]: at %#lx accessing memline %#lx\n",
- idx, bb_base + current_ii->instr_offset, memline);
+ idx, CLG_(bb_base) + current_ii->instr_offset, memline);
if (use->count>0) {
CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %#lx from %#lx]\n",
use->count, i, use->mask, loaded->memline, loaded->iaddr);
@@ -862,10 +861,10 @@
use->mask = 0;
loaded->memline = memline;
- loaded->iaddr = bb_base + current_ii->instr_offset;
+ loaded->iaddr = CLG_(bb_base) + current_ii->instr_offset;
loaded->use_base = (CLG_(current_state).nonskipped) ?
CLG_(current_state).nonskipped->skipped :
- cost_base + current_ii->cost_offset;
+ CLG_(cost_base) + current_ii->cost_offset;
}
static
@@ -933,14 +932,14 @@
int c = ((32 - countBits(use->mask)) * cache->line_size)>>5; \
\
CLG_DEBUG(2, " %s.miss [%d]: at %#lx accessing memline %#lx (mask %08x)\n", \
- cache->name, idx, bb_base + current_ii->instr_offset, memline, mask); \
+ cache->name, idx, CLG_(bb_base) + current_ii->instr_offset, memline, mask); \
if (use->count>0) { \
CLG_DEBUG(2, " old: used %d, loss bits %d (%08x) [line %#lx from %#lx]\n",\
use->count, c, use->mask, loaded->memline, loaded->iaddr); \
CLG_DEBUG(2, " collect: %d, use_base %p\n", \
CLG_(current_state).collect, loaded->use_base); \
\
- if (CLG_(current_state).collect && loaded->use_base) { \
+ if (CLG_(current_state).collect && loaded->use_base) { \
(loaded->use_base)[off_##L##_AcCost] += 1000 / use->count; \
(loaded->use_base)[off_##L##_SpLoss] += c; \
\
@@ -953,10 +952,10 @@
use->count = 1; \
use->mask = mask; \
loaded->memline = memline; \
- loaded->iaddr = bb_base + current_ii->instr_offset; \
- loaded->use_base = (CLG_(current_state).nonskipped) ? \
- CLG_(current_state).nonskipped->skipped : \
- cost_base + current_ii->cost_offset; \
+ loaded->iaddr = CLG_(bb_base) + current_ii->instr_offset; \
+ loaded->use_base = (CLG_(current_state).nonskipped) ? \
+ CLG_(current_state).nonskipped->skipped : \
+ CLG_(cost_base) + current_ii->cost_offset; \
\
if (memline == 0) return L2_Hit; \
return cacheuse_L2_access(memline, loaded); \
@@ -977,9 +976,9 @@
if (!CLG_(current_state).collect) return;
- bb_base = 0;
+ CLG_(bb_base) = 0;
current_ii = ⅈ
- cost_base = 0;
+ CLG_(cost_base) = 0;
/* update usage counters */
if (I1.use)
@@ -1052,10 +1051,10 @@
CacheModelResult IrRes;
current_ii = ii;
- IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
+ IrRes = (*simulator.I1_Read)(CLG_(bb_base) + ii->instr_offset, ii->instr_size);
CLG_DEBUG(6, "log_1I0D: Ir %#lx/%u => %s\n",
- bb_base + ii->instr_offset, ii->instr_size, cacheRes(IrRes));
+ CLG_(bb_base) + ii->instr_offset, ii->instr_size, cacheRes(IrRes));
if (CLG_(current_state).collect) {
ULong* cost_Ir;
@@ -1063,7 +1062,7 @@
if (CLG_(current_state).nonskipped)
cost_Ir = CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
else
- cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
+ cost_Ir = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_IR];
inc_costs(IrRes, cost_Ir,
CLG_(current_state).cost + fullOffset(EG_IR) );
@@ -1077,13 +1076,13 @@
ULong *global_cost_Ir;
current_ii = ii1;
- Ir1Res = (*simulator.I1_Read)(bb_base + ii1->instr_offset, ii1->instr_size);
+ Ir1Res = (*simulator.I1_Read)(CLG_(bb_base) + ii1->instr_offset, ii1->instr_size);
current_ii = ii2;
- Ir2Res = (*simulator.I1_Read)(bb_base + ii2->instr_offset, ii2->instr_size);
+ Ir2Res = (*simulator.I1_Read)(CLG_(bb_base) + ii2->instr_offset, ii2->instr_size);
CLG_DEBUG(6, "log_2I0D: Ir1 %#lx/%u => %s, Ir2 %#lx/%u => %s\n",
- bb_base + ii1->instr_offset, ii1->instr_size, cacheRes(Ir1Res),
- bb_base + ii2->instr_offset, ii2->instr_size, cacheRes(Ir2Res) );
+ CLG_(bb_base) + ii1->instr_offset, ii1->instr_size, cacheRes(Ir1Res),
+ CLG_(bb_base) + ii2->instr_offset, ii2->instr_size, cacheRes(Ir2Res) );
if (!CLG_(current_state).collect) return;
@@ -1098,9 +1097,9 @@
}
inc_costs(Ir1Res, global_cost_Ir,
- cost_base + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
+ CLG_(cost_base) + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
inc_costs(Ir2Res, global_cost_Ir,
- cost_base + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
+ CLG_(cost_base) + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
}
VG_REGPARM(3)
@@ -1110,16 +1109,16 @@
ULong *global_cost_Ir;
current_ii = ii1;
- Ir1Res = (*simulator.I1_Read)(bb_base + ii1->instr_offset, ii1->instr_size);
+ Ir1Res = (*simulator.I1_Read)(CLG_(bb_base) + ii1->instr_offset, ii1->instr_size);
current_ii = ii2;
- Ir2Res = (*simulator.I1_Read)(bb_base + ii2->instr_offset, ii2->instr_size);
+ Ir2Res = (*simulator.I1_Read)(CLG_(bb_base) + ii2->instr_offset, ii2->instr_size);
current_ii = ii3;
- Ir3Res = (*simulator.I1_Read)(bb_base + ii3->instr_offset, ii3->instr_size);
+ Ir3Res = (*simulator.I1_Read)(CLG_(bb_base) + ii3->instr_offset, ii3->instr_size);
CLG_DEBUG(6, "log_3I0D: Ir1 %#lx/%u => %s, Ir2 %#lx/%u => %s, Ir3 %#lx/%u => %s\n",
- bb_base + ii1->instr_offset, ii1->instr_size, cacheRes(Ir1Res),
- bb_base + ii2->instr_offset, ii2->instr_size, cacheRes(Ir2Res),
- bb_base + ii3->instr_offset, ii3->instr_size, cacheRes(Ir3Res) );
+ CLG_(bb_base) + ii1->instr_offset, ii1->instr_size, cacheRes(Ir1Res),
+ CLG_(bb_base) + ii2->instr_offset, ii2->instr_size, cacheRes(Ir2Res),
+ CLG_(bb_base) + ii3->instr_offset, ii3->instr_size, cacheRes(Ir3Res) );
if (!CLG_(current_state).collect) return;
@@ -1134,11 +1133,11 @@
}
inc_costs(Ir1Res, global_cost_Ir,
- cost_base + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
+ CLG_(cost_base) + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
inc_costs(Ir2Res, global_cost_Ir,
- cost_base + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
+ CLG_(cost_base) + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
inc_costs(Ir3Res, global_cost_Ir,
- cost_base + ii3->cost_offset + ii3->eventset->offset[EG_IR]);
+ CLG_(cost_base) + ii3->cost_offset + ii3->eventset->offset[EG_IR]);
}
/* Instruction doing a read access */
@@ -1149,11 +1148,11 @@
CacheModelResult IrRes, DrRes;
current_ii = ii;
- IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
+ IrRes = (*simulator.I1_Read)(CLG_(bb_base) + ii->instr_offset, ii->instr_size);
DrRes = (*simulator.D1_Read)(data_addr, data_size);
CLG_DEBUG(6, "log_1I1Dr: Ir %#lx/%u => %s, Dr %#lx/%lu => %s\n",
- bb_base + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
+ CLG_(bb_base) + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
data_addr, data_size, cacheRes(DrRes));
if (CLG_(current_state).collect) {
@@ -1164,8 +1163,8 @@
cost_Dr = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DR);
}
else {
- cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
- cost_Dr = cost_base + ii->cost_offset + ii->eventset->offset[EG_DR];
+ cost_Ir = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_IR];
+ cost_Dr = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_DR];
}
inc_costs(IrRes, cost_Ir,
@@ -1193,7 +1192,7 @@
if (CLG_(current_state).nonskipped)
cost_Dr = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DR);
else
- cost_Dr = cost_base + ii->cost_offset + ii->eventset->offset[EG_DR];
+ cost_Dr = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_DR];
inc_costs(DrRes, cost_Dr,
CLG_(current_state).cost + fullOffset(EG_DR) );
@@ -1209,11 +1208,11 @@
CacheModelResult IrRes, DwRes;
current_ii = ii;
- IrRes = (*simulator.I1_Read)(bb_base + ii->instr_offset, ii->instr_size);
+ IrRes = (*simulator.I1_Read)(CLG_(bb_base) + ii->instr_offset, ii->instr_size);
DwRes = (*simulator.D1_Write)(data_addr, data_size);
CLG_DEBUG(6, "log_1I1Dw: Ir %#lx/%u => %s, Dw %#lx/%lu => %s\n",
- bb_base + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
+ CLG_(bb_base) + ii->instr_offset, ii->instr_size, cacheRes(IrRes),
data_addr, data_size, cacheRes(DwRes));
if (CLG_(current_state).collect) {
@@ -1224,8 +1223,8 @@
cost_Dw = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DW);
}
else {
- cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
- cost_Dw = cost_base + ii->cost_offset + ii->eventset->offset[EG_DW];
+ cost_Ir = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_IR];
+ cost_Dw = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_DW];
}
inc_costs(IrRes, cost_Ir,
@@ -1252,7 +1251,7 @@
if (CLG_(current_state).nonskipped)
cost_Dw = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DW);
else
- cost_Dw = cost_base + ii->cost_offset + ii->eventset->offset[EG_DW];
+ cost_Dw = CLG_(cost_base) + ii->cost_offset + ii->eventset->offset[EG_DW];
inc_costs(DwRes, cost_Dw,
CLG_(current_state).cost + fullOffset(EG_DW) );
@@ -1839,20 +1838,6 @@
}
static
-void cachesim_after_bbsetup(void)
-{
- BBCC* bbcc = CLG_(current_state).bbcc;
-
- if (CLG_(clo).simulate_cache) {
- BB* bb = bbcc->bb;
-
- /* only needed if log_* functions are called */
- bb_base = bb->obj->offset + bb->offset;
- cost_base = bbcc->cost;
- }
-}
-
-static
void cachesim_finish(void)
{
if (clo_collect_cacheuse)
@@ -1871,7 +1856,6 @@
.getdesc = cachesim_getdesc,
.printstat = cachesim_printstat,
.add_icost = cachesim_add_icost,
- .after_bbsetup = cachesim_after_bbsetup,
.finish = cachesim_finish,
/* these will be set by cachesim_post_clo_init */
|
|
From: <sv...@va...> - 2010-06-09 22:33:04
|
Author: weidendo
Date: 2010-06-09 23:32:53 +0100 (Wed, 09 Jun 2010)
New Revision: 11165
Log:
Callgrind: event sets now consist of event groups
Offsets of groups within event sets are now
stored in a offset table as part of the event set, and
can be accessed directly. Before, offsets were hardcoded
all over the place. This should make addition of further
event groups much simpler.
Modified:
trunk/callgrind/bbcc.c
trunk/callgrind/debug.c
trunk/callgrind/events.c
trunk/callgrind/events.h
trunk/callgrind/global.h
trunk/callgrind/main.c
trunk/callgrind/sim.c
Modified: trunk/callgrind/bbcc.c
===================================================================
--- trunk/callgrind/bbcc.c 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/bbcc.c 2010-06-09 22:32:53 UTC (rev 11165)
@@ -601,7 +601,7 @@
if (!CLG_(clo).simulate_cache) {
/* update Ir cost */
int instr_count = last_bb->jmp[passed].instr+1;
- CLG_(current_state).cost[CLG_(sets).off_full_Ir] += instr_count;
+ CLG_(current_state).cost[ fullOffset(EG_IR) ] += instr_count;
}
}
Modified: trunk/callgrind/debug.c
===================================================================
--- trunk/callgrind/debug.c 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/debug.c 2010-06-09 22:32:53 UTC (rev 11165)
@@ -137,40 +137,46 @@
void CLG_(print_eventset)(int s, EventSet* es)
{
- int i;
+ int i, j;
+ UInt mask;
+ EventGroup* eg;
- if (s<0) {
- s = -s;
- print_indent(s);
- }
+ if (s<0) {
+ s = -s;
+ print_indent(s);
+ }
- if (!es) {
- VG_(printf)("(EventSet not set)\n");
- return;
- }
+ if (!es) {
+ VG_(printf)("(EventSet not set)\n");
+ return;
+ }
- VG_(printf)("%5s (Size/Cap %d/%d): ",
- es->name, es->size, es->capacity);
+ VG_(printf)("EventSet %d (%d groups, size %d):",
+ es->mask, es->count, es->size);
- if (es->size == 0)
- VG_(printf)("-");
- else {
- for(i=0; i< es->size; i++) {
- if (i>0) {
- VG_(printf)(" ");
- if (es->e[i-1].nextTop == i)
- VG_(printf)("| ");
- }
- VG_(printf)("%s", es->e[i].type->name);
+ if (es->count == 0) {
+ VG_(printf)("-\n");
+ return;
}
- }
- VG_(printf)("\n");
+
+ for(i=0, mask=1; i<MAX_EVENTGROUP_COUNT; i++, mask=mask<<1) {
+ if ((es->mask & mask)==0) continue;
+ eg = CLG_(get_event_group)(i);
+ if (!eg) continue;
+ VG_(printf)(" (%d: %s", i, eg->name[0]);
+ for(j=1; j<eg->size; j++)
+ VG_(printf)(" %s", eg->name[j]);
+ VG_(printf)(")");
+ }
+ VG_(printf)("\n");
}
void CLG_(print_cost)(int s, EventSet* es, ULong* c)
{
- Int i, pos;
+ Int i, j, pos, off;
+ UInt mask;
+ EventGroup* eg;
if (s<0) {
s = -s;
@@ -182,29 +188,36 @@
return;
}
if (!c) {
- VG_(printf)("Cost (Null, EventSet %s)\n", es->name);
+ VG_(printf)("Cost (Null, EventSet %d)\n", es->mask);
return;
}
if (es->size == 0) {
- VG_(printf)("Cost (Nothing, EventSet %s with len 0)\n", es->name);
+ VG_(printf)("Cost (Nothing, EventSet with len 0)\n");
return;
}
pos = s;
- pos += VG_(printf)("Cost %s [%p]: %s %llu", es->name, c, es->e[0].type->name, c[0]);
+ pos += VG_(printf)("Cost [%p]: ", c);
+ off = 0;
+ for(i=0, mask=1; i<MAX_EVENTGROUP_COUNT; i++, mask=mask<<1) {
+ if ((es->mask & mask)==0) continue;
+ eg = CLG_(get_event_group)(i);
+ if (!eg) continue;
+ for(j=0; j<eg->size; j++) {
- i = 1;
- while(i<es->size) {
- if (pos > 70) {
- VG_(printf)(",\n");
- print_indent(s+5);
- pos = s+5;
- }
- else
- pos += VG_(printf)(", ");
- pos += VG_(printf)("%s %llu", es->e[i].type->name, c[i]);
- i++;
+ if (off>0) {
+ if (pos > 70) {
+ VG_(printf)(",\n");
+ print_indent(s+5);
+ pos = s+5;
+ }
+ else
+ pos += VG_(printf)(", ");
+ }
+
+ pos += VG_(printf)("%s %llu", eg->name[j], c[off++]);
+ }
}
VG_(printf)("\n");
}
@@ -213,13 +226,13 @@
void CLG_(print_short_jcc)(jCC* jcc)
{
if (jcc)
- VG_(printf)("%#lx => %#lx [%llu/%llu,%llu,%llu]",
+ VG_(printf)("%#lx => %#lx [calls %llu/Ir %llu, Dr %llu, Dw %llu]",
bb_jmpaddr(jcc->from->bb),
bb_addr(jcc->to->bb),
jcc->call_counter,
- jcc->cost ? jcc->cost[CLG_(sets).off_full_Ir]:0,
- jcc->cost ? jcc->cost[CLG_(sets).off_full_Dr]:0,
- jcc->cost ? jcc->cost[CLG_(sets).off_full_Dw]:0);
+ jcc->cost ? jcc->cost[fullOffset(EG_IR)]:0,
+ jcc->cost ? jcc->cost[fullOffset(EG_DR)]:0,
+ jcc->cost ? jcc->cost[fullOffset(EG_DW)]:0);
else
VG_(printf)("[Skipped JCC]");
}
Modified: trunk/callgrind/events.c
===================================================================
--- trunk/callgrind/events.c 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/events.c 2010-06-09 22:32:53 UTC (rev 11165)
@@ -28,550 +28,534 @@
#include "global.h"
-#define MAX_EVENTTYPE 20
+/* This should be 2**MAX_EVENTGROUP_COUNT */
+#define MAX_EVENTSET_COUNT 1024
-static EventType eventtype[MAX_EVENTTYPE];
-static Int eventtype_count = 0;
+static EventGroup* eventGroup[MAX_EVENTGROUP_COUNT];
+static EventSet* eventSetTable[MAX_EVENTSET_COUNT];
+static Bool eventSets_initialized = 0;
-EventType* CLG_(register_eventtype)(Char* name)
+static
+void initialize_event_sets(void)
{
- EventType* et;
+ Int i;
- if (eventtype_count == MAX_EVENTTYPE) {
- VG_(printf)("\nMore than %d event types used!\n"
- "Increase MAX_EVENTTYPE in ct_events.c and recomile this tool!\n",
- MAX_EVENTTYPE);
- VG_(tool_panic)("Too many event types requested.");
- }
+ if (eventSets_initialized) return;
- et = &(eventtype[eventtype_count]);
- et->id = eventtype_count;
- et->name = (UChar*) VG_(strdup)("cl.events.re.1", name);
- et->description = 0;
+ for(i=0; i< MAX_EVENTGROUP_COUNT; i++)
+ eventGroup[i] = 0;
- eventtype_count++;
+ for(i=0; i< MAX_EVENTSET_COUNT; i++)
+ eventSetTable[i] = 0;
- return et;
-}
+ eventSets_initialized = 1;
+ }
-
-EventType* CLG_(get_eventtype)(Char* name)
+static
+EventGroup* new_event_group(int id, int n)
{
- Int i;
+ EventGroup* eg;
- for(i=0;i<eventtype_count;i++)
- if (VG_(strcmp)(eventtype[i].name, name) == 0)
- return eventtype+i;
- return 0;
+ initialize_event_sets();
+
+ CLG_ASSERT(id>=0 && id<MAX_EVENTGROUP_COUNT);
+ CLG_ASSERT(eventGroup[id]==0);
+
+ eg = (EventGroup*) CLG_MALLOC("cl.events.group.1",
+ sizeof(EventGroup) + n * sizeof(Char*));
+ eg->size = n;
+ eventGroup[id] = eg;
+ return eg;
}
-EventType* CLG_(get_eventtype_byindex)(Int id)
+EventGroup* CLG_(register_event_group) (int id, Char* n1)
{
- if ((id >= 0) && (id < eventtype_count))
- return eventtype+id;
- return 0;
+ EventGroup* eg = new_event_group(id, 1);
+ eg->name[0] = n1;
+
+ return eg;
}
-/* Allocate space for an event set */
-EventSet* CLG_(get_eventset)(Char* n, Int capacity)
+EventGroup* CLG_(register_event_group2)(int id, Char* n1, Char* n2)
{
- EventSet* es;
+ EventGroup* eg = new_event_group(id, 2);
+ eg->name[0] = n1;
+ eg->name[1] = n2;
- es = (EventSet*) CLG_MALLOC("cl.events.geSet.1",
- sizeof(EventSet) +
- capacity * sizeof(EventSetEntry));
- es->capacity = capacity;
- es->size = 0;
- es->name = n;
-
- return es;
+ return eg;
}
-/* Incorporate a event type into a set, get start offset */
-Int CLG_(add_eventtype)(EventSet* es, EventType* t)
+EventGroup* CLG_(register_event_group3)(int id, Char* n1, Char* n2, Char* n3)
{
- Int offset = es->size;
- if (es->capacity - offset < 1) return -1;
+ EventGroup* eg = new_event_group(id, 3);
+ eg->name[0] = n1;
+ eg->name[1] = n2;
+ eg->name[2] = n3;
- es->size++;
- es->e[offset].type = t;
- es->e[offset].nextTop = es->size;
-
- return offset;
+ return eg;
}
-/* Incorporate one event set into another, get start offset */
-Int CLG_(add_eventset)(EventSet* dst, EventSet* src)
+EventGroup* CLG_(register_event_group4)(int id,
+ Char* n1, Char* n2, Char* n3, Char* n4)
{
- Int offset = dst->size, i;
- if (!src || (src->size == 0)) return offset;
+ EventGroup* eg = new_event_group(id, 4);
+ eg->name[0] = n1;
+ eg->name[1] = n2;
+ eg->name[2] = n3;
+ eg->name[3] = n4;
- if (dst->capacity - offset < src->size) return -1;
-
- for(i=0;i<src->size;i++) {
- dst->e[offset+i].type = src->e[i].type;
- dst->e[offset+i].nextTop = src->e[i].nextTop + offset;
- }
- dst->size += src->size;
+ return eg;
+}
- return offset;
+EventGroup* CLG_(get_event_group)(int id)
+{
+ CLG_ASSERT(id>=0 && id<MAX_EVENTGROUP_COUNT);
+
+ return eventGroup[id];
}
-/* Incorporate two event types into a set, with second < first */
-Int CLG_(add_dep_event2)(EventSet* es, EventType* e1, EventType* e2)
+
+static
+EventSet* eventset_from_mask(UInt mask)
{
- Int offset = es->size;
+ EventSet* es;
+ Int i, count, offset;
- if (es->capacity - offset < 2) return -1;
+ if (mask >= MAX_EVENTSET_COUNT) return 0;
- es->size += 2;
- es->e[offset].type = e1;
- es->e[offset].nextTop = es->size;
- es->e[offset+1].type = e2;
- es->e[offset+1].nextTop = es->size;
-
- return offset;
+ initialize_event_sets();
+ if (eventSetTable[mask]) return eventSetTable[mask];
+
+ es = (EventSet*) CLG_MALLOC("cl.events.eventset.1", sizeof(EventSet));
+ es->mask = mask;
+
+ offset = 0;
+ count = 0;
+ for(i=0;i<MAX_EVENTGROUP_COUNT;i++) {
+ es->offset[i] = offset;
+ if ( ((mask & (1u<<i))==0) || (eventGroup[i]==0))
+ continue;
+
+ offset += eventGroup[i]->size;
+ count++;
+ }
+ es->size = offset;
+ es->count = count;
+
+ eventSetTable[mask] = es;
+ return es;
}
-/* Incorporate 3 event types into a set, with third < second < first */
-Int CLG_(add_dep_event3)(EventSet* es,
- EventType* e1, EventType* e2, EventType* e3)
+EventSet* CLG_(get_event_set)(Int id)
{
- Int offset = es->size;
+ CLG_ASSERT(id>=0 && id<MAX_EVENTGROUP_COUNT);
+ return eventset_from_mask(1u << id);
+}
- if (es->capacity - offset < 3) return -1;
+EventSet* CLG_(get_event_set2)(Int id1, Int id2)
+{
+ CLG_ASSERT(id1>=0 && id1<MAX_EVENTGROUP_COUNT);
+ CLG_ASSERT(id2>=0 && id2<MAX_EVENTGROUP_COUNT);
+ return eventset_from_mask((1u << id1) | (1u << id2));
+}
- es->size += 3;
- es->e[offset].type = e1;
- es->e[offset].nextTop = es->size;
- es->e[offset+1].type = e2;
- es->e[offset+1].nextTop = es->size;
- es->e[offset+2].type = e3;
- es->e[offset+2].nextTop = es->size;
-
- return offset;
+EventSet* CLG_(get_event_set3)(Int id1, Int id2, Int id3)
+{
+ CLG_ASSERT(id1>=0 && id1<MAX_EVENTGROUP_COUNT);
+ CLG_ASSERT(id2>=0 && id2<MAX_EVENTGROUP_COUNT);
+ CLG_ASSERT(id3>=0 && id3<MAX_EVENTGROUP_COUNT);
+ return eventset_from_mask((1u << id1) | (1u << id2) | (1u << id3));
}
-Int CLG_(add_dep_event4)(EventSet* es,
- EventType* e1, EventType* e2,
- EventType* e3, EventType* e4)
+EventSet* CLG_(add_event_group)(EventSet* es, Int id)
{
- Int offset = es->size;
+ CLG_ASSERT(id>=0 && id<MAX_EVENTGROUP_COUNT);
+ if (!es) es = eventset_from_mask(0);
+ return eventset_from_mask(es->mask | (1u << id));
+}
- if (es->capacity - offset < 4) return -1;
+EventSet* CLG_(add_event_group2)(EventSet* es, Int id1, Int id2)
+{
+ CLG_ASSERT(id1>=0 && id1<MAX_EVENTGROUP_COUNT);
+ CLG_ASSERT(id2>=0 && id2<MAX_EVENTGROUP_COUNT);
+ if (!es) es = eventset_from_mask(0);
+ return eventset_from_mask(es->mask | (1u << id1) | (1u << id2));
+}
- es->size += 4;
- es->e[offset].type = e1;
- es->e[offset].nextTop = es->size;
- es->e[offset+1].type = e2;
- es->e[offset+1].nextTop = es->size;
- es->e[offset+2].type = e3;
- es->e[offset+2].nextTop = es->size;
- es->e[offset+3].type = e4;
- es->e[offset+3].nextTop = es->size;
-
- return offset;
+EventSet* CLG_(add_event_set)(EventSet* es1, EventSet* es2)
+{
+ if (!es1) es1 = eventset_from_mask(0);
+ if (!es2) es2 = eventset_from_mask(0);
+ return eventset_from_mask(es1->mask | es2->mask);
}
-/* Returns number of characters written */
Int CLG_(sprint_eventset)(Char* buf, EventSet* es)
{
- Int i, pos = 0;
+ Int i, j, pos;
+ UInt mask;
+ EventGroup* eg;
- for(i=0; i< es->size; i++) {
- if (pos>0) buf[pos++] = ' ';
- pos += VG_(sprintf)(buf + pos, "%s", es->e[i].type->name);
- }
- buf[pos] = 0;
- return pos;
+ CLG_ASSERT(es->size >0);
+ pos = 0;
+ for(i=0, mask=1; i<MAX_EVENTGROUP_COUNT; i++, mask=mask<<1) {
+ if ((es->mask & mask)==0) continue;
+ if (eventGroup[i] ==0) continue;
+
+ eg = eventGroup[i];
+ for(j=0; j<eg->size; j++) {
+ if (pos>0) buf[pos++] = ' ';
+ pos += VG_(sprintf)(buf + pos, "%s", eg->name[j]);
+ }
+ }
+ buf[pos] = 0;
+
+ return pos;
}
+
/* Get cost array for an event set */
ULong* CLG_(get_eventset_cost)(EventSet* es)
{
- return CLG_(get_costarray)(es->capacity);
+ return CLG_(get_costarray)(es->size);
}
/* Set all costs of an event set to zero */
void CLG_(init_cost)(EventSet* es, ULong* cost)
{
- Int i;
+ Int i;
- if (!cost) return;
+ if (!cost) return;
- for(i=0;i<es->capacity;i++)
- cost[i] = 0;
+ for(i=0; i<es->size; i++)
+ cost[i] = 0;
}
/* Set all costs of an event set to zero */
void CLG_(init_cost_lz)(EventSet* es, ULong** cost)
{
- Int i;
+ Int i;
- CLG_ASSERT(cost != 0);
- if (!(*cost))
- *cost = CLG_(get_eventset_cost)(es);
+ CLG_ASSERT(cost != 0);
+ if (!(*cost))
+ *cost = CLG_(get_eventset_cost)(es);
- for(i=0;i<es->capacity;i++)
- (*cost)[i] = 0;
+ for(i=0; i<es->size; i++)
+ (*cost)[i] = 0;
}
void CLG_(zero_cost)(EventSet* es, ULong* cost)
{
- Int i;
+ Int i;
- if (!cost) return;
+ if (!cost) return;
- for(i=0;i<es->size;i++)
- cost[i] = 0;
+ for(i=0;i<es->size;i++)
+ cost[i] = 0;
}
Bool CLG_(is_zero_cost)(EventSet* es, ULong* cost)
{
- Int i = 0;
+ Int i;
- if (!cost) return True;
+ if (!cost) return True;
- while(i<es->size) {
- if (cost[i] != 0) return False;
- i = es->e[i].nextTop;
- }
- return True;
+ for(i=0; i<es->size; i++)
+ if (cost[i] != 0) return False;
+
+ return True;
}
Bool CLG_(is_equal_cost)(EventSet* es, ULong* c1, ULong* c2)
{
- Int i = 0;
+ Int i;
- if (!c1) return CLG_(is_zero_cost)(es,c2);
- if (!c2) return CLG_(is_zero_cost)(es,c1);
+ if (!c1) return CLG_(is_zero_cost)(es, c2);
+ if (!c2) return CLG_(is_zero_cost)(es, c1);
- while(i<es->size) {
- if (c1[i] != c2[i]) return False;
- if (c1[i] == 0)
- i = es->e[i].nextTop;
- else
- i++;
- }
- return True;
+ for(i=0; i<es->size; i++)
+ if (c1[i] != c2[i]) return False;
+
+ return True;
}
void CLG_(copy_cost)(EventSet* es, ULong* dst, ULong* src)
{
- Int i;
+ Int i;
- if (!src) {
- CLG_(zero_cost)(es, dst);
- return;
- }
- CLG_ASSERT(dst != 0);
+ if (!src) {
+ CLG_(zero_cost)(es, dst);
+ return;
+ }
+ CLG_ASSERT(dst != 0);
- for(i=0;i<es->size;i++)
- dst[i] = src[i];
+ for(i=0;i<es->size;i++)
+ dst[i] = src[i];
}
void CLG_(copy_cost_lz)(EventSet* es, ULong** pdst, ULong* src)
{
- Int i;
- ULong* dst;
+ Int i;
+ ULong* dst;
- CLG_ASSERT(pdst != 0);
+ CLG_ASSERT(pdst != 0);
- if (!src) {
- CLG_(zero_cost)(es, *pdst);
- return;
- }
- dst = *pdst;
- if (!dst)
- dst = *pdst = CLG_(get_eventset_cost)(es);
+ if (!src) {
+ CLG_(zero_cost)(es, *pdst);
+ return;
+ }
+ dst = *pdst;
+ if (!dst)
+ dst = *pdst = CLG_(get_eventset_cost)(es);
- for(i=0;i<es->size;i++)
- dst[i] = src[i];
+ for(i=0;i<es->size;i++)
+ dst[i] = src[i];
}
void CLG_(add_cost)(EventSet* es, ULong* dst, ULong* src)
{
- Int i = 0;
+ Int i;
- if (!src) return;
- CLG_ASSERT(dst != 0);
+ if (!src) return;
+ CLG_ASSERT(dst != 0);
- while(i<es->size) {
- if (src[i] == 0)
- i = es->e[i].nextTop;
- else {
- dst[i] += src[i];
- i++;
- }
- }
+ for(i=0; i<es->size; i++)
+ dst[i] += src[i];
}
void CLG_(add_cost_lz)(EventSet* es, ULong** pdst, ULong* src)
{
- Int i;
- ULong* dst;
+ Int i;
+ ULong* dst;
- if (!src) return;
- CLG_ASSERT(pdst != 0);
+ if (!src) return;
+ CLG_ASSERT(pdst != 0);
- dst = *pdst;
- if (!dst) {
- dst = *pdst = CLG_(get_eventset_cost)(es);
- CLG_(copy_cost)(es,dst,src);
- return;
- }
-
- i = 0;
- while(i<es->size) {
- if (src[i] == 0)
- i = es->e[i].nextTop;
- else {
- dst[i] += src[i];
- i++;
+ dst = *pdst;
+ if (!dst) {
+ dst = *pdst = CLG_(get_eventset_cost)(es);
+ CLG_(copy_cost)(es, dst, src);
+ return;
}
- }
+
+ for(i=0; i<es->size; i++)
+ dst[i] += src[i];
}
/* Adds src to dst and zeros src. Returns false if nothing changed */
Bool CLG_(add_and_zero_cost)(EventSet* es, ULong* dst, ULong* src)
{
- Int i = 0, j = 0;
+ Int i;
+ Bool is_nonzero = False;
- CLG_DEBUGIF(6) {
- CLG_DEBUG(6, " add_and_zero_cost(%s, dst %p, src %p)\n", es->name, dst, src);
- CLG_(print_cost)(-5, es, src);
- }
+ CLG_ASSERT((es != 0) && (dst != 0));
+ if (!src) return False;
- if (!es || !src) return False;
-
- while(i<es->size) {
- if (src[i] == 0)
- i = es->e[i].nextTop;
- else {
- dst[i] += src[i];
- src[i] = 0;
- i++;
- j++;
+ for(i=0; i<es->size; i++) {
+ if (src[i]==0) continue;
+ dst[i] += src[i];
+ src[i] = 0;
+ is_nonzero = True;
}
- }
- return (j>0);
+ return is_nonzero;
}
/* Adds src to dst and zeros src. Returns false if nothing changed */
-Bool CLG_(add_and_zero_cost_lz)(EventSet* es, ULong** pdst, ULong* src)
+Bool CLG_(add_and_zero_cost2)(EventSet* esDst, ULong* dst,
+ EventSet* esSrc, ULong* src)
{
- Int i;
- ULong* dst;
+ Int i,j;
+ Bool is_nonzero = False;
+ UInt mask;
+ EventGroup *eg;
+ ULong *egDst, *egSrc;
- if (!src) return False;
+ CLG_ASSERT((esDst != 0) && (dst != 0) && (esSrc != 0));
+ if (!src) return False;
- i = 0;
- while(1) {
- if (i >= es->size) return False;
- if (src[i] != 0) break;
- i = es->e[i].nextTop;
- }
+ for(i=0, mask=1; i<MAX_EVENTGROUP_COUNT; i++, mask=mask<<1) {
+ if ((esSrc->mask & mask)==0) continue;
+ if (eventGroup[i] ==0) continue;
- CLG_ASSERT(pdst != 0);
- dst = *pdst;
- if (!dst) {
- dst = *pdst = CLG_(get_eventset_cost)(es);
- CLG_(copy_cost)(es,dst,src);
- CLG_(zero_cost)(es,src);
- return True;
- }
-
- dst[i] += src[i];
- src[i] = 0;
- i++;
-
- while(i<es->size) {
- if (src[i] == 0)
- i = es->e[i].nextTop;
- else {
- dst[i] += src[i];
- src[i] = 0;
+ /* if src has a subset, dst must have, too */
+ CLG_ASSERT((esDst->mask & mask)>0);
+ eg = eventGroup[i];
+ egSrc = src + esSrc->offset[i];
+ egDst = dst + esDst->offset[i];
+ for(j=0; j<eg->size; j++) {
+ if (egSrc[j]==0) continue;
+ egDst[j] += egSrc[j];
+ egSrc[j] = 0;
+ is_nonzero = True;
+ }
}
- }
- return True;
+ return is_nonzero;
}
+
+
/* Adds difference of new and old to dst, and set old to new.
* Returns false if nothing changed */
Bool CLG_(add_diff_cost)(EventSet* es, ULong* dst, ULong* old, ULong* new_cost)
{
- Int i = 0, j = 0;
+ Int i;
+ Bool is_nonzero = False;
- while(i<es->size) {
- if (new_cost[i] == old[i])
- i = es->e[i].nextTop;
- else {
- dst[i] += new_cost[i] - old[i];
- old[i] = new_cost[i];
- i++;
- j++;
+ CLG_ASSERT((es != 0) && (dst != 0));
+ CLG_ASSERT(old && new_cost);
+
+ for(i=0; i<es->size; i++) {
+ if (new_cost[i] == old[i]) continue;
+ dst[i] += new_cost[i] - old[i];
+ old[i] = new_cost[i];
+ is_nonzero = True;
}
- }
- return (j>0);
+ return is_nonzero;
}
-/* Adds difference of new and old to dst, and set old to new.
- * Returns false if nothing changed */
-Bool CLG_(add_diff_cost_lz)(EventSet* es, ULong** pdst,
- ULong* old, ULong* new_cost)
+Bool CLG_(add_diff_cost_lz)(EventSet* es, ULong** pdst, ULong* old, ULong* new_cost)
{
- Int i;
- ULong* dst;
+ Int i;
+ ULong* dst;
+ Bool is_nonzero = False;
- if (!old && !new_cost) return False;
- CLG_ASSERT(old && new_cost);
+ CLG_ASSERT((es != 0) && (pdst != 0));
+ CLG_ASSERT(old && new_cost);
- i = 0;
- while(1) {
- if (i >= es->size) return False;
- if (old[i] != new_cost[i]) break;
- i = es->e[i].nextTop;
- }
+ dst = *pdst;
+ if (!dst) {
+ dst = *pdst = CLG_(get_eventset_cost)(es);
+ CLG_(zero_cost)(es, dst);
+ }
- CLG_ASSERT(pdst != 0);
- dst = *pdst;
- if (!dst) {
- dst = *pdst = CLG_(get_eventset_cost)(es);
- CLG_(zero_cost)(es,dst);
- }
-
- dst[i] += new_cost[i] - old[i];
- old[i] = new_cost[i];
- i++;
-
- while(i<es->size) {
- if (new_cost[i] == old[i])
- i = es->e[i].nextTop;
- else {
- dst[i] += new_cost[i] - old[i];
- old[i] = new_cost[i];
- i++;
+ for(i=0; i<es->size; i++) {
+ if (new_cost[i] == old[i]) continue;
+ dst[i] += new_cost[i] - old[i];
+ old[i] = new_cost[i];
+ is_nonzero = True;
}
- }
- return True;
+ return is_nonzero;
}
+
/* Returns number of characters written */
Int CLG_(sprint_cost)(Char* buf, EventSet* es, ULong* c)
{
- Int i, pos, skipped = 0;
+ Int i, pos, skipped = 0;
- if (!c || es->size==0) return 0;
+ if (!c || es->size==0) return 0;
- /* At least one entry */
- pos = VG_(sprintf)(buf, "%llu", c[0]);
- i = 1;
-
- while(i<es->size) {
- if (c[i] == 0) {
- skipped += es->e[i].nextTop - i;
- i = es->e[i].nextTop;
- }
- else {
- while(skipped>0) {
+ /* At least one entry */
+ pos = VG_(sprintf)(buf, "%llu", c[0]);
+ for(i=1; i<es->size; i++) {
+ if (c[i] == 0) {
+ skipped++;
+ continue;
+ }
+ while(skipped>0) {
+ buf[pos++] = ' ';
+ buf[pos++] = '0';
+ skipped--;
+ }
buf[pos++] = ' ';
- buf[pos++] = '0';
- skipped--;
- }
- buf[pos++] = ' ';
- pos += VG_(sprintf)(buf+pos, "%llu", c[i]);
- i++;
+ pos += VG_(sprintf)(buf+pos, "%llu", c[i]);
}
- }
- return pos;
+ return pos;
}
/* Allocate space for an event mapping */
EventMapping* CLG_(get_eventmapping)(EventSet* es)
{
- EventMapping* em;
+ EventMapping* em;
- CLG_ASSERT(es != 0);
+ CLG_ASSERT(es != 0);
- em = (EventMapping*) CLG_MALLOC("cl.events.geMapping.1",
- sizeof(EventMapping) +
- es->capacity * sizeof(Int));
- em->capacity = es->capacity;
- em->size = 0;
- em->set = es;
+ em = (EventMapping*) CLG_MALLOC("cl.events.geMapping.1",
+ sizeof(EventMapping) +
+ sizeof(struct EventMappingEntry) *
+ es->size);
+ em->capacity = es->size;
+ em->size = 0;
+ em->es = es;
- return em;
+ return em;
}
void CLG_(append_event)(EventMapping* em, Char* n)
{
- Int i;
+ Int i, j, offset = 0;
+ UInt mask;
+ EventGroup* eg;
- CLG_ASSERT(em != 0);
+ CLG_ASSERT(em != 0);
+ for(i=0, mask=1; i<MAX_EVENTGROUP_COUNT; i++, mask=mask<<1) {
+ if ((em->es->mask & mask)==0) continue;
+ if (eventGroup[i] ==0) continue;
- for(i=0; i<em->set->size; i++)
- if (VG_(strcmp)(n, em->set->e[i].type->name)==0)
- break;
-
- if (i == em->set->size) return;
+ eg = eventGroup[i];
+ for(j=0; j<eg->size; j++, offset++) {
+ if (VG_(strcmp)(n, eg->name[j])!=0)
+ continue;
- CLG_ASSERT(em->capacity > em->size);
-
- em->index[em->size] = i;
- em->size++;
+ CLG_ASSERT(em->capacity > em->size);
+ em->entry[em->size].group = i;
+ em->entry[em->size].index = j;
+ em->entry[em->size].offset = offset;
+ em->size++;
+ return;
+ }
+ }
}
/* Returns number of characters written */
Int CLG_(sprint_eventmapping)(Char* buf, EventMapping* em)
{
- Int i, pos = 0;
+ Int i, pos = 0;
+ EventGroup* eg;
- CLG_ASSERT(em != 0);
+ CLG_ASSERT(em != 0);
- for(i=0; i< em->size; i++) {
- if (pos>0) buf[pos++] = ' ';
- pos += VG_(sprintf)(buf + pos, "%s", em->set->e[em->index[i]].type->name);
- }
- buf[pos] = 0;
+ for(i=0; i< em->size; i++) {
+ if (pos>0) buf[pos++] = ' ';
+ eg = eventGroup[em->entry[i].group];
+ CLG_ASSERT(eg != 0);
+ pos += VG_(sprintf)(buf + pos, "%s", eg->name[em->entry[i].index]);
+ }
+ buf[pos] = 0;
- return pos;
+ return pos;
}
/* Returns number of characters written */
Int CLG_(sprint_mappingcost)(Char* buf, EventMapping* em, ULong* c)
{
- Int i, pos, skipped = 0;
+ Int i, pos, skipped = 0;
- if (!c || em->size==0) return 0;
+ if (!c || em->size==0) return 0;
/* At least one entry */
- pos = VG_(sprintf)(buf, "%llu", c[em->index[0]]);
- i = 1;
+ pos = VG_(sprintf)(buf, "%llu", c[em->entry[0].offset]);
- while(i<em->size) {
- if (c[em->index[i]] == 0) {
- skipped++;
- i++;
- }
- else {
- while(skipped>0) {
+ for(i=1; i<em->size; i++) {
+ if (c[em->entry[i].offset] == 0) {
+ skipped++;
+ continue;
+ }
+ while(skipped>0) {
+ buf[pos++] = ' ';
+ buf[pos++] = '0';
+ skipped--;
+ }
buf[pos++] = ' ';
- buf[pos++] = '0';
- skipped--;
- }
- buf[pos++] = ' ';
- pos += VG_(sprintf)(buf+pos, "%llu", c[em->index[i]]);
- i++;
+ pos += VG_(sprintf)(buf+pos, "%llu", c[em->entry[i].offset]);
}
- }
- return pos;
+ return pos;
}
Modified: trunk/callgrind/events.h
===================================================================
--- trunk/callgrind/events.h 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/events.h 2010-06-09 22:32:53 UTC (rev 11165)
@@ -1,86 +1,90 @@
/*--------------------------------------------------------------------*/
/*--- Callgrind ---*/
/*--- events.h ---*/
-/*--- (C) 2004-2005, Josef Weidendorfer ---*/
/*--------------------------------------------------------------------*/
+/*
+ This file is part of Callgrind, a Valgrind tool for call tracing.
+ Copyright (C) 2002-2010, Josef Weidendorfer (Jos...@gm...)
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
/* Abstractions for 64-bit cost lists (events.h) */
-#ifndef CG_EVENTS
-#define CG_EVENTS
+#ifndef CLG_EVENTS
+#define CLG_EVENTS
#include "pub_tool_basics.h"
#define CLG_(str) VGAPPEND(vgCallgrind_,str)
-/* An event type */
-typedef struct _EventType EventType;
-struct _EventType {
- Char* name;
- Char* description;
- Int id;
+/* Event groups consist of one or more named event types.
+ * Event sets are constructed from such event groups.
+ *
+ * Event groups have to be registered globally with a unique ID
+ * before they can be used in an event set.
+ * A group can appear at most once in a event set.
+ */
+
+#define MAX_EVENTGROUP_COUNT 10
+
+typedef struct _EventGroup EventGroup;
+struct _EventGroup {
+ Int size;
+ Char* name[0];
};
-EventType* CLG_(register_eventtype)(Char*);
-EventType* CLG_(get_eventtype)(Char*);
-EventType* CLG_(get_eventtype_byindex)(Int id);
+/* return 0 if event group can not be registered */
+EventGroup* CLG_(register_event_group) (int id, Char*);
+EventGroup* CLG_(register_event_group2)(int id, Char*, Char*);
+EventGroup* CLG_(register_event_group3)(int id, Char*, Char*, Char*);
+EventGroup* CLG_(register_event_group4)(int id, Char*, Char*, Char*, Char*);
+EventGroup* CLG_(get_event_group)(int id);
-/* An event set is a ordered list of event types, which comes down
- * to some description for ordered lists of costs.
- * Often, costs of 2 event types are related, e.g. one is always smaller
- * than the other. This is useful to speed up arithmetics on cost lists:
- * Each event type in the set has a <nextTop>. All indexes before are
- * promised to hold smaller values than the current.
- */
-typedef struct _EventSetEntry EventSetEntry;
-struct _EventSetEntry {
- EventType* type;
- Int nextTop;
-};
+/* Event sets are defined by event groups they consist of. */
+
typedef struct _EventSet EventSet;
struct _EventSet {
- Char* name;
- Int size;
- Int capacity;
- EventSetEntry e[0];
-};
+ /* if subset with ID x is in the set, then bit x is set */
+ UInt mask;
+ Int count;
+ Int size;
+ Int offset[MAX_EVENTGROUP_COUNT];
+ };
+/* Same event set is returned when requesting same event groups */
+EventSet* CLG_(get_event_set)(Int id);
+EventSet* CLG_(get_event_set2)(Int id1, Int id2);
+EventSet* CLG_(get_event_set3)(Int id1, Int id2, Int id3);
+EventSet* CLG_(add_event_group)(EventSet*, Int id);
+EventSet* CLG_(add_event_group2)(EventSet*, Int id1, Int id2);
+EventSet* CLG_(add_event_set)(EventSet*, EventSet*);
+/* Writes event names into buf. Returns number of characters written */
+Int CLG_(sprint_eventset)(Char* buf, EventSet*);
-/* Some events out of an event set.
- * Used to print out part of an EventSet, or in another order.
- */
-typedef struct _EventMapping EventMapping;
-struct _EventMapping {
- EventSet* set;
- Int size;
- Int capacity;
- Int index[0];
-};
-
-/* Allocate space for an event set */
-EventSet* CLG_(get_eventset)(Char* n, Int capacity);
-/* Incorporate a event type into a set, get start offset */
-Int CLG_(add_eventtype)(EventSet* dst, EventType*);
-/* Incorporate event types into a set, with ... < second < first */
-Int CLG_(add_dep_event2)(EventSet* dst, EventType* e1, EventType* e2);
-Int CLG_(add_dep_event3)(EventSet* dst,
- EventType* e1, EventType* e2, EventType* e3);
-Int CLG_(add_dep_event4)(EventSet* dst,
- EventType* e1, EventType* e2, EventType* e3,
- EventType* e4);
-/* Incorporate one event set into another, get start offset */
-Int CLG_(add_eventset)(EventSet* dst, EventSet* src);
-/* Returns number of characters written */
-Int CLG_(sprint_eventset)(Char* buf, EventSet*);
-/* Allocate cost array for an event set */
-ULong* CLG_(get_eventset_cost)(EventSet*);
-
/* Operations on costs. A cost pointer of 0 means zero cost.
- * Functions ending in _lz allocate costs lazy if needed
+ * Functions ending in _lz allocate cost arrays only when needed
*/
-/* Set costs according full capacity of event set to 0 */
+ULong* CLG_(get_eventset_cost)(EventSet*);
+/* Set costs of event set to 0 */
void CLG_(init_cost)(EventSet*,ULong*);
/* This always allocates counter and sets them to 0 */
void CLG_(init_cost_lz)(EventSet*,ULong**);
@@ -94,7 +98,7 @@
void CLG_(add_cost_lz)(EventSet*,ULong** pdst, ULong* src);
/* Adds src to dst and zeros src. Returns false if nothing changed */
Bool CLG_(add_and_zero_cost)(EventSet*,ULong* dst, ULong* src);
-Bool CLG_(add_and_zero_cost_lz)(EventSet*,ULong** pdst, ULong* src);
+Bool CLG_(add_and_zero_cost2)(EventSet*,ULong* dst,EventSet*,ULong* src);
/* Adds difference of new and old to to dst, and set old to new.
* Returns false if nothing changed */
Bool CLG_(add_diff_cost)(EventSet*,ULong* dst, ULong* old, ULong* new_cost);
@@ -102,6 +106,22 @@
/* Returns number of characters written */
Int CLG_(sprint_cost)(Char* buf, EventSet*, ULong*);
+/* EventMapping: An ordered subset of events from an event set.
+ * This is used to print out part of an EventSet, or in another order.
+ */
+struct EventMappingEntry {
+ Int group;
+ Int index;
+ Int offset;
+};
+typedef struct _EventMapping EventMapping;
+struct _EventMapping {
+ EventSet* es;
+ Int size;
+ Int capacity;
+ struct EventMappingEntry entry[0];
+};
+
/* Allocate space for an event mapping */
EventMapping* CLG_(get_eventmapping)(EventSet*);
void CLG_(append_event)(EventMapping*, Char*);
@@ -110,4 +130,4 @@
/* Returns number of characters written */
Int CLG_(sprint_mappingcost)(Char* buf, EventMapping*, ULong*);
-#endif /* CG_EVENTS */
+#endif /* CLG_EVENTS */
Modified: trunk/callgrind/global.h
===================================================================
--- trunk/callgrind/global.h 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/global.h 2010-06-09 22:32:53 UTC (rev 11165)
@@ -671,7 +671,22 @@
Char *log_0I1Dr_name, *log_0I1Dw_name;
};
+// Event groups
+#define EG_USE 0
+#define EG_IR 1
+#define EG_DR 2
+#define EG_DW 3
+#define EG_ALLOC 4
+#define EG_SYS 5
+struct event_sets {
+ EventSet *base, *full;
+};
+extern struct event_sets CLG_(sets);
+
+#define fullOffset(group) (CLG_(sets).full->offset[group])
+
+
/*------------------------------------------------------------*/
/*--- Functions ---*/
/*------------------------------------------------------------*/
@@ -685,21 +700,9 @@
void CLG_(print_debug_usage)(void);
/* from sim.c */
-struct event_sets {
- EventSet *Use, *Ir, *Dr, *Dw;
- EventSet *UIr, *UIrDr, *UIrDrDw, *UIrDw, *UIrDwDr;
- EventSet *full;
-
- /* offsets into eventsets */
- Int off_full_Ir, off_full_Dr, off_full_Dw;
- Int off_full_alloc, off_full_systime;
-};
-
-extern struct event_sets CLG_(sets);
extern struct cachesim_if CLG_(cachesim);
+void CLG_(init_eventsets)(void);
-void CLG_(init_eventsets)(Int user);
-
/* from main.c */
Bool CLG_(get_debug_info)(Addr, Char filename[FILENAME_LEN],
Char fn_name[FN_NAME_LEN], UInt*, DebugInfo**);
Modified: trunk/callgrind/main.c
===================================================================
--- trunk/callgrind/main.c 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/main.c 2010-06-09 22:32:53 UTC (rev 11165)
@@ -273,34 +273,18 @@
case Ev_Ir:
// Ir event always is first for a guest instruction
CLG_ASSERT(ev->inode->eventset == 0);
- ev->inode->eventset = CLG_(sets).UIr;
+ ev->inode->eventset = CLG_(sets).base;
break;
case Ev_Dr:
// extend event set by Dr counter
- if ((ev->inode->eventset == CLG_(sets).UIrDr) ||
- (ev->inode->eventset == CLG_(sets).UIrDrDw) ||
- (ev->inode->eventset == CLG_(sets).UIrDwDr))
- break;
- if (ev->inode->eventset == CLG_(sets).UIrDw) {
- ev->inode->eventset = CLG_(sets).UIrDwDr;
- break;
- }
- CLG_ASSERT(ev->inode->eventset == CLG_(sets).UIr);
- ev->inode->eventset = CLG_(sets).UIrDr;
+ ev->inode->eventset = CLG_(add_event_group)(ev->inode->eventset,
+ EG_DR);
break;
case Ev_Dw:
case Ev_Dm:
// extend event set by Dw counter
- if ((ev->inode->eventset == CLG_(sets).UIrDw) ||
- (ev->inode->eventset == CLG_(sets).UIrDwDr) ||
- (ev->inode->eventset == CLG_(sets).UIrDrDw))
- break;
- if (ev->inode->eventset == CLG_(sets).UIrDr) {
- ev->inode->eventset = CLG_(sets).UIrDrDw;
- break;
- }
- CLG_ASSERT(ev->inode->eventset == CLG_(sets).UIr);
- ev->inode->eventset = CLG_(sets).UIrDw;
+ ev->inode->eventset = CLG_(add_event_group)(ev->inode->eventset,
+ EG_DW);
break;
default:
tl_assert(0);
@@ -1161,7 +1145,7 @@
{
if (CLG_(clo).collect_systime &&
CLG_(current_state).bbcc) {
- Int o = CLG_(sets).off_full_systime;
+ Int o;
#if CLG_MICROSYSTIME
struct vki_timeval tv_now;
ULong diff;
@@ -1171,11 +1155,12 @@
#else
UInt diff = VG_(read_millisecond_timer)() - syscalltime[tid];
#endif
-
+
+ /* offset o is for "SysCount", o+1 for "SysTime" */
+ o = fullOffset(EG_SYS);
+ CLG_ASSERT(o>=0);
CLG_DEBUG(0," Time (Off %d) for Syscall %d: %ull\n", o, syscallno, diff);
- if (o<0) return;
-
CLG_(current_state).cost[o] ++;
CLG_(current_state).cost[o+1] += diff;
if (!CLG_(current_state).bbcc->skipped)
@@ -1333,7 +1318,7 @@
(*CLG_(cachesim).post_clo_init)();
- CLG_(init_eventsets)(0);
+ CLG_(init_eventsets)();
CLG_(init_statistics)(& CLG_(stat));
CLG_(init_cost_lz)( CLG_(sets).full, &CLG_(total_cost) );
Modified: trunk/callgrind/sim.c
===================================================================
--- trunk/callgrind/sim.c 2010-06-08 18:23:59 UTC (rev 11164)
+++ trunk/callgrind/sim.c 2010-06-09 22:32:53 UTC (rev 11165)
@@ -1,4 +1,3 @@
-
/*--------------------------------------------------------------------*/
/*--- Cache simulation. ---*/
/*--- sim.c ---*/
@@ -8,7 +7,7 @@
This file is part of Callgrind, a Valgrind tool for call graph
profiling programs.
- Copyright (C) 2003-2005, Josef Weidendorfer (Jos...@gm...)
+ Copyright (C) 2003-2010, Josef Weidendorfer (Jos...@gm...)
This tool is derived from and contains code from Cachegrind
Copyright (C) 2002-2010 Nicholas Nethercote (nj...@va...)
@@ -113,15 +112,6 @@
* - BBCC* nonskipped (only != 0 when in a function not skipped)
*/
-/* Offset to events in event set, used in log_* functions
- * <off_EventSet_BasicEventSet>: offset where basic set is found
- */
-static Int off_UIr_Ir;
-static Int off_UIrDr_Ir, off_UIrDr_Dr;
-static Int off_UIrDrDw_Ir, off_UIrDrDw_Dr, off_UIrDrDw_Dw;
-static Int off_UIrDw_Ir, off_UIrDw_Dw;
-static Int off_UIrDwDr_Ir, off_UIrDwDr_Dr, off_UIrDwDr_Dw;
-
static Addr bb_base;
static ULong* cost_base;
static InstrInfo* current_ii;
@@ -1071,12 +1061,12 @@
ULong* cost_Ir;
if (CLG_(current_state).nonskipped)
- cost_Ir = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Ir;
+ cost_Ir = CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
else
- cost_Ir = cost_base + ii->cost_offset + off_UIr_Ir;
+ cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
inc_costs(IrRes, cost_Ir,
- CLG_(current_state).cost + CLG_(sets).off_full_Ir );
+ CLG_(current_state).cost + fullOffset(EG_IR) );
}
}
@@ -1097,17 +1087,20 @@
if (!CLG_(current_state).collect) return;
- global_cost_Ir = CLG_(current_state).cost + CLG_(sets).off_full_Ir;
+ global_cost_Ir = CLG_(current_state).cost + fullOffset(EG_IR);
if (CLG_(current_state).nonskipped) {
- ULong* skipped_cost_Ir = CLG_(current_state).nonskipped->skipped +
- CLG_(sets).off_full_Ir;
+ ULong* skipped_cost_Ir =
+ CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
+
inc_costs(Ir1Res, global_cost_Ir, skipped_cost_Ir);
inc_costs(Ir2Res, global_cost_Ir, skipped_cost_Ir);
return;
}
- inc_costs(Ir1Res, global_cost_Ir, cost_base + ii1->cost_offset + off_UIr_Ir);
- inc_costs(Ir2Res, global_cost_Ir, cost_base + ii2->cost_offset + off_UIr_Ir);
+ inc_costs(Ir1Res, global_cost_Ir,
+ cost_base + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
+ inc_costs(Ir2Res, global_cost_Ir,
+ cost_base + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
}
VG_REGPARM(3)
@@ -1130,19 +1123,22 @@
if (!CLG_(current_state).collect) return;
- global_cost_Ir = CLG_(current_state).cost + CLG_(sets).off_full_Ir;
+ global_cost_Ir = CLG_(current_state).cost + fullOffset(EG_IR);
if (CLG_(current_state).nonskipped) {
- ULong* skipped_cost_Ir = CLG_(current_state).nonskipped->skipped +
- CLG_(sets).off_full_Ir;
+ ULong* skipped_cost_Ir =
+ CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
inc_costs(Ir1Res, global_cost_Ir, skipped_cost_Ir);
inc_costs(Ir2Res, global_cost_Ir, skipped_cost_Ir);
inc_costs(Ir3Res, global_cost_Ir, skipped_cost_Ir);
return;
}
- inc_costs(Ir1Res, global_cost_Ir, cost_base + ii1->cost_offset + off_UIr_Ir);
- inc_costs(Ir2Res, global_cost_Ir, cost_base + ii2->cost_offset + off_UIr_Ir);
- inc_costs(Ir3Res, global_cost_Ir, cost_base + ii3->cost_offset + off_UIr_Ir);
+ inc_costs(Ir1Res, global_cost_Ir,
+ cost_base + ii1->cost_offset + ii1->eventset->offset[EG_IR]);
+ inc_costs(Ir2Res, global_cost_Ir,
+ cost_base + ii2->cost_offset + ii2->eventset->offset[EG_IR]);
+ inc_costs(Ir3Res, global_cost_Ir,
+ cost_base + ii3->cost_offset + ii3->eventset->offset[EG_IR]);
}
/* Instruction doing a read access */
@@ -1164,21 +1160,18 @@
ULong *cost_Ir, *cost_Dr;
if (CLG_(current_state).nonskipped) {
- cost_Ir = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Ir;
- cost_Dr = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Dr;
+ cost_Ir = CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
+ cost_Dr = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DR);
}
else {
- // event set must be UIrDr or extension
- CLG_ASSERT((ii->eventset == CLG_(sets).UIrDr) ||
- (ii->eventset == CLG_(sets).UIrDrDw));
- cost_Ir = cost_base + ii->cost_offset + off_UIrDr_Ir;
- cost_Dr = cost_base + ii->cost_offset + off_UIrDr_Dr;
+ cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
+ cost_Dr = cost_base + ii->cost_offset + ii->eventset->offset[EG_DR];
}
inc_costs(IrRes, cost_Ir,
- CLG_(current_state).cost + CLG_(sets).off_full_Ir );
+ CLG_(current_state).cost + fullOffset(EG_IR) );
inc_costs(DrRes, cost_Dr,
- CLG_(current_state).cost + CLG_(sets).off_full_Dr );
+ CLG_(current_state).cost + fullOffset(EG_DR) );
}
}
@@ -1197,21 +1190,13 @@
if (CLG_(current_state).collect) {
ULong *cost_Dr;
- if (CLG_(current_state).nonskipped) {
- cost_Dr = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Dr;
- }
- else {
- Int off_Dr;
- if (ii->eventset == CLG_(sets).UIrDr) off_Dr = off_UIrDr_Dr;
- else if (ii->eventset == CLG_(sets).UIrDrDw) off_Dr = off_UIrDrDw_Dr;
- else if (ii->eventset == CLG_(sets).UIrDwDr) off_Dr = off_UIrDwDr_Dr;
- else CLG_ASSERT(0);
+ if (CLG_(current_state).nonskipped)
+ cost_Dr = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DR);
+ else
+ cost_Dr = cost_base + ii->cost_offset + ii->eventset->offset[EG_DR];
- cost_Dr = cost_base + ii->cost_offset + off_Dr;
- }
-
inc_costs(DrRes, cost_Dr,
- CLG_(current_state).cost + CLG_(sets).off_full_Dr );
+ CLG_(current_state).cost + fullOffset(EG_DR) );
}
}
@@ -1235,22 +1220,18 @@
ULong *cost_Ir, *cost_Dw;
if (CLG_(current_state).nonskipped) {
- cost_Ir = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Ir;
- cost_Dw = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Dw;
+ cost_Ir = CLG_(current_state).nonskipped->skipped + fullOffset(EG_IR);
+ cost_Dw = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DW);
}
else {
- // This helper is called when a Dr event follows Ir;
- // Event set must be UIrDw or extension
- CLG_ASSERT((ii->eventset == CLG_(sets).UIrDw) ||
- (ii->eventset == CLG_(sets).UIrDwDr));
- cost_Ir = cost_base + ii->cost_offset + off_UIrDw_Ir;
- cost_Dw = cost_base + ii->cost_offset + off_UIrDw_Dw;
+ cost_Ir = cost_base + ii->cost_offset + ii->eventset->offset[EG_IR];
+ cost_Dw = cost_base + ii->cost_offset + ii->eventset->offset[EG_DW];
}
inc_costs(IrRes, cost_Ir,
- CLG_(current_state).cost + CLG_(sets).off_full_Ir );
+ CLG_(current_state).cost + fullOffset(EG_IR) );
inc_costs(DwRes, cost_Dw,
- CLG_(current_state).cost + CLG_(sets).off_full_Dw );
+ CLG_(current_state).cost + fullOffset(EG_DW) );
}
}
@@ -1268,21 +1249,13 @@
if (CLG_(current_state).collect) {
ULong *cost_Dw;
- if (CLG_(current_state).nonskipped) {
- cost_Dw = CLG_(current_state).nonskipped->skipped + CLG_(sets).off_full_Dw;
- }
- else {
- Int off_Dw;
- if (ii->eventset == CLG_(sets).UIrDw) off_Dw = off_UIrDw_Dw;
- else if (ii->eventset == CLG_(sets).UIrDwDr) off_Dw = off_UIrDwDr_Dw;
- else if (ii->eventset == CLG_(sets).UIrDrDw) off_Dw = off_UIrDrDw_Dw;
- else CLG_ASSERT(0);
-
- cost_Dw = cost_base + ii->cost_offset + off_Dw;
- }
+ if (CLG_(current_state).nonskipped)
+ cost_Dw = CLG_(current_state).nonskipped->skipped + fullOffset(EG_DW);
+ else
+ cost_Dw = cost_base + ii->cost_offset + ii->eventset->offset[EG_DW];
inc_costs(DwRes, cost_Dw,
- CLG_(current_state).cost + CLG_(sets).off_full_Dw );
+ CLG_(current_state).cost + fullOffset(EG_DW) );
}
}
@@ -1663,28 +1636,28 @@
/* I cache results. Use the I_refs value to determine the first column
* width. */
- l1 = commify(total[CLG_(sets).off_full_Ir], 0, buf1);
+ l1 = commify(total[fullOffset(EG_IR)], 0, buf1);
VG_(message)(Vg_UserMsg, "I refs: %s\n", buf1);
if (!CLG_(clo).simulate_cache) return;
- commify(total[CLG_(sets).off_full_Ir +1], l1, buf1);
+ commify(total[fullOffset(EG_IR) +1], l1, buf1);
VG_(message)(Vg_UserMsg, "I1 misses: %s\n", buf1);
- commify(total[CLG_(sets).off_full_Ir +2], l1, buf1);
+ commify(total[fullOffset(EG_IR) +2], l1, buf1);
VG_(message)(Vg_UserMsg, "L2i misses: %s\n", buf1);
p = 100;
- if (0 == total[CLG_(sets).off_full_Ir])
- total[CLG_(sets).off_full_Ir] = 1;
+ if (0 == total[fullOffset(EG_IR)])
+ total[fullOffset(EG_IR)] = 1;
- percentify(total[CLG_(sets).off_full_Ir+1] * 100 * p /
- total[CLG_(sets).off_full_Ir], p, l1+1, buf1);
+ percentify(total[fullOffset(EG_IR)+1] * 100 * p /
+ total[fullOffset(EG_IR)], p, l1+1, buf1);
VG_(message)(Vg_UserMsg, "I1 miss rate: %s\n", buf1);
- percentify(total[CLG_(sets).off_full_Ir+2] * 100 * p /
- total[CLG_(sets).off_full_Ir], p, l1+1, buf1);
+ percentify(total[fullOffset(EG_IR)+2] * 100 * p /
+ total[fullOffset(EG_IR)], p, l1+1, buf1);
VG_(message)(Vg_UserMsg, "L2i miss rate: %s\n", buf1);
VG_(message)(Vg_UserMsg, "\n");
@@ -1694,46 +1667,47 @@
D_total = CLG_(get_eventset_cost)( CLG_(sets).full );
CLG_(init_cost)( CLG_(sets).full, D_total);
- CLG_(copy_cost)( CLG_(sets).Dr, D_total, total + CLG_(sets).off_full_Dr );
- CLG_(add_cost) ( CLG_(sets).Dw, D_total, total + CLG_(sets).off_full_Dw );
+ // we only use the first 3 values of D_total, adding up Dr and Dw costs
+ CLG_(copy_cost)( CLG_(get_event_set)(EG_DR), D_total, total + fullOffset(EG_DR) );
+ CLG_(add_cost) ( CLG_(get_event_set)(EG_DW), D_total, total + fullOffset(EG_DW) );
commify( D_total[0], l1, buf1);
- l2 = commify(total[CLG_(sets).off_full_Dr], 0, buf2);
- l3 = commify(total[CLG_(sets).off_full_Dw], 0, buf3);
+ l2 = commify(total[fullOffset(EG_DR)], 0, buf2);
+ l3 = commify(total[fullOffset(EG_DW)], 0, buf3);
VG_(message)(Vg_UserMsg, "D refs: %s (%s rd + %s wr)\n",
buf1, buf2, buf3);
commify( D_total[1], l1, buf1);
- commify(total[CLG_(sets).off_full_Dr+1], l2, buf2);
- commify(total[CLG_(sets).off_full_Dw+1], l3, buf3);
+ commify(total[fullOffset(EG_DR)+1], l2, buf2);
+ commify(total[fullOffset(EG_DW)+1], l3, buf3);
VG_(message)(Vg_UserMsg, "D1 misses: %s (%s rd + %s wr)\n",
buf1, buf2, buf3);
commify( D_total[2], l1, buf1);
- commify(total[CLG_(sets).off_full_Dr+2], l2, buf2);
- commify(total[CLG_(sets).off_full_Dw+2], l3, buf3);
+ commify(total[fullOffset(EG_DR)+2], l2, buf2);
+ commify(total[fullOffset(EG_DW)+2], l3, buf3);
VG_(message)(Vg_UserMsg, "L2d misses: %s (%s rd + %s wr)\n",
buf1, buf2, buf3);
p = 10;
if (0 == D_total[0]) D_total[0] = 1;
- if (0 == total[CLG_(sets).off_full_Dr]) total[CLG_(sets).off_full_Dr] = 1;
- if (0 == total[CLG_(sets).off_full_Dw]) total[CLG_(sets).off_full_Dw] = 1;
+ if (0 == total[fullOffset(EG_DR)]) total[fullOffset(EG_DR)] = 1;
+ if (0 == total[fullOffset(EG_DW)]) total[fullOffset(EG_DW)] = 1;
percentify( D_total[1] * 100 * p / D_total[0], p, l1+1, buf1);
- percentify(total[CLG_(sets).off_full_Dr+1] * 100 * p /
- total[CLG_(sets).off_full_Dr], p, l2+1, buf2);
- percentify(total[CLG_(sets).off_full_Dw+1] * 100 * p /
- total[CLG_(sets).off_full_Dw], p, l3+1, buf3);
+ percentify(total[fullOffset(EG_DR)+1] * 100 * p /
+ total[fullOffset(EG_DR)], p, l2+1, buf2);
+ percentify(total[fullOffset(EG_DW)+1] * 100 * p /
+ total[fullOffset(EG_DW)], p, l3+1, buf3);
VG_(message)(Vg_UserMsg, "D1 miss rate: %s (%s + %s )\n",
buf1, buf2,buf3);
percentify( D_total[2] * 100 * p / D_total[0], p, l1+1, buf1);
- percentify(total[CLG_(sets).off_full_Dr+2] * 100 * p /
- total[CLG_(sets).off_full_Dr], p, l2+1, buf2);
- percentify(total[CLG_(sets).off_full_Dw+2] * 100 * p /
- total[CLG_(sets).off_full_Dw], p, l3+1, buf3);
+ percentify(total[fullOffset(EG_DR)+2] * 100 * p /
+ total[fullOffset(EG_DR)], p, l2+1, buf2);
+ percentify(total[fullOffset(EG_DW)+2] * 100 * p /
+ total[fullOffset(EG_DW)], p, l3+1, buf3);
VG_(message)(Vg_UserMsg, "L2d miss rate: %s (%s + %s )\n",
buf1, buf2,buf3);
VG_(message)(Vg_UserMsg, "\n");
@@ -1743,13 +1717,13 @@
/* L2 overall results */
L2_total =
- total[CLG_(sets).off_full_Dr +1] +
- total[CLG_(sets).off_full_Dw +1] +
- total[CLG_(sets).off_full_Ir +1];
+ total[fullOffset(EG_DR) +1] +
+ total[fullOffset(EG_DW) +1] +
+ total[fullOffset(EG_IR) +1];
L2_total_r =
- total[CLG_(sets).off_full_Dr +1] +
- total[CLG_(sets).off_full_Ir +1];
- L2_total_w = total[CLG_(sets).off_full_Dw +1];
+ total[fullOffset(EG_DR) +1] +
+ total[fullOffset(EG_IR) +1];
+ L2_total_w = total[fullOffset(EG_DW) +1];
commify(L2_total, l1, buf1);
commify(L2_total_r, l2, buf2);
commify(L2_total_w, l3, buf3);
@@ -1757,13 +1731,13 @@
buf1, buf2, buf3);
L2_total_m =
- total[CLG_(sets).off_full_Dr +2] +
- total[CLG_(sets).off_full_Dw +2] +
- total[CLG_(sets).off_full_Ir +2];
+ total[fullOffset(EG_DR) +2] +
+ total[fullOffset(EG_DW) +2] +
+ total[fullOffset(EG_IR) +2];
L2_total_mr =
- total[CLG_(sets).off_full_Dr +2] +
- total[CLG_(sets).off_full_Ir +2];
- L2_total_mw = total[CLG_(sets).off_full_Dw +2];
+ total[fullOffset(EG_DR) +2] +
+ total[fullOffset(EG_IR) +2];
+ L2_total_mw = total[fullOffset(EG_DW) +2];
commify(L2_total_m, l1, buf1);
commify(L2_total_mr, l2, buf2);
commify(L2_total_mw, l3, buf3);
@@ -1771,12 +1745,12 @@
buf1, buf2, buf3);
percentify(L2_total_m * 100 * p /
- (total[CLG_(sets).off_full_Ir] + D_total[0]), p, l1+1, buf1);
+ (total[fullOffset(EG_IR)] + D_total[0]), p, l1+1, buf1);
percentify(L2_total_mr * 100 * p /
- (total[CLG_(sets).off_full_Ir] + total[CLG_(sets).off_full_Dr]),
+ (total[fullOffset(EG_IR)] + total[fullOffset(EG_DR)]),
p, l2+1, buf2);
percentify(L2_total_mw * 100 * p /
- total[CLG_(sets).off_full_Dw], p, l3+1, buf3);
+ total[fullOffset(EG_DW)], p, l3+1, buf3);
VG_(message)(Vg_UserMsg, "L2 miss rate: %s (%s + %s )\n",
buf1, buf2,buf3);
}
@@ -1788,237 +1762,80 @@
struct event_sets CLG_(sets);
-void CLG_(init_eventsets)(Int max_user)
+void CLG_(init_eventsets)()
{
- EventType * e1, *e2, *e3, *e4;
- // Basic event sets from which others are composed
- EventSet *Use, *Ir, *Dr, *Dw;
- // Compositions of basic sets used for per-instruction counters
- EventSet *UIr, *UIrDr, *UIrDrDw, *UIrDw, *UIrDwDr;
- // Composition used for global counters and aggregation
- EventSet *full;
- int sizeOfUseIr;
+ // Event groups from which the event sets are composed
+ // the "Use" group only is used with "cacheuse" simulation
+ if (clo_collect_cacheuse)
+ CLG_(register_event_group4)(EG_USE,
+ "AcCost1", "SpLoss1", "AcCost2", "SpLoss2");
- // the "Use" events types only are used with "cacheuse" simulation
- Use = CLG_(get_eventset)("Use", 4);
- if (clo_collect_cacheuse) {
- /* if TUse is 0, there was never a load, and no loss, too */
- e1 = CLG_(register_eventtype)("AcCost1");
- CLG_(add_eventtype)(Use, e1);
- e1 = CLG_(register_eventtype)("SpLoss1");
- CLG_(add_eventtype)(Use, e1);
- e1 = CLG_(register_eventtype)("AcCost2");
- CLG_(add_eventtype)(Use, e1);
- e1 = CLG_(register_eventtype)("SpLoss2");
- CLG_(add_eventtype)(Use, e1);
- }
-
- Ir = CLG_(get_eventset)("Ir", 4);
- Dr = CLG_(get_eventset)("Dr", 4);
- Dw = CLG_(get_eventset)("Dw", 4);
- if (CLG_(clo).simulate_cache) {
- e1 = CLG_(register_eventtype)("Ir");
- e2 = CLG_(register_eventtype)("I1mr");
- e3 = CLG_(register_eventtype)("I2mr");
- if (clo_simulate_writeback) {
- e4 = CLG_(register_eventtype)("I2dmr");
- CLG_(add_dep_event4)(Ir, e1,e2,e3,e4);
+ if (!CLG_(clo).simulate_cache)
+ CLG_(register_event_group)(EG_IR, "Ir");
+ else if (!clo_simulate_writeback) {
+ CLG_(register_event_group3)(EG_IR, "Ir", "I1mr", "I2mr");
+ CLG_(register_event_group3)(EG_DR, "Dr", "D1mr", "D2mr");
+ CLG_(register_event_group3)(EG_DW, "Dw", "D1mw", "D2mw");
}
- else
- CLG_(add_dep_event3)(Ir, e1,e2,e3);
-
- e1 = CLG_(register_eventtype)("Dr");
- e2 = CLG_(register_eventtype)("D1mr");
- e3 = CLG_(register_eventtype)("D2mr");
- if (clo_simulate_writeback) {
- e4 = CLG_(register_eventtype)("D2dmr");
- CLG_(add_dep_event4)(Dr, e1,e2,e3,e4);
+ else { // clo_simulate_writeback
+ CLG_(register_event_group4)(EG_IR, "Ir", "I1mr", "I2mr", "I2dmr");
+ CLG_(register_event_group4)(EG_DR, "Dr", "D1mr", "D2mr", "I2dmr");
+ CLG_(register_event_group4)(EG_DW, "Dw", "D1mw", "D2mw", "I2dmw");
}
- else
- CLG_(add_dep_event3)(Dr, e1,e2,e3);
-
- e1 = CLG_(register_eventtype)("Dw");
- e2 = CLG_(register_eventtype)("D1mw");
- e3 = CLG_(register_eventtype)("D2mw");
- if (clo_simulate_writeback) {
- e4 = CLG_(register_eventtype)("D2dmw");
- CLG_(add_dep_event4)(Dw, e1,e2,e3,e4);
- }
- else
- CLG_(add_dep_event3)(Dw, e1,e2,e3);
- }
- else {
- e1 = CLG_(register_eventtype)("Ir");
- CLG_(add_eventtype)(Ir, e1);
- }
+ if (CLG_(clo).collect_alloc)
+ CLG_(register_event_group2)(EG_ALLOC, "allocCount", "allocSize");
- // Self cost event sets per guest instruction (U used only for cacheUse).
- // Each basic event set only appears once, as eg. multiple different Dr's
- // in one guest instruction are counted in the same counter.
+ if (CLG_(clo).collect_systime)
+ CLG_(register_event_group2)(EG_SYS, "sysCount", "sysTime");
- sizeOfUseIr = Use->size + Ir->size;
- UIr = CLG_(get_eventset)("UIr", sizeOfUseIr);
- CLG_(add_eventset)(UIr, Use);
- off_UIr_Ir = CLG_(add_eventset)(UIr, Ir);
+ // event set used as base for instruction self cost
+ CLG_(sets).base = CLG_(get_event_set2)(EG_USE, EG_IR);
- UIrDr = CLG_(get_eventset)("UIrDr", sizeOfUseIr + Dr->size);
- CLG_(add_eventset)(UIrDr, Use);
- off_UIrDr_Ir = CLG_(add_eventset)(UIrDr, Ir);
- off_UIrDr_Dr = CLG_(add_eventset)(UIrDr, Dr);
+ // event set comprising all event groups, used for inclusive cost
+ CLG_(sets).full = CLG_(add_event_group2)(CLG_(sets).base, EG_DR, EG_DW);
+ CLG_(sets).full = CLG_(add_event_group2)(CLG_(sets).full, EG_ALLOC, EG_SYS);
- UIrDrDw = CLG_(get_eventset)("IrDrDw", sizeOfUseIr + Dr->size + Dw->size);
- CLG_(add_eventset)(UIrDrDw, Use);
- off_UIrDrDw_Ir = CLG_(add_eventset)(UIrDrDw, Ir);
- off_UIrDrDw_Dr = CLG_(add_eventset)(UIrDrDw, Dr);
- off_UIrDrDw_Dw = CLG_(add_eventset)(UIrDrDw, Dw);
+ CLG_DEBUGIF(1) {
+ CLG_DEBUG(1, "EventSets:\n");
+ CLG_(print_eventset)(-2, CLG_(sets).base);
+ CLG_(print_eventset)(-2, CLG_(sets).full);
+ }
- UIrDw = CLG_(get_eventset)("UIrDw", sizeOfUseIr + Dw->size);
- CLG_(add_eventset)(UIrDw, Use);
- off_UIrDw_Ir = CLG_(add_eventset)(UIrDw, Ir);
- off_UIrDw_Dw = CLG_(add_eventset)(UIrDw, Dw);
-
- UIrDwDr = CLG_(get_eventset)("IrDwDr", sizeOfUseIr + Dw->size + Dr->size);
- CLG_(add_eventset)(UIrDwDr, Use);
- off_UIrDwDr_Ir = CLG_(add_eventset)(UIrDrDw, Ir);
- off_UIrDwDr_Dw = CLG_(add_eventset)(UIrDrDw, Dw);
- off_UIrDwDr_Dr = CLG_(add_eventset)(UIrDrDw, Dr);
-
-
- // the "full" event set is used as global counter and for aggregation
- if (CLG_(clo).collect_alloc) max_user += 2;
- if (CLG_(clo).collect_systime) max_user += 2;
- full = CLG_(get_eventset)("full",
- sizeOfUseIr + Dr->size + Dw->size + max_user);
- CLG_(add_eventset)(full, Use);
- CLG_(sets).off_full_Ir = CLG_(add_eventset)(full, Ir);
- CLG_(sets).off_full_Dr = CLG_(add_eventset)(full, Dr);
- CLG_(sets).off_full_Dw = CLG_(add_eventset)(full, Dw);
- if (CLG_(clo).collect_alloc) {
- e1 = CLG_(register_eventtype)("allocCount");
- e2 = CLG_(register_eventtype)("allocSize");
- CLG_(sets).off_full_alloc = CLG_(add_dep_event2)(full, e1,e2);
- }
- if (CLG_(clo).collect_systime) {
- e1 = CLG_(register_eventtype)("sysCount");
- e2 = CLG_(register_eventtype)("sysTime");
- CLG_(sets).off_full_systime = CLG_(add_dep_event2)(full, e1,e2);
- }
-
- CLG_(sets).Use = Use;
- CLG_(sets).Ir = Ir;
- CLG_(sets).Dr = Dr;
- CLG_(sets).Dw = Dw;
- CLG_(sets).UIr = UIr;
- CLG_(sets).UIrDr = UIrDr;
- CLG_(sets).UIrDrDw = UIrDrDw;
- CLG_(sets).UIrDw = UIrDw;
- CLG_(sets).UIrDwDr = UIrDwDr;
- CLG_(sets).full = full;
-
-
- CLG_DEBUGIF(1) {
- CLG_DEBUG(1, "EventSets:\n");
- CLG_(print_eventset)(-2, Use);
- CLG_(print_eventset)(-2, Ir);
- CLG_(print_eventset)(-2, Dr);
- CLG_(print_eventset)(-2, Dw);
- CLG_(print_eventset)(-2, full);
- }
-
- /* Not-existing events are silently ignored */
- CLG_(dumpmap) = CLG_(get_eventmapping)(full);
- CLG_(append_event)(CLG_(dumpmap), "Ir");
- CLG_(append_event)(CLG_(dumpmap), "Dr");
- CLG_(append_event)(CLG_(dumpmap), "Dw");
- CLG_(append_event)(CLG_(dumpmap), "I1mr");
- CLG_(append_event)(CLG_(dumpmap), "D1mr");
- CLG_(append_event)(CLG_(dumpmap), "D1mw");
- CLG_(append_event)(CLG_(dumpmap), "I2mr");
- CLG_(append_event)(CLG_(dumpmap), "D2mr");
- CLG_(append_event)(CLG_(dumpmap), "D2mw");
- CLG_(append_event)(CLG_(dumpmap), "I2dmr");
- CLG_(append_event)(CLG_(dumpmap), "D2dmr");
- CLG_(append_event)(CLG_(dumpmap), "D2dmw");
- CLG_(append_event)(CLG_(dumpmap), "AcCost1");
- CLG_(append_event)(CLG_(dumpmap), "SpLoss1");
- CLG_(append_event)(CLG_(dumpmap), "AcCost2");
- CLG_(append_event)(CLG_(dumpmap), "SpLoss2");
- CLG_(append_event)(CLG_(dumpmap), "allocCount");
- CLG_(append_event)(CLG_(dumpmap), "allocSize");
- CLG_(append_event)(CLG_(dumpmap), "sysCount");
- CLG_(append_event)(CLG_(dumpmap), "sysTime");
-
+ /* Not-existing events are silently ignored */
+ CLG_(dumpmap) = CLG_(get_eventmapping)(CLG_(sets).full);
+ CLG_(append_event)(CLG_(dumpmap), "Ir");
+ CLG_(append_event)(CLG_(dumpmap), "Dr");
+ CLG_(append_event)(CLG_(dumpmap), "Dw");
+ CLG_(append_event)(CLG_(dumpmap), "I1mr");
+ CLG_(append_event)(CLG_(dumpmap), "D1mr");
+ CLG_(append_event)(CLG_(dumpmap), "D1mw");
+ CLG_(append_event)(CLG_(dumpmap), "I2mr");
+ CLG_(append_event)(CLG_(dumpmap), "D2mr");
+ CLG_(append_event)(CLG_(dumpmap), "D2mw");
+ CLG_(append_event)(CLG_(dumpmap), "I2dmr");
+ CLG_(append_event)(CLG_(dumpmap), "D2dmr");
+ CLG_(append_event)(CLG_(dumpmap), "D2dmw");
+ CLG_(append_event)(CLG_(dumpmap), "AcCost1");
+ CLG_(append_event)(CLG_(dumpmap), "SpLoss1");
+ CLG_(append_event)(CLG_(dumpmap), "AcCost2");
+ CLG_(append_event)(CLG_(dumpmap), "SpLoss2");
+ CLG_(append_event)(CLG_(dumpmap), "allocCount");
+ CLG_(append_event)(CLG_(dumpmap), "allocSize");
+ CLG_(append_event)(CLG_(dumpmap), "sysCount");
+ CLG_(append_event)(CLG_(dumpmap), "sysTime");
}
-
-static
-void add_and_zero_Dx(EventSet* es, SimCost dst, ULong* cost)
-{
- /* if eventset use is defined, it is always first (hardcoded!) */
- CLG_(add_and_zero_cost)( CLG_(sets).Use, dst, cost);
-
- if (es == CLG_(sets).UIr) {
- CLG_(add_and_zero_cost)( CLG_(sets).Ir, dst + CLG_(sets).off_full_Ir,
- cost + off_UIr_Ir);
- }
- else if (es == CLG_(sets).UIrDr) {
- CLG_(add_and_zero_cost)( CLG_(sets).Ir, dst + CLG_(sets).off_full_Ir,
- cost + off_UIrDr_Ir);
- CLG_(add_and_zero_cost)( CLG_(sets)...
[truncated message content] |
|
From: Dave G. <go...@mc...> - 2010-06-09 22:12:42
|
Hi Bart, I mentioned this in bug #135264, but I'm not sure that it got CC'd your way. The build still fails for me complaining about "--build-id=none" on one of the machines here at work (Linux ppc64, ld v2.16.91.0.5 20051219 SUSE). The fix that worked for me was to change AC_TRY_COMPILE to AC_TRY_LINK so that configure would actually run the linker and fail the test. -Dave ------8<------ Index: configure.in =================================================================== --- configure.in (revision 11164) +++ configure.in (working copy) @@ -1285,7 +1285,7 @@ safe_CFLAGS=$CFLAGS CFLAGS="-Wl,--build-id=none" -AC_TRY_COMPILE( +AC_TRY_LINK( [ ], [return 0; ], [ ------8<------ On Jun 8, 2010 , at 1:24 PM CDT, sv...@va... wrote: > Author: bart > Date: 2010-06-08 19:23:59 +0100 (Tue, 08 Jun 2010) > New Revision: 11164 > > Log: > Added a configure test for the linker flag --build-id=none. [...] > Modified: trunk/configure.in > =================================================================== > --- trunk/configure.in 2010-06-08 15:00:18 UTC (rev 11163) > +++ trunk/configure.in 2010-06-08 18:23:59 UTC (rev 11164) > @@ -1278,6 +1278,26 @@ > CFLAGS=$safe_CFLAGS > > > +# does this compiler support -Wl,--build-id=none ? > + > +AC_MSG_CHECKING([if gcc accepts -Wl,--build-id=none]) > + > +safe_CFLAGS=$CFLAGS > +CFLAGS="-Wl,--build-id=none" > + > +AC_TRY_COMPILE( > +[ ], > +[return 0; ], > +[ > + AC_SUBST([FLAG_NO_BUILD_ID], ["-Wl,--build-id=none"]) > + AC_MSG_RESULT([yes]) > +], [ > + AC_SUBST([FLAG_NO_BUILD_ID], [""]) > + AC_MSG_RESULT([no]) > +]) > +CFLAGS=$safe_CFLAGS > + > + > # does the ppc assembler support "mtocrf" et al? > AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) |
|
From: Philippe W. <phi...@sk...> - 2010-06-09 19:52:35
|
I suppose that the reference is an object for which constructors and destructors are automatically increasing or decreasing the reference count in the object pointed to by the reference. If that is the case, you could then make a very small allocation in the constructor, store the pointer in the reference object, and do the free in the destructor of the reference object. With this, the normal leak search of valgrind (using the --show-reachable) will show you the reference objects that have not been destroyed, with the stack trace showing the reference creation. In other words, the small allocated memory becomes the sentinel variable, but automatically tracked by memcheck. Philippe ----- Original Message ----- From: "Johan Björk" <jb...@gm...> To: "Bart Van Assche" <bva...@ac...> Cc: "valgrind-developers" <val...@li...> Sent: Tuesday, June 08, 2010 6:29 PM Subject: Re: [Valgrind-developers] Using memcheck to debug referencecounting errors Ah, sorry I wasn't clear enough. I'm trying to solve it for objects that have a long lifetime, where the stacktrace for the original allocation isn't very helpful in tracking down where the reference was leaked. I've seen people solve the same problem by having a sentinel variable in the addRef()/releaseRef() functions, allowing you to either print a stacktrace (or break into a debugger) whenever a reference counting operation is done on the object you are debugging. In my particular case, we had an object cache: ObjectCache::getOrCreate(ID); which would do some magic and either allocate a new object, or return you the cached one for ID with refcount +1. At the end of execution, valgrind would tell me that I was leaking objects, but I could only see the allocation point, which wasn't enough to track down the actual leak. -Johan On Tue, Jun 8, 2010 at 5:37 PM, Bart Van Assche <bva...@ac...> wrote: > On Tue, Jun 8, 2010 at 5:25 PM, Johan Björk <jb...@gm...> wrote: >> >> I've been working with a C++ projects with many refcounted objects, >> and I ended up spending a lot of time trying to track down reference >> leaks. To aid my debugging, I wrote some very quick and dirty memcheck >> macros to help me debug. >> >> /* Create refcounted object */ >> VALGRIND_CREATE_REFCOUNTED(address,initial_value) >> /* delete refcounted object */ >> VALGRIND_DELETE_REFCOUNTED(address) >> I added this one to deal with cases where an application force deletes >> a reference counted object, even though the reference count is >0. >> (Sigh...) >> /* Modify the refcount for an object */ >> VALGRIND_MOD_REFCOUNT(address,val) >> >> I modified memcheck to store the stacktrace at each invocation of the >> MOD_REFCOUNT macro. (Avoiding duplicates by comparing the ecu, storing >> a count for each unqiue stacktrace) >> For each alive MC_Chunk object at the end of execution, I check if >> refcount != 0, and print the stacktraces, allowing (easier) manual >> inspection to locate where a reference is leaking. >> >> While the method is rather crude (Once the number of unique >> stacktraces go above 10, it's a lot of work to match the >> 'corresponding' ones), it helped me incredibly to find the leaks in my >> app. >> >> Anyone know if there has been something similar developed before? > > A straightforward technique is to allocate refcounted objects on the heap, > such that memcheck's leak checker can dump the allocation call stack of > objects that have been allocated but not deallocated. Or did I miss > something ? > > Bart. > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Valgrind-developers mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Nicholas N. <n.n...@gm...> - 2010-06-09 09:34:40
|
Nightly build on ocean ( Ubuntu 9.10, x86_64 )
Started at 2010-06-09 02:00:01 PDT
Ended at 2010-06-09 02:34:23 PDT
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
== 548 tests, 6 stderr failures, 0 stdout failures, 0 post failures ==
memcheck/tests/linux/stack_switch (stderr)
memcheck/tests/long_namespace_xml (stderr)
helgrind/tests/tc06_two_races_xml (stderr)
helgrind/tests/tc20_verifywrap (stderr)
helgrind/tests/tc23_bogus_condwait (stderr)
exp-ptrcheck/tests/bad_percentify (stderr)
=================================================
./valgrind-new/exp-ptrcheck/tests/bad_percentify.stderr.diff-glibc28-amd64
=================================================
--- bad_percentify.stderr.exp-glibc28-amd64 2010-06-09 02:17:29.000000000 -0700
+++ bad_percentify.stderr.out 2010-06-09 02:33:01.000000000 -0700
@@ -1,32 +1,29 @@
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:88)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:93)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:98)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
=================================================
./valgrind-new/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2010-06-09 02:17:26.000000000 -0700
+++ tc06_two_races_xml.stderr.out 2010-06-09 02:28:37.000000000 -0700
@@ -40,16 +40,25 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
+ <fn>T.102</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>pthread_create@@GLIBC_2.2.5</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -121,11 +130,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -175,11 +190,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -229,11 +250,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
@@ -283,11 +310,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<truncated beyond 100 lines>
=================================================
./valgrind-new/helgrind/tests/tc20_verifywrap.stderr.diff-glibc25-amd64
=================================================
--- tc20_verifywrap.stderr.exp-glibc25-amd64 2010-06-09 02:17:26.000000000 -0700
+++ tc20_verifywrap.stderr.out 2010-06-09 02:28:59.000000000 -0700
@@ -71,12 +71,14 @@
---------------- pthread_cond_wait et al ----------------
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
Thread #x's call to pthread_cond_wait failed
with error code 1 (EPERM: Operation not permitted)
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
@@ -86,12 +88,14 @@
FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
Thread #x's call to pthread_cond_timedwait failed
with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
@@ -142,6 +146,12 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
+Thread #x's call to sem_post failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: sem_post_WRK (hg_intercepts.c:...)
+ by 0x........: sem_post (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:245)
+
FIXME: can't figure out how to verify wrap of sem_post
@@ -152,4 +162,4 @@
...
-ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0)
=================================================
./valgrind-new/helgrind/tests/tc20_verifywrap.stderr.diff-glibc27-amd64
=================================================
--- tc20_verifywrap.stderr.exp-glibc27-amd64 2010-06-09 02:17:26.000000000 -0700
+++ tc20_verifywrap.stderr.out 2010-06-09 02:28:59.000000000 -0700
@@ -71,12 +71,14 @@
---------------- pthread_cond_wait et al ----------------
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
Thread #x's call to pthread_cond_wait failed
with error code 1 (EPERM: Operation not permitted)
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
@@ -86,12 +88,14 @@
FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
Thread #x's call to pthread_cond_timedwait failed
with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
=================================================
./valgrind-new/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2010-06-09 02:17:26.000000000 -0700
+++ tc23_bogus_condwait.stderr.out 2010-06-09 02:29:12.000000000 -0700
@@ -2,31 +2,38 @@
Thread #x is the program's root thread
Thread #x: pthread_cond_{timed}wait called with invalid mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:69)
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
=================================================
./valgrind-new/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2010-06-09 02:17:44.000000000 -0700
+++ stack_switch.stderr.out 2010-06-09 02:24:20.000000000 -0700
@@ -0,0 +1,3 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
+
=================================================
./valgrind-new/memcheck/tests/long_namespace_xml.stderr.diff
=================================================
--- long_namespace_xml.stderr.exp 2010-06-09 02:17:47.000000000 -0700
+++ long_namespace_xml.stderr.out 2010-06-09 02:24:28.000000000 -0700
@@ -37,7 +37,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm</fn>
+ <fn>_ZN53044basic_iostreamIwSt11char_traitsIwEE</fn>
<dir>...</dir>
<file>long_namespace_xml.cpp</file>
<line>...</line>
@@ -64,7 +64,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm</fn>
+ <fn>_ZN53044basic_iostreamIwSt11char_traitsIwEE</fn>
<dir>...</dir>
<file>long_namespace_xml.cpp</file>
<line>...</line>
=================================================
./valgrind-old/exp-ptrcheck/tests/bad_percentify.stderr.diff-glibc28-amd64
=================================================
--- bad_percentify.stderr.exp-glibc28-amd64 2010-06-09 02:00:27.000000000 -0700
+++ bad_percentify.stderr.out 2010-06-09 02:15:57.000000000 -0700
@@ -1,32 +1,29 @@
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:88)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:93)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
Invalid read of size 1
- at 0x........: strlen (h_intercepts.c:...)
- by 0x........: ...
+ at 0x........: ...
by 0x........: ...
by 0x........: VG_print_translation_stats (bad_percentify.c:98)
by 0x........: main (bad_percentify.c:107)
Address 0x........ expected vs actual:
- Expected: stack array "buf" in frame 3 back from here
+ Expected: stack array "buf" in frame 2 back from here
Actual: unknown
=================================================
./valgrind-old/helgrind/tests/tc06_two_races_xml.stderr.diff
=================================================
--- tc06_two_races_xml.stderr.exp 2010-06-09 02:00:24.000000000 -0700
+++ tc06_two_races_xml.stderr.out 2010-06-09 02:11:24.000000000 -0700
@@ -40,16 +40,25 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>do_clone</fn>
+ <fn>T.102</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>pthread_create@@GLIBC_2.2.5</fn>
+ <dir>...</dir>
+ <file>createthread.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
@@ -121,11 +130,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -175,11 +190,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot1"</auxwhat>
@@ -229,11 +250,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<auxwhat>Location 0x........ is 0 bytes inside global var "unprot2"</auxwhat>
@@ -283,11 +310,17 @@
<ip>0x........</ip>
<obj>...</obj>
<fn>start_thread</fn>
+ <dir>...</dir>
+ <file>pthread_create.c</file>
+ <line>...</line>
</frame>
<frame>
<ip>0x........</ip>
<obj>...</obj>
<fn>clone</fn>
+ <dir>...</dir>
+ <file>clone.S</file>
+ <line>...</line>
</frame>
</stack>
<truncated beyond 100 lines>
=================================================
./valgrind-old/helgrind/tests/tc20_verifywrap.stderr.diff-glibc25-amd64
=================================================
--- tc20_verifywrap.stderr.exp-glibc25-amd64 2010-06-09 02:00:24.000000000 -0700
+++ tc20_verifywrap.stderr.out 2010-06-09 02:11:45.000000000 -0700
@@ -71,12 +71,14 @@
---------------- pthread_cond_wait et al ----------------
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
Thread #x's call to pthread_cond_wait failed
with error code 1 (EPERM: Operation not permitted)
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
@@ -86,12 +88,14 @@
FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
Thread #x's call to pthread_cond_timedwait failed
with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
@@ -142,6 +146,12 @@
by 0x........: sem_wait (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:242)
+Thread #x's call to sem_post failed
+ with error code 22 (EINVAL: Invalid argument)
+ at 0x........: sem_post_WRK (hg_intercepts.c:...)
+ by 0x........: sem_post (hg_intercepts.c:...)
+ by 0x........: main (tc20_verifywrap.c:245)
+
FIXME: can't figure out how to verify wrap of sem_post
@@ -152,4 +162,4 @@
...
-ERROR SUMMARY: 20 errors from 20 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 21 errors from 21 contexts (suppressed: 0 from 0)
=================================================
./valgrind-old/helgrind/tests/tc20_verifywrap.stderr.diff-glibc27-amd64
=================================================
--- tc20_verifywrap.stderr.exp-glibc27-amd64 2010-06-09 02:00:24.000000000 -0700
+++ tc20_verifywrap.stderr.out 2010-06-09 02:11:45.000000000 -0700
@@ -71,12 +71,14 @@
---------------- pthread_cond_wait et al ----------------
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
Thread #x's call to pthread_cond_wait failed
with error code 1 (EPERM: Operation not permitted)
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:147)
@@ -86,12 +88,14 @@
FIXME: can't figure out how to verify wrap of pthread_broadcast_signal
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
Thread #x's call to pthread_cond_timedwait failed
with error code 22 (EINVAL: Invalid argument)
- at 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_timedwait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_timedwait@* (hg_intercepts.c:...)
by 0x........: main (tc20_verifywrap.c:165)
=================================================
./valgrind-old/helgrind/tests/tc23_bogus_condwait.stderr.diff
=================================================
--- tc23_bogus_condwait.stderr.exp 2010-06-09 02:00:24.000000000 -0700
+++ tc23_bogus_condwait.stderr.out 2010-06-09 02:11:57.000000000 -0700
@@ -2,31 +2,38 @@
Thread #x is the program's root thread
Thread #x: pthread_cond_{timed}wait called with invalid mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:69)
Thread #x: pthread_cond_{timed}wait called with un-held mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:72)
Thread #x: pthread_cond_{timed}wait called with mutex of type pthread_rwlock_t*
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:75)
Thread #x: pthread_cond_{timed}wait called with mutex held by a different thread
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
Thread #x: pthread_cond_{timed}wait: cond is associated with a different mutex
- at 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
+ at 0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)
+ by 0x........: pthread_cond_wait@* (hg_intercepts.c:...)
by 0x........: main (tc23_bogus_condwait.c:78)
=================================================
./valgrind-old/memcheck/tests/linux/stack_switch.stderr.diff
=================================================
--- stack_switch.stderr.exp 2010-06-09 02:00:43.000000000 -0700
+++ stack_switch.stderr.out 2010-06-09 02:06:55.000000000 -0700
@@ -0,0 +1,3 @@
+Syscall param clone(child_tidptr) contains uninitialised byte(s)
+ ...
+
=================================================
./valgrind-old/memcheck/tests/long_namespace_xml.stderr.diff
=================================================
--- long_namespace_xml.stderr.exp 2010-06-09 02:00:45.000000000 -0700
+++ long_namespace_xml.stderr.out 2010-06-09 02:07:04.000000000 -0700
@@ -37,7 +37,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm</fn>
+ <fn>_ZN53044basic_iostreamIwSt11char_traitsIwEE</fn>
<dir>...</dir>
<file>long_namespace_xml.cpp</file>
<line>...</line>
@@ -64,7 +64,7 @@
<frame>
<ip>0x........</ip>
<obj>...</obj>
- <fn>abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm</fn>
+ <fn>_ZN53044basic_iostreamIwSt11char_traitsIwEE</fn>
<dir>...</dir>
<file>long_namespace_xml.cpp</file>
<line>...</line>
|
|
From: Alexander P. <gl...@go...> - 2010-06-09 08:08:12
|
Nightly build on mcgrind ( Darwin 9.8.0 i386 ) Started at 2010-06-09 09:06:01 MSD Ended at 2010-06-09 09:25:16 MSD 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 == 443 tests, 16 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/null_socket (stdout) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) none/tests/async-sigs (stderr) none/tests/faultstatus (stderr) none/tests/pth_blockedsig (stderr) none/tests/require-text-symbol-2 (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/rwlock_race (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc23_bogus_condwait (stderr) -- Alexander Potapenko Software Engineer Google Moscow |
|
From: Bart V. A. <bva...@ac...> - 2010-06-09 07:30:36
|
Nightly build on cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2010-06-09 02:00:06 EDT Ended at 2010-06-09 03:30:18 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 458 tests, 42 stderr failures, 10 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/linux/timerfd-syscall (stdout) memcheck/tests/linux-syscalls-2007 (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stdout) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Satya V. G. <gup...@ne...> - 2010-06-09 03:34:04
|
Josef,
I now realize that I didn't have the correct Uchar* in the function fd =
VG_(connect_via_socket)(UChar* valgrind-listener-IP_Port).
As soon as I hardcoded the address, callgrind stopped crashing. Would you
know how I could retrieve the UChar* valgrind-listener-IP_Port from the
command line option?
So far here is what I have tried. Attempt 1 involved declaring the
valgrind-listener-IP_Port as a global that gets updated in
./coregrind/m_main.c when the command line is being parsed. I then extern'ed
this variable in the file ./callgrind/dump.c. That didn't work and I
surmised that these two files are probably in two separate .so files.
Attempt 2 involved writing the valgrind-listener-IP_Port into a config file
when I am in m_main.c and letting dump.c read this data from the said config
file. However, I realized that the normal data types FILE* and run time
functions like strcpy(), sprintf etc don't work with the run time libraries
that are used by valgrind.
So I'd greatly appreciate it if you could suggest how I could retrieve the
valgrind-listener-IP_Port information from the original command line options
when I am in the function new_dumpfile(..)?
Regards
SVG
-----Original Message-----
From: Josef Weidendorfer [mailto:Jos...@gm...]
Sent: Monday, June 07, 2010 5:59 PM
To: gup...@ne...
Cc: val...@li...
Subject: Re: [Valgrind-developers] Need to change where Valgrind writes logs
fo r callgrind
On Monday 07 June 2010, gup...@ne... wrote:
> Based on your comment, I changed the function new_dumpfile(..) so that
instead of the original line:
>
> fd = sr_Res(res);
>
> I now have:
>
> fd = VG_(connect_via_socket)(log_fsname_unexpanded);
>
> To get the "log_fsname_unexpanded" in the above invocation, I used the
following code:
>
> for (i = 0; i < VG_(sizeXA)( VG_(args_for_valgrind) ); i++) {
> HChar* arg = * (HChar**) VG_(indexXA)( VG_(args_for_valgrind), i
);
> VG_STR_CLO(arg, "--log-socket", log_fsname_unexpanded);
>
> Unfortunately, when I run callgrind with the --dump-before='*' or
--dump-every-bb=5 the call to new_dumpfile(..) in print_bbccs_of_thread(..)
causes a crash with the call stack showing the error to be at the line: fd =
VG_(connect_via_socket)("IP address of listener").
Now idea how that can crash at all.
Do you check for error conditions, and perhaps retry the connect?
Josef
> However, if I run callgrind without either of the two dump options, the
contents of the callgrind.out.PID.partn get written out to the
valgrind-listener.
>
> I concluded that I must be parsing the IP address correctly but somehow
the function new_dumpfile(..) doesn't like the fd for some obscure reason.
>
> Could you suggest what I may be doing wrong? I am totally stuck and would
greatly appreciate your help.
>
> Regards
>
> SVG
>
>
> Perhaps
>
> ---------- Original Message ----------
> From: Josef Weidendorfer <Jos...@gm...>
> To: val...@li...
> Cc: "gup...@ne..." <gup...@ne...>
> Subject: Re: [Valgrind-developers] Need to change where Valgrind
> writes logs for callgrind
> Date: Mon, 7 Jun 2010 18:34:47 +0200
>
> On Monday 07 June 2010, gup...@ne... wrote:
> > I am using callgrind on hardware with very small disk space. I'd like to
know where should I begin making changes so that the callgrind logs (basic
blocks, function before, function after) are written to a network socket
instead of a log-file. Could someone be of help?
>
> I suppose you would need to replace the VG_(open) calls in
> callgrind/dump.c into something opening a socket. For that, you can check
how the --log-socket option is implemented.
>
> Josef
>
> >
> > SVG
> >
> > ____________________________________________________________
> > Project Management
> > 100% Online. Project Management certificate from Villanova. Free info.
> > http://thirdpartyoffers.netzero.net/TGL3241/4c0cff6029c7223d6eest04v
> > uc
> >
> > --------------------------------------------------------------------
> > ---------- ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky
> > parental unit. See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > _______________________________________________
> > Valgrind-developers mailing list
> > Val...@li...
> > https://lists.sourceforge.net/lists/listinfo/valgrind-developers
> >
>
>
> ____________________________________________________________
> $653/Month for $150,000 Mortgage!
> Free Quotes. No SSN or Credit Check.
> http://thirdpartyoffers.netzero.net/TGL3241/4c0d68129031243cc7st03vuc
>
|