|
From: <sv...@va...> - 2008-09-06 18:46:34
|
Author: sewardj
Date: 2008-09-06 19:46:45 +0100 (Sat, 06 Sep 2008)
New Revision: 8566
Log:
Add cost-center annotations to all allocation points in Cachegrind.
Modified:
branches/YARD/cachegrind/cg_main.c
branches/YARD/cachegrind/cg_sim.c
Modified: branches/YARD/cachegrind/cg_main.c
===================================================================
--- branches/YARD/cachegrind/cg_main.c 2008-09-06 18:45:50 UTC (rev 8565)
+++ branches/YARD/cachegrind/cg_main.c 2008-09-06 18:46:45 UTC (rev 8566)
@@ -196,7 +196,7 @@
return *s_ptr;
} else {
Char** s_node = VG_(OSetGen_AllocNode)(stringTable, sizeof(Char*));
- *s_node = VG_(strdup)(s);
+ *s_node = VG_(strdup)("cg.main.gps.1", s);
VG_(OSetGen_Insert)(stringTable, s_node);
return *s_node;
}
@@ -1762,15 +1762,18 @@
CC_table =
VG_(OSetGen_Create)(offsetof(LineCC, loc),
cmp_CodeLoc_LineCC,
- VG_(malloc), VG_(free));
+ VG_(malloc), "cg.main.cpci.1",
+ VG_(free));
instrInfoTable =
VG_(OSetGen_Create)(/*keyOff*/0,
NULL,
- VG_(malloc), VG_(free));
+ VG_(malloc), "cg.main.cpci.2",
+ VG_(free));
stringTable =
VG_(OSetGen_Create)(/*keyOff*/0,
stringCmp,
- VG_(malloc), VG_(free));
+ VG_(malloc), "cg.main.cpci.3",
+ VG_(free));
configure_caches(&I1c, &D1c, &L2c);
Modified: branches/YARD/cachegrind/cg_sim.c
===================================================================
--- branches/YARD/cachegrind/cg_sim.c 2008-09-06 18:45:50 UTC (rev 8565)
+++ branches/YARD/cachegrind/cg_sim.c 2008-09-06 18:46:45 UTC (rev 8566)
@@ -74,7 +74,8 @@
c->size, c->line_size, c->assoc);
}
- c->tags = VG_(malloc)(sizeof(UWord) * c->sets * c->assoc);
+ c->tags = VG_(malloc)("cg.sim.ci.1",
+ sizeof(UWord) * c->sets * c->assoc);
for (i = 0; i < c->sets * c->assoc; i++)
c->tags[i] = 0;
|