• Simon Marlow's avatar
    Eliminate zero_static_objects_list() · b949c96b
    Simon Marlow authored
    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
Compact.c 26 KB