summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-02-20 20:57:48 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-03-05 14:53:12 -0500
commitace618cd2294989e783bd453cee88e0e1c0dad77 (patch)
tree97d34db5521cf1781e57e786eb41f14087808cf9 /libraries
parentcedd6f3041de6abe64dfa3257bec7730a9dced9f (diff)
downloadhaskell-ace618cd2294989e783bd453cee88e0e1c0dad77.tar.gz
nonmoving-gc: Track time usage of nonmoving marking
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/GHC/Stats.hsc34
1 files changed, 34 insertions, 0 deletions
diff --git a/libraries/base/GHC/Stats.hsc b/libraries/base/GHC/Stats.hsc
index 58b5e22d04..92a77504b6 100644
--- a/libraries/base/GHC/Stats.hsc
+++ b/libraries/base/GHC/Stats.hsc
@@ -103,6 +103,25 @@ data RTSStats = RTSStats {
-- | Total elapsed time (at the previous GC)
, elapsed_ns :: RtsTime
+ -- | The CPU time used during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , nonmoving_gc_sync_cpu_ns :: RtsTime
+ -- | The time elapsed during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , nonmoving_gc_sync_elapsed_ns :: RtsTime
+ -- | The maximum time elapsed during the post-mark pause phase of the
+ -- concurrent nonmoving GC.
+ , nonmoving_gc_sync_max_elapsed_ns :: RtsTime
+ -- | The CPU time used during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , nonmoving_gc_cpu_ns :: RtsTime
+ -- | The time elapsed during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , nonmoving_gc_elapsed_ns :: RtsTime
+ -- | The maximum time elapsed during the post-mark pause phase of the
+ -- concurrent nonmoving GC.
+ , nonmoving_gc_max_elapsed_ns :: RtsTime
+
-- | Details about the most recent GC
, gc :: GCDetails
} deriving ( Read -- ^ @since 4.10.0.0
@@ -146,6 +165,13 @@ data GCDetails = GCDetails {
, gcdetails_cpu_ns :: RtsTime
-- | The time elapsed during GC itself
, gcdetails_elapsed_ns :: RtsTime
+
+ -- | The CPU time used during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTime
+ -- | The time elapsed during the post-mark pause phase of the concurrent
+ -- nonmoving GC.
+ , gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTime
} deriving ( Read -- ^ @since 4.10.0.0
, Show -- ^ @since 4.10.0.0
)
@@ -192,6 +218,12 @@ getRTSStats = do
gc_elapsed_ns <- (# peek RTSStats, gc_elapsed_ns) p
cpu_ns <- (# peek RTSStats, cpu_ns) p
elapsed_ns <- (# peek RTSStats, elapsed_ns) p
+ nonmoving_gc_sync_cpu_ns <- (# peek RTSStats, nonmoving_gc_sync_cpu_ns) p
+ nonmoving_gc_sync_elapsed_ns <- (# peek RTSStats, nonmoving_gc_sync_elapsed_ns) p
+ nonmoving_gc_sync_max_elapsed_ns <- (# peek RTSStats, nonmoving_gc_sync_max_elapsed_ns) p
+ nonmoving_gc_cpu_ns <- (# peek RTSStats, nonmoving_gc_cpu_ns) p
+ nonmoving_gc_elapsed_ns <- (# peek RTSStats, nonmoving_gc_elapsed_ns) p
+ nonmoving_gc_max_elapsed_ns <- (# peek RTSStats, nonmoving_gc_max_elapsed_ns) p
let pgc = (# ptr RTSStats, gc) p
gc <- do
gcdetails_gen <- (# peek GCDetails, gen) pgc
@@ -211,5 +243,7 @@ getRTSStats = do
gcdetails_sync_elapsed_ns <- (# peek GCDetails, sync_elapsed_ns) pgc
gcdetails_cpu_ns <- (# peek GCDetails, cpu_ns) pgc
gcdetails_elapsed_ns <- (# peek GCDetails, elapsed_ns) pgc
+ gcdetails_nonmoving_gc_sync_cpu_ns <- (# peek GCDetails, nonmoving_gc_sync_cpu_ns) pgc
+ gcdetails_nonmoving_gc_sync_elapsed_ns <- (# peek GCDetails, nonmoving_gc_sync_elapsed_ns) pgc
return GCDetails{..}
return RTSStats{..}