Get current runtime system statistics.
Modulerebase-1.21.2Haskell2010
Rebase.GHC.Stats
- 3 types
- 2 values
- Packagerebase-1.21.2
- Exports5
- LanguageHaskell2010
- LicenceMIT
- SourceStats.hsc
Returns whether GC stats have been enabled (with +RTS -T, for example).
Statistics about a single GC. This is a mirror of the C struct
GCDetails in RtsAPI.h, with the field prefixed with gc_ to
avoid collisions with RTSStats.
Constructors
GCDetailsgcdetails_gen :: Word32The generation number of this GC
gcdetails_threads :: Word32Number of threads used in this GC
gcdetails_allocated_bytes :: Word64Number of bytes allocated since the previous GC
gcdetails_live_bytes :: Word64Total amount of live data in the heap (includes large + compact data). Updated after every GC. Data in uncollected generations (in minor GCs) are considered live.
gcdetails_large_objects_bytes :: Word64Total amount of live data in large objects
gcdetails_compact_bytes :: Word64Total amount of live data in compact regions
gcdetails_slop_bytes :: Word64Total amount of slop (wasted memory)
gcdetails_mem_in_use_bytes :: Word64Total amount of memory in use by the RTS
gcdetails_copied_bytes :: Word64Total amount of data copied during this GC
gcdetails_par_max_copied_bytes :: Word64In parallel GC, the max amount of data copied by any one thread. Deprecated.
gcdetails_par_balanced_copied_bytes :: Word64In parallel GC, the amount of balanced data copied by all threads
gcdetails_block_fragmentation_bytes :: Word64The amount of memory lost due to block fragmentation in bytes. Block fragmentation is the difference between the amount of blocks retained by the RTS and the blocks that are in use. This occurs when megablocks are only sparsely used, eg, when data that cannot be moved retains a megablock.
gcdetails_sync_elapsed_ns :: RtsTimeThe time elapsed during synchronisation before GC
gcdetails_cpu_ns :: RtsTimeThe CPU time used during GC itself
gcdetails_elapsed_ns :: RtsTimeThe time elapsed during GC itself
gcdetails_nonmoving_gc_sync_cpu_ns :: RtsTimeThe CPU time used during the post-mark pause phase of the concurrent nonmoving GC.
gcdetails_nonmoving_gc_sync_elapsed_ns :: RtsTimeThe time elapsed during the post-mark pause phase of the concurrent nonmoving GC.
Instances4Read, Show, Generic, Rep
Read GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.StatsShow GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.StatsGeneric GCDetailsDefined in ghc-internal-9.1003.0 · GHC.Internal.Statstype Rep GCDetails = D1 ('MetaDataDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats"GCDetails"
"GHC.Internal.Stats"
"ghc-internal"
'False) (C1 ('MetaCons"GCDetails"
'PrefixI 'True) ((((S1 ('MetaSel ('Just"gcdetails_gen"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just"gcdetails_threads"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just"gcdetails_allocated_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"gcdetails_live_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just"gcdetails_large_objects_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"gcdetails_compact_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just"gcdetails_slop_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"gcdetails_mem_in_use_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))) :*: (((S1 ('MetaSel ('Just"gcdetails_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"gcdetails_par_max_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just"gcdetails_par_balanced_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"gcdetails_block_fragmentation_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just"gcdetails_sync_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"gcdetails_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime)) :*: (S1 ('MetaSel ('Just"gcdetails_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: (S1 ('MetaSel ('Just"gcdetails_nonmoving_gc_sync_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"gcdetails_nonmoving_gc_sync_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime)))))))
Statistics about runtime activity since the start of the
program. This is a mirror of the C struct RTSStats in RtsAPI.h
Constructors
RTSStatsgcs :: Word32Total number of GCs
major_gcs :: Word32Total number of major (oldest generation) GCs
allocated_bytes :: Word64Total bytes allocated
max_live_bytes :: Word64Maximum live data (including large objects + compact regions) in the heap. Updated after a major GC.
max_large_objects_bytes :: Word64Maximum live data in large objects
max_compact_bytes :: Word64Maximum live data in compact regions
max_slop_bytes :: Word64Maximum slop
max_mem_in_use_bytes :: Word64Maximum memory in use by the RTS
cumulative_live_bytes :: Word64Sum of live bytes across all major GCs. Divided by major_gcs gives the average live data over the lifetime of the program.
copied_bytes :: Word64Sum of copied_bytes across all GCs
par_copied_bytes :: Word64Sum of copied_bytes across all parallel GCs
cumulative_par_max_copied_bytes :: Word64Sum of par_max_copied_bytes across all parallel GCs. Deprecated.
cumulative_par_balanced_copied_bytes :: Word64Sum of par_balanced_copied bytes across all parallel GCs
init_cpu_ns :: RtsTimeTotal CPU time used by the init phase @since base-4.12.0.0
init_elapsed_ns :: RtsTimeTotal elapsed time used by the init phase @since base-4.12.0.0
mutator_cpu_ns :: RtsTimeTotal CPU time used by the mutator
mutator_elapsed_ns :: RtsTimeTotal elapsed time used by the mutator
gc_cpu_ns :: RtsTimeTotal CPU time used by the GC
gc_elapsed_ns :: RtsTimeTotal elapsed time used by the GC
cpu_ns :: RtsTimeTotal CPU time (at the previous GC)
elapsed_ns :: RtsTimeTotal elapsed time (at the previous GC)
nonmoving_gc_sync_cpu_ns :: RtsTimeThe total CPU time used during the post-mark pause phase of the concurrent nonmoving GC.
nonmoving_gc_sync_elapsed_ns :: RtsTimeThe total time elapsed during the post-mark pause phase of the concurrent nonmoving GC.
nonmoving_gc_sync_max_elapsed_ns :: RtsTimeThe maximum elapsed length of any post-mark pause phase of the concurrent nonmoving GC.
nonmoving_gc_cpu_ns :: RtsTimeThe total CPU time used by the nonmoving GC.
nonmoving_gc_elapsed_ns :: RtsTimeThe total time elapsed during which there is a nonmoving GC active.
nonmoving_gc_max_elapsed_ns :: RtsTimeThe maximum time elapsed during any nonmoving GC cycle.
gc :: GCDetailsDetails about the most recent GC
Instances4Read, Show, Generic, Rep
Read RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.StatsShow RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.StatsGeneric RTSStatsDefined in ghc-internal-9.1003.0 · GHC.Internal.Statstype Rep RTSStats = D1 ('MetaDataDefined in ghc-internal-9.1003.0 · GHC.Internal.Stats"RTSStats"
"GHC.Internal.Stats"
"ghc-internal"
'False) (C1 ('MetaCons"RTSStats"
'PrefixI 'True) ((((S1 ('MetaSel ('Just"gcs"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: (S1 ('MetaSel ('Just"major_gcs"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32) :*: S1 ('MetaSel ('Just"allocated_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just"max_live_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"max_large_objects_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just"max_compact_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"max_slop_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))) :*: ((S1 ('MetaSel ('Just"max_mem_in_use_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: (S1 ('MetaSel ('Just"cumulative_live_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) :*: ((S1 ('MetaSel ('Just"par_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"cumulative_par_max_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just"cumulative_par_balanced_copied_bytes"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just"init_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime))))) :*: (((S1 ('MetaSel ('Just"init_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: (S1 ('MetaSel ('Just"mutator_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"mutator_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime))) :*: ((S1 ('MetaSel ('Just"gc_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"gc_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime)) :*: (S1 ('MetaSel ('Just"cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime)))) :*: ((S1 ('MetaSel ('Just"nonmoving_gc_sync_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: (S1 ('MetaSel ('Just"nonmoving_gc_sync_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"nonmoving_gc_sync_max_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime))) :*: ((S1 ('MetaSel ('Just"nonmoving_gc_cpu_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"nonmoving_gc_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime)) :*: (S1 ('MetaSel ('Just"nonmoving_gc_max_elapsed_ns"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 RtsTime) :*: S1 ('MetaSel ('Just"gc"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 GCDetails)))))))
Time values from the RTS, using a fixed resolution of nanoseconds.