diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-16 15:03:13 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-17 11:21:11 -0500 |
commit | 937feda39e0cc79cd5d23d36f5a81155d992b9f9 (patch) | |
tree | c4b590f2e883da5c8b511c27ca835642fe51be38 /rts/TraverseHeap.h | |
parent | 30c01e4227e99e10e50b05075ec071cf7950ae78 (diff) | |
download | haskell-937feda39e0cc79cd5d23d36f5a81155d992b9f9.tar.gz |
rts: TraverseHeap: Make "flip" bit flip into it's own function
Diffstat (limited to 'rts/TraverseHeap.h')
-rw-r--r-- | rts/TraverseHeap.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rts/TraverseHeap.h b/rts/TraverseHeap.h index b0ecbd2a02..e24b0aae87 100644 --- a/rts/TraverseHeap.h +++ b/rts/TraverseHeap.h @@ -56,9 +56,11 @@ typedef struct traverseState_ { * variable, 'flip' and "flip" this variable when we want to invalidate all * objects. * - * When the visited bit is equal to the value of 'flip' the closure data - * is valid otherwise not (see isTravDataValid). We then invert the value of - * 'flip' after each each profiling run (see traverseWorkStack). + * When the visited bit is equal to the value of 'flip' the closure data is + * valid otherwise not (see isTravDataValid). Both the value of the closure + * and global 'flip' value start out as zero, so all closures are considered + * valid. Before every traversal we invert the value of 'flip' (see + * traverseInvalidateClosureData) invalidating all closures. * * There are some complications with this approach, namely: static objects * and mutable data. There we do just go over all existing objects to reset @@ -162,6 +164,7 @@ bool isTravDataValid(const traverseState *ts, const StgClosure *c); void traverseWorkStack(traverseState *ts, visitClosure_cb visit_cb); void traversePushRoot(traverseState *ts, StgClosure *c, StgClosure *cp, stackData data); bool traverseMaybeInitClosureData(const traverseState* ts, StgClosure *c); +void traverseInvalidateClosureData(traverseState* ts); void initializeTraverseStack(traverseState *ts); void closeTraverseStack(traverseState *ts); |