summaryrefslogtreecommitdiff
path: root/includes/rts/storage/GC.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-11-29 16:42:51 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-11-29 16:42:51 +0000
commitf9d15f9fccae4706fbdf8ee4ecaef7da9953cb74 (patch)
treeef79be277cf14c25b93739c420b7b2386f5562d4 /includes/rts/storage/GC.h
parent9ca114a5840d8d00320e90c047022fa2ca1fa668 (diff)
downloadhaskell-f9d15f9fccae4706fbdf8ee4ecaef7da9953cb74.tar.gz
Store a destination step in the block descriptor
At the moment, this just saves a memory reference in the GC inner loop (worth a percent or two of GC time). Later, it will hopefully let me experiment with partial steps, and simplifying the generation/step infrastructure.
Diffstat (limited to 'includes/rts/storage/GC.h')
-rw-r--r--includes/rts/storage/GC.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h
index b30582dfd7..aa0531382f 100644
--- a/includes/rts/storage/GC.h
+++ b/includes/rts/storage/GC.h
@@ -214,4 +214,11 @@ void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
/* (needed when dynamic libraries are used). */
extern rtsBool keepCAFs;
+INLINE_HEADER void initBdescr(bdescr *bd, step *step)
+{
+ bd->step = step;
+ bd->gen_no = step->gen_no;
+ bd->dest = step->to;
+}
+
#endif /* RTS_STORAGE_GC_H */