diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-07-16 13:49:16 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-02-17 11:21:10 -0500 |
commit | d7bbaf5d45fd7b88ce331659abe29d16d086684b (patch) | |
tree | 9e3dd30895822ba3f01972008d6313803d6852aa /rts/TraverseHeap.h | |
parent | eecdb0531d98d59d5734828356e65f0d4b9b2977 (diff) | |
download | haskell-d7bbaf5d45fd7b88ce331659abe29d16d086684b.tar.gz |
rts: TraverseHeap: Make trav. data macros into functions
This allows the global 'flip' variable not to be exported. This allows a
future commit to also make it part of the traversalState struct.
Diffstat (limited to 'rts/TraverseHeap.h')
-rw-r--r-- | rts/TraverseHeap.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/rts/TraverseHeap.h b/rts/TraverseHeap.h index cc217a8858..3855123323 100644 --- a/rts/TraverseHeap.h +++ b/rts/TraverseHeap.h @@ -18,12 +18,6 @@ void resetStaticObjectForProfiling(StgClosure *static_objects); -/* See Note [Profiling heap traversal visited bit]. */ -extern StgWord flip; - -#define isTravDataValid(c) \ - ((((StgWord)(c)->header.prof.hp.trav & 1) ^ flip) == 0) - typedef struct traverseState_ traverseState; typedef union stackData_ { @@ -128,6 +122,10 @@ typedef bool (*visitClosure_cb) ( stackAccum *accum, stackData *child_data); +StgWord getTravData(const StgClosure *c); +void setTravData(StgClosure *c, StgWord w); +bool isTravDataValid(const StgClosure *c); + void traverseWorkStack(traverseState *ts, visitClosure_cb visit_cb); void traversePushRoot(traverseState *ts, StgClosure *c, StgClosure *cp, stackData data); bool traverseMaybeInitClosureData(StgClosure *c); |