Commit 0a778ebe authored by Ben Gamari's avatar Ben Gamari 🐢

Revert "rts, base: Refactor stats.c to improve --machine-readable report"

This reverts commit 2d4bda2e.
parent 57001d93
...@@ -184,7 +184,7 @@ typedef struct _RTSStats { ...@@ -184,7 +184,7 @@ typedef struct _RTSStats {
uint64_t par_copied_bytes; uint64_t par_copied_bytes;
// Sum of par_max_copied_bytes across all parallel GCs // Sum of par_max_copied_bytes across all parallel GCs
uint64_t cumulative_par_max_copied_bytes; uint64_t cumulative_par_max_copied_bytes;
// Sum of par_balanced_copied_byes across all parallel GCs. // Sum of par_balanced_copied_byes across all parallel GCs.
uint64_t cumulative_par_balanced_copied_bytes; uint64_t cumulative_par_balanced_copied_bytes;
// ----------------------------------- // -----------------------------------
...@@ -192,10 +192,6 @@ typedef struct _RTSStats { ...@@ -192,10 +192,6 @@ typedef struct _RTSStats {
// (we use signed values here because due to inaccuracies in timers // (we use signed values here because due to inaccuracies in timers
// the values can occasionally go slightly negative) // the values can occasionally go slightly negative)
// Total CPU time used by the init phase
Time init_cpu_ns;
// Total elapsed time used by the init phase
Time init_elapsed_ns;
// Total CPU time used by the mutator // Total CPU time used by the mutator
Time mutator_cpu_ns; Time mutator_cpu_ns;
// Total elapsed time used by the mutator // Total elapsed time used by the mutator
...@@ -217,26 +213,26 @@ typedef struct _RTSStats { ...@@ -217,26 +213,26 @@ typedef struct _RTSStats {
// ----------------------------------- // -----------------------------------
// Internal Counters // Internal Counters
// The number of times a GC thread spun on its 'gc_spin' lock. // The number of times a GC thread spun on its 'gc_spin' lock.
// Will be zero if the rts was not built with PROF_SPIN // Will be zero if the rts was not built with PROF_SPIN
uint64_t gc_spin_spin; uint64_t gc_spin_spin;
// The number of times a GC thread yielded on its 'gc_spin' lock. // The number of times a GC thread yielded on its 'gc_spin' lock.
// Will be zero if the rts was not built with PROF_SPIN // Will be zero if the rts was not built with PROF_SPIN
uint64_t gc_spin_yield; uint64_t gc_spin_yield;
// The number of times a GC thread spun on its 'mut_spin' lock. // The number of times a GC thread spun on its 'mut_spin' lock.
// Will be zero if the rts was not built with PROF_SPIN // Will be zero if the rts was not built with PROF_SPIN
uint64_t mut_spin_spin; uint64_t mut_spin_spin;
// The number of times a GC thread yielded on its 'mut_spin' lock. // The number of times a GC thread yielded on its 'mut_spin' lock.
// Will be zero if the rts was not built with PROF_SPIN // Will be zero if the rts was not built with PROF_SPIN
uint64_t mut_spin_yield; uint64_t mut_spin_yield;
// The number of times a GC thread has checked for work across all parallel // The number of times a GC thread has checked for work across all parallel
// GCs // GCs
uint64_t any_work; uint64_t any_work;
// The number of times a GC thread has checked for work and found none // The number of times a GC thread has checked for work and found none across
// across all parallel GCs // all parallel GCs
uint64_t no_work; uint64_t no_work;
// The number of times a GC thread has iterated it's outer loop across all // The number of times a GC thread has iterated it's outer loop across all
// parallel GCs // parallel GCs
uint64_t scav_find_work; uint64_t scav_find_work;
} RTSStats; } RTSStats;
......
...@@ -83,12 +83,6 @@ data RTSStats = RTSStats { ...@@ -83,12 +83,6 @@ data RTSStats = RTSStats {
-- (we use signed values here because due to inaccuracies in timers -- (we use signed values here because due to inaccuracies in timers
-- the values can occasionally go slightly negative) -- the values can occasionally go slightly negative)
-- | Total CPU time used by the init phase
-- @since 4.12.0.0
, init_cpu_ns :: RtsTime
-- | Total elapsed time used by the init phase
-- @since 4.12.0.0
, init_elapsed_ns :: RtsTime
-- | Total CPU time used by the mutator -- | Total CPU time used by the mutator
, mutator_cpu_ns :: RtsTime , mutator_cpu_ns :: RtsTime
-- | Total elapsed time used by the mutator -- | Total elapsed time used by the mutator
...@@ -181,8 +175,6 @@ getRTSStats = do ...@@ -181,8 +175,6 @@ getRTSStats = do
(# peek RTSStats, cumulative_par_max_copied_bytes) p (# peek RTSStats, cumulative_par_max_copied_bytes) p
cumulative_par_balanced_copied_bytes <- cumulative_par_balanced_copied_bytes <-
(# peek RTSStats, cumulative_par_balanced_copied_bytes) p (# peek RTSStats, cumulative_par_balanced_copied_bytes) p
init_cpu_ns <- (# peek RTSStats, init_cpu_ns) p
init_elapsed_ns <- (# peek RTSStats, init_elapsed_ns) p
mutator_cpu_ns <- (# peek RTSStats, mutator_cpu_ns) p mutator_cpu_ns <- (# peek RTSStats, mutator_cpu_ns) p
mutator_elapsed_ns <- (# peek RTSStats, mutator_elapsed_ns) p mutator_elapsed_ns <- (# peek RTSStats, mutator_elapsed_ns) p
gc_cpu_ns <- (# peek RTSStats, gc_cpu_ns) p gc_cpu_ns <- (# peek RTSStats, gc_cpu_ns) p
......
This diff is collapsed.
...@@ -66,49 +66,4 @@ void statDescribeGens( void ); ...@@ -66,49 +66,4 @@ void statDescribeGens( void );
Time stat_getElapsedGCTime(void); Time stat_getElapsedGCTime(void);
Time stat_getElapsedTime(void); Time stat_getElapsedTime(void);
typedef struct GenerationSummaryStats_ {
uint32_t collections;
uint32_t par_collections;
Time cpu_ns;
Time elapsed_ns;
Time max_pause_ns;
Time avg_pause_ns;
#if defined(THREADED_RTS) && defined(PROF_SPIN)
uint64_t sync_spin;
uint64_t sync_yield;
#endif
} GenerationSummaryStats;
typedef struct RTSSummaryStats_ {
// These profiling times could potentially be in RTSStats. However, I'm not
// confident enough to do this now, since there is some logic depending on
// global state that I do not understand. (Or if I do understand it, it's
// wrong)
Time rp_cpu_ns;
Time rp_elapsed_ns;
Time hc_cpu_ns;
Time hc_elapsed_ns;
Time exit_cpu_ns;
Time exit_elapsed_ns;
#if defined(THREADED_RTS)
uint32_t bound_task_count;
uint64_t sparks_count;
SparkCounters sparks;
double work_balance;
#else // THREADED_RTS
double gc_cpu_percent;
double gc_elapsed_percent;
#endif
uint64_t fragmentation_bytes;
uint64_t average_bytes_used; // This is not shown in the '+RTS -s' report
uint64_t alloc_rate;
double productivity_cpu_percent;
double productivity_elapsed_percent;
// one for each generation, 0 first
GenerationSummaryStats* gc_summary_stats;
} RTSSummaryStats;
#include "EndPrivate.h" #include "EndPrivate.h"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment