projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small cleanups
[ghc-hetmet.git]
/
rts
/
ProfHeap.c
diff --git
a/rts/ProfHeap.c
b/rts/ProfHeap.c
index
4aecd0b
..
ea71e20
100644
(file)
--- a/
rts/ProfHeap.c
+++ b/
rts/ProfHeap.c
@@
-137,9
+137,7
@@
static char *type_names[] = {
, "RET_BCO"
, "RET_SMALL"
, "RET_BCO"
, "RET_SMALL"
- , "RET_VEC_SMALL"
, "RET_BIG"
, "RET_BIG"
- , "RET_VEC_BIG"
, "RET_DYN"
, "UPDATE_FRAME"
, "CATCH_FRAME"
, "RET_DYN"
, "UPDATE_FRAME"
, "CATCH_FRAME"
@@
-316,6
+314,13
@@
initEra(Census *census)
census->drag_total = 0;
}
census->drag_total = 0;
}
+STATIC_INLINE void
+freeEra(Census *census)
+{
+ arenaFree(census->arena);
+ freeHashTable(census->hash, NULL);
+}
+
/* --------------------------------------------------------------------------
* Increases era by 1 and initialize census[era].
* Reallocates gi[] and increases its size if needed.
/* --------------------------------------------------------------------------
* Increases era by 1 and initialize census[era].
* Reallocates gi[] and increases its size if needed.
@@
-355,6
+360,10
@@
void initProfiling1( void )
{
}
{
}
+void freeProfiling1( void )
+{
+}
+
void initProfiling2( void )
{
if (RtsFlags.ProfFlags.doHeapProfile) {
void initProfiling2( void )
{
if (RtsFlags.ProfFlags.doHeapProfile) {
@@
-493,6
+502,14
@@
endHeapProfiling(void)
}
#endif
}
#endif
+ {
+ nat t;
+ for (t = 0; t <= era; t++) {
+ freeEra( &censuses[t] );
+ }
+ }
+ stgFree(censuses);
+
seconds = mut_user_time();
printSample(rtsTrue, seconds);
printSample(rtsFalse, seconds);
seconds = mut_user_time();
printSample(rtsTrue, seconds);
printSample(rtsFalse, seconds);