summaryrefslogtreecommitdiff
path: root/includes
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 /includes
parentcedd6f3041de6abe64dfa3257bec7730a9dced9f (diff)
downloadhaskell-ace618cd2294989e783bd453cee88e0e1c0dad77.tar.gz
nonmoving-gc: Track time usage of nonmoving marking
Diffstat (limited to 'includes')
-rw-r--r--includes/RtsAPI.h39
-rw-r--r--includes/rts/Time.h1
2 files changed, 40 insertions, 0 deletions
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index 488cab5f3f..3cf02c0d8a 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -151,6 +151,23 @@ typedef struct GCDetails_ {
Time cpu_ns;
// The time elapsed during GC itself
Time elapsed_ns;
+
+ //
+ // Concurrent garbage collector
+ //
+
+ // The CPU time used during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_sync_cpu_ns;
+ // The time elapsed during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_sync_elapsed_ns;
+ // The CPU time used during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_cpu_ns;
+ // The time elapsed during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_elapsed_ns;
} GCDetails;
//
@@ -241,6 +258,28 @@ typedef struct _RTSStats {
// The number of times a GC thread has iterated it's outer loop across all
// parallel GCs
uint64_t scav_find_work;
+
+ // ----------------------------------
+ // Concurrent garbage collector
+
+ // The CPU time used during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_sync_cpu_ns;
+ // The time elapsed during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_sync_elapsed_ns;
+ // The maximum time elapsed during the post-mark pause phase of the
+ // concurrent nonmoving GC.
+ Time nonmoving_gc_sync_max_elapsed_ns;
+ // The CPU time used during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_cpu_ns;
+ // The time elapsed during the post-mark pause phase of the concurrent
+ // nonmoving GC.
+ Time nonmoving_gc_elapsed_ns;
+ // The maximum time elapsed during the post-mark pause phase of the
+ // concurrent nonmoving GC.
+ Time nonmoving_gc_max_elapsed_ns;
} RTSStats;
void getRTSStats (RTSStats *s);
diff --git a/includes/rts/Time.h b/includes/rts/Time.h
index 00d98b4f09..ab291cd6c5 100644
--- a/includes/rts/Time.h
+++ b/includes/rts/Time.h
@@ -33,6 +33,7 @@ typedef int64_t Time;
#define SecondsToTime(t) ((Time)(t) * TIME_RESOLUTION)
#define TimeToSeconds(t) ((t) / TIME_RESOLUTION)
+#define TimeToSecondsDbl(t) ((double)(t) / TIME_RESOLUTION)
// Use instead of SecondsToTime() when we have a floating-point
// seconds value, to avoid truncating it.