@@ -388,6 +388,10 @@ createDistribution name store = do
388
388
--
389
389
-- [@rts.gc.max_bytes_used@] Maximum number of live bytes seen so far
390
390
--
391
+ -- [@rts.gc.max_large_bytes_used@] Maximum number of live bytes seen so far just in large ojects
392
+ --
393
+ -- [@rts.gc.max_compact_bytes_used@] Maximum number of live bytes seen so far just in compact regions
394
+ --
391
395
-- [@rts.gc.current_bytes_used@] Current number of live bytes
392
396
--
393
397
-- [@rts.gc.current_bytes_slop@] Current number of bytes lost to slop
@@ -408,7 +412,22 @@ createDistribution name store = do
408
412
-- the most active GC thread each GC. The ratio of
409
413
-- @par_tot_bytes_copied@ divided by @par_max_bytes_copied@ approaches
410
414
-- 1 for a maximally sequential run and approaches the number of
411
- -- threads (set by the RTS flag @-N@) for a maximally parallel run.
415
+ -- threads (set by the RTS flag @-N@) for a maximally parallel run. Deprecated by
416
+ -- GHC in later versions.
417
+ --
418
+ -- [@rts.gc.par_balanced_bytes_copied@] Sum of balanced data copied by all threads in parallel GC, across all parallel GCs.
419
+ --
420
+ -- [@rts.gc.nm.sync_cpu_ms@] The total CPU time used during the post-mark pause phase of the concurrent nonmoving GC.
421
+ --
422
+ -- [@rts.gc.nm.sync_elapsed_ms@] The total time elapsed during the post-mark pause phase of the concurrent nonmoving GC.
423
+ --
424
+ -- [@rts.gc.nm.sync_max_elapsed_ms@] The maximum elapsed length of any post-mark pause phase of the concurrent nonmoving GC.
425
+ --
426
+ -- [@rts.gc.nm.cpu_ms@] The total CPU time used by the nonmoving GC.
427
+ --
428
+ -- [@rts.gc.nm.elapsed_ms@] The total time elapsed during which there is a nonmoving GC active.
429
+ --
430
+ -- [@rts.gc.nm.max_elapsed_ms@] The maximum time elapsed during any nonmoving GC cycle.
412
431
registerGcMetrics :: Store -> IO ()
413
432
registerGcMetrics =
414
433
registerGroup
@@ -430,13 +449,26 @@ registerGcMetrics =
430
449
, (" rts.gc.cpu_ms" , Counter . nsToMs . Stats. cpu_ns)
431
450
, (" rts.gc.wall_ms" , Counter . nsToMs . Stats. elapsed_ns)
432
451
, (" rts.gc.max_bytes_used" , Gauge . fromIntegral . Stats. max_live_bytes)
452
+ , (" rts.gc.max_large_bytes_used" , Gauge . fromIntegral . Stats. max_large_objects_bytes)
453
+ , (" rts.gc.max_compact_bytes_used" , Gauge . fromIntegral . Stats. max_compact_bytes)
433
454
, (" rts.gc.current_bytes_used" , Gauge . fromIntegral . Stats. gcdetails_live_bytes . Stats. gc)
434
455
, (" rts.gc.current_bytes_slop" , Gauge . fromIntegral . Stats. gcdetails_slop_bytes . Stats. gc)
435
456
, (" rts.gc.max_bytes_slop" , Gauge . fromIntegral . Stats. max_slop_bytes)
436
457
, (" rts.gc.peak_megabytes_allocated" , Gauge . fromIntegral . (`quot` (1024 * 1024 )) . Stats. max_mem_in_use_bytes)
437
458
, (" rts.gc.par_tot_bytes_copied" , Gauge . fromIntegral . Stats. par_copied_bytes)
438
459
, (" rts.gc.par_avg_bytes_copied" , Gauge . fromIntegral . Stats. par_copied_bytes)
439
460
, (" rts.gc.par_max_bytes_copied" , Gauge . fromIntegral . Stats. cumulative_par_max_copied_bytes)
461
+ #if MIN_VERSION_base(4,11,0)
462
+ , (" rts.gc.par_balanced_bytes_copied" , Gauge . fromIntegral . Stats. cumulative_par_balanced_copied_bytes)
463
+ #if MIN_VERSION_base(4,15,0)
464
+ , (" rts.gc.nm.sync_cpu_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_cpu_ns)
465
+ , (" rts.gc.nm.sync_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_elapsed_ns)
466
+ , (" rts.gc.nm.sync_max_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_sync_max_elapsed_ns)
467
+ , (" rts.gc.nm.cpu_ms" , Counter . nsToMs . Stats. nonmoving_gc_cpu_ns)
468
+ , (" rts.gc.nm.elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_elapsed_ns)
469
+ , (" rts.gc.nm.max_elapsed_ms" , Counter . nsToMs . Stats. nonmoving_gc_max_elapsed_ns)
470
+ # endif
471
+ # endif
440
472
])
441
473
getRTSStats
442
474
where
@@ -501,6 +533,14 @@ emptyRTSStats = Stats.RTSStats
501
533
# if MIN_VERSION_base(4,12,0)
502
534
, init_cpu_ns = 0
503
535
, init_elapsed_ns = 0
536
+ # if MIN_VERSION_base(4,15,0)
537
+ , nonmoving_gc_sync_cpu_ns = 0
538
+ , nonmoving_gc_sync_elapsed_ns = 0
539
+ , nonmoving_gc_sync_max_elapsed_ns = 0
540
+ , nonmoving_gc_cpu_ns = 0
541
+ , nonmoving_gc_elapsed_ns = 0
542
+ , nonmoving_gc_max_elapsed_ns = 0
543
+ # endif
504
544
# endif
505
545
# endif
506
546
, mutator_cpu_ns = 0
@@ -526,6 +566,13 @@ emptyGCDetails = Stats.GCDetails
526
566
, gcdetails_par_max_copied_bytes = 0
527
567
# if MIN_VERSION_base(4,11,0)
528
568
, gcdetails_par_balanced_copied_bytes = 0
569
+ # if MIN_VERSION_base(4,15,0)
570
+ , gcdetails_nonmoving_gc_sync_cpu_ns = 0
571
+ , gcdetails_nonmoving_gc_sync_elapsed_ns = 0
572
+ # if MIN_VERSION_base(4,18,0)
573
+ , gcdetails_block_fragmentation_bytes = 0
574
+ # endif
575
+ # endif
529
576
# endif
530
577
, gcdetails_sync_elapsed_ns = 0
531
578
, gcdetails_cpu_ns = 0
0 commit comments