diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-11-01 13:10:01 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-01 13:10:01 -0500 |
commit | b8e66e0eecdc58ec5fea0b2c9a9454d38858886c (patch) | |
tree | 7d25f3ee8f2b714175d1b5647d9aec1fdb550cc1 /rts/sm/GC.h | |
parent | b4686bff56377a583f0605b81fae290d3fee4c4a (diff) | |
parent | 3a18155331e07e53b9f3b1d987ed430066b17aa4 (diff) | |
download | haskell-b8e66e0eecdc58ec5fea0b2c9a9454d38858886c.tar.gz |
Merge branch 'wip/tsan/storage' into wip/tsan/all
Diffstat (limited to 'rts/sm/GC.h')
-rw-r--r-- | rts/sm/GC.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/rts/sm/GC.h b/rts/sm/GC.h index bde006913b..c5d5f6ac81 100644 --- a/rts/sm/GC.h +++ b/rts/sm/GC.h @@ -42,20 +42,32 @@ extern StgPtr mark_sp; extern bool work_stealing; -#if defined(DEBUG) -extern uint32_t mutlist_MUTVARS, mutlist_MUTARRS, mutlist_MVARS, mutlist_OTHERS, - mutlist_TVAR, - mutlist_TVAR_WATCH_QUEUE, - mutlist_TREC_CHUNK, - mutlist_TREC_HEADER; -#endif - #if defined(PROF_SPIN) && defined(THREADED_RTS) extern volatile StgWord64 whitehole_gc_spin; extern volatile StgWord64 waitForGcThreads_spin; extern volatile StgWord64 waitForGcThreads_yield; #endif +// mutable list scavenging statistics +#if defined(DEBUG) +typedef struct { + StgWord n_MUTVAR; + StgWord n_MUTARR; + StgWord n_MVAR; + StgWord n_TVAR; + StgWord n_TREC_CHUNK; + StgWord n_TVAR_WATCH_QUEUE; + StgWord n_TREC_HEADER; + StgWord n_OTHERS; +} MutListScavStats; + +extern MutListScavStats mutlist_scav_stats; + +void zeroMutListScavStats(MutListScavStats *src); +void addMutListScavStats(const MutListScavStats *src, + MutListScavStats *dest); +#endif /* DEBUG */ + void gcWorkerThread (Capability *cap); void initGcThreads (uint32_t from, uint32_t to); void freeGcThreads (void); |