summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-06-14 18:01:59 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-09-22 15:18:10 +0200
commit2f2f6dd5b708eae4888782ca3eb555152b64ee90 (patch)
tree31b7e16d658dec5c706d6dd74c101d99b987f1a2 /includes
parentf083358b177fad4d5f0325d3cc099eeed64e7f54 (diff)
downloadhaskell-2f2f6dd5b708eae4888782ca3eb555152b64ee90.tar.gz
rts: Generalise profiling heap traversal flip bit handling
This commit starts renaming some flip bit related functions for the generalised heap traversal code and adds provitions for sharing the per-closure profiling header field currently used exclusively for retainer profiling with other heap traversal profiling modes.
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/storage/Closures.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/includes/rts/storage/Closures.h b/includes/rts/storage/Closures.h
index 3e90306b65..6088fc8a10 100644
--- a/includes/rts/storage/Closures.h
+++ b/includes/rts/storage/Closures.h
@@ -20,7 +20,20 @@
typedef struct {
CostCentreStack *ccs;
union {
- struct _RetainerSet *rs; /* Retainer Set */
+
+ union {
+ /* Accessor for the least significant bit of the entire union. Invariant:
+ * This must be at least as large as the largest field in this union for
+ * this to work. If you add more fields make sure you maintain this.
+ *
+ * See Note [Profiling heap traversal visited bit].
+ */
+ StgWord lsb;
+
+ /* Retainer Set */
+ struct _RetainerSet *rs;
+ } trav;
+
StgWord ldvw; /* Lag/Drag/Void Word */
} hp;
} StgProfHeader;