summaryrefslogtreecommitdiff
path: root/rts/sm/Compact.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmarhaskell@gmail.com>2008-04-16 23:44:20 +0000
committerSimon Marlow <simonmarhaskell@gmail.com>2008-04-16 23:44:20 +0000
commit200c73fdfea734765c48309cc8dcbcf44b69c8c5 (patch)
tree3c2368de05e5050dede56981076c7a9bbfcea457 /rts/sm/Compact.c
parent233a468745d108ea845e0898e4177df2c3734fc0 (diff)
downloadhaskell-200c73fdfea734765c48309cc8dcbcf44b69c8c5.tar.gz
Don't traverse the entire list of threads on every GC (phase 1)
Instead of keeping a single list of all threads, keep one per step and only look at the threads belonging to steps that we are collecting.
Diffstat (limited to 'rts/sm/Compact.c')
-rw-r--r--rts/sm/Compact.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c
index fa6efa9f4e..c5f0c37130 100644
--- a/rts/sm/Compact.c
+++ b/rts/sm/Compact.c
@@ -986,7 +986,9 @@ compact(StgClosure *static_objects)
}
// the global thread list
- thread((void *)&all_threads);
+ for (s = 0; s < total_steps; s++) {
+ thread((void *)&all_steps[s].threads);
+ }
// any threads resurrected during this GC
thread((void *)&resurrected_threads);