diff options
author | Simon Marlow <marlowsd@gmail.com> | 2015-07-16 15:01:49 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2015-07-22 17:34:44 +0100 |
commit | b949c96b4960168a3b399fe14485b24a2167b982 (patch) | |
tree | 16cc7295237eba92b5e2ba6efae6c50c2e7fe8e1 /rts/sm/Compact.c | |
parent | 1b76997dba5c35ee956960e1948ee247dc57c500 (diff) | |
download | haskell-b949c96b4960168a3b399fe14485b24a2167b982.tar.gz |
Eliminate zero_static_objects_list()
Summary:
In a workload with a large amount of code, zero_static_objects_list()
takes a significant amount of time, and furthermore it is in the
single-threaded part of the GC.
This patch uses a slightly fiddly scheme for marking objects on the
static object lists, using a flag in the low 2 bits that flips between
two states to indicate whether an object has been visited during this
GC or not. We also have to take into account objects that have not
been visited yet, which might appear at any time due to runtime linking.
Test Plan: validate
Reviewers: austin, bgamari, ezyang, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1076
Diffstat (limited to 'rts/sm/Compact.c')
-rw-r--r-- | rts/sm/Compact.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index a053dc3b4e..4ee88da11c 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -197,8 +197,8 @@ thread_static( StgClosure* p ) // keep going until we've threaded all the objects on the linked // list... - while (p != END_OF_STATIC_LIST) { - + while (p != END_OF_STATIC_OBJECT_LIST) { + p = UNTAG_STATIC_LIST_PTR(p); info = get_itbl(p); switch (info->type) { |