diff options
author | Duncan Coutts <duncan@well-typed.com> | 2011-06-02 17:28:56 +0100 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2011-07-18 16:31:14 +0100 |
commit | ddb47a91da7132da2303c60a5aff4e38fb2dcf1a (patch) | |
tree | 0c46f1cc36738bf769005837fd555ad772dd5a95 /rts/Capability.h | |
parent | 1be80fdb6a8e993141a3bdd4cb71cd40f693018e (diff) | |
download | haskell-ddb47a91da7132da2303c60a5aff4e38fb2dcf1a.tar.gz |
Add assertion of the invariant for the spark counters
The invariant is: created = converted + remaining + gcd + fizzled
Since sparks move between capabilities, we have to aggregate the
counters over all capabilities. This in turn means we can only check
the invariant at stable points where all but one capabilities are
stopped. We can do this at shutdown time and before and after a global
synchronised GC.
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index 2037989612..10c7c496e4 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -139,6 +139,10 @@ struct Capability_ { ASSERT(myTask() == task); \ ASSERT_TASK_ID(task); +#if defined(THREADED_RTS) +rtsBool checkSparkCountInvariant (void); +#endif + // Converts a *StgRegTable into a *Capability. // INLINE_HEADER Capability * |