projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8425e6e
)
count the number of todo blocks, and add a trace
author
simonmar@microsoft.com
<unknown>
Tue, 27 Nov 2007 16:07:17 +0000
(16:07 +0000)
committer
simonmar@microsoft.com
<unknown>
Tue, 27 Nov 2007 16:07:17 +0000
(16:07 +0000)
rts/sm/GCUtils.c
patch
|
blob
|
history
diff --git
a/rts/sm/GCUtils.c
b/rts/sm/GCUtils.c
index
441bb3e
..
6341067
100644
(file)
--- a/
rts/sm/GCUtils.c
+++ b/
rts/sm/GCUtils.c
@@
-17,6
+17,7
@@
#include "GC.h"
#include "GCUtils.h"
#include "Printer.h"
#include "GC.h"
#include "GCUtils.h"
#include "Printer.h"
+#include "Trace.h"
#ifdef THREADED_RTS
SpinLock gc_alloc_block_sync;
#ifdef THREADED_RTS
SpinLock gc_alloc_block_sync;
@@
-57,6
+58,7
@@
grab_todo_block (step_workspace *ws)
if (stp->todos) {
bd = stp->todos;
stp->todos = bd->link;
if (stp->todos) {
bd = stp->todos;
stp->todos = bd->link;
+ stp->n_todos--;
bd->link = NULL;
}
RELEASE_SPIN_LOCK(&stp->sync_todo);
bd->link = NULL;
}
RELEASE_SPIN_LOCK(&stp->sync_todo);
@@
-70,6
+72,8
@@
push_todo_block (bdescr *bd, step *stp)
ACQUIRE_SPIN_LOCK(&stp->sync_todo);
bd->link = stp->todos;
stp->todos = bd;
ACQUIRE_SPIN_LOCK(&stp->sync_todo);
bd->link = stp->todos;
stp->todos = bd;
+ stp->n_todos++;
+ trace(TRACE_gc, "step %d, n_todos: %d", stp->abs_no, stp->n_todos);
RELEASE_SPIN_LOCK(&stp->sync_todo);
}
RELEASE_SPIN_LOCK(&stp->sync_todo);
}