@@ -370,6 +370,12 @@ sToMs s = round (s * 1000.0)
370
370
--
371
371
-- [@rts.gc.bytes_copied@] Number of bytes copied during GC
372
372
--
373
+ -- [@rts.gc.init_cpu_ms@] CPU time used by the init phase, in
374
+ -- milliseconds. GHC 8.6+ only.
375
+ --
376
+ -- [@rts.gc.init_wall_ms@] Wall clock time spent running the init
377
+ -- phase, in milliseconds. GHC 8.6+ only.
378
+ --
373
379
-- [@rts.gc.mutator_cpu_ms@] CPU time spent running mutator threads,
374
380
-- in milliseconds. This does not include any profiling overhead or
375
381
-- initialization.
@@ -423,6 +429,10 @@ registerGcMetrics store =
423
429
, (" rts.gc.num_bytes_usage_samples" , Counter . fromIntegral . Stats. major_gcs)
424
430
, (" rts.gc.cumulative_bytes_used" , Counter . fromIntegral . Stats. cumulative_live_bytes)
425
431
, (" rts.gc.bytes_copied" , Counter . fromIntegral . Stats. copied_bytes)
432
+ #if MIN_VERSION_base(4,12,0)
433
+ , (" rts.gc.init_cpu_ms" , Counter . nsToMs . Stats. init_cpu_ns)
434
+ , (" rts.gc.init_wall_ms" , Counter . nsToMs . Stats. init_elapsed_ns)
435
+ #endif
426
436
, (" rts.gc.mutator_cpu_ms" , Counter . nsToMs . Stats. mutator_cpu_ns)
427
437
, (" rts.gc.mutator_wall_ms" , Counter . nsToMs . Stats. mutator_elapsed_ns)
428
438
, (" rts.gc.gc_cpu_ms" , Counter . nsToMs . Stats. gc_cpu_ns)
@@ -491,6 +501,10 @@ emptyRTSStats = Stats.RTSStats
491
501
, cumulative_par_max_copied_bytes = 0
492
502
# if MIN_VERSION_base(4,11,0)
493
503
, cumulative_par_balanced_copied_bytes = 0
504
+ # if MIN_VERSION_base(4,12,0)
505
+ , init_cpu_ns = 0
506
+ , init_elapsed_ns = 0
507
+ # endif
494
508
# endif
495
509
, mutator_cpu_ns = 0
496
510
, mutator_elapsed_ns = 0
0 commit comments