From 6f1731812331d4ddb4326fdfcefa095b867547e9 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 15 Apr 2019 16:42:56 -0400 Subject: NonmovingCensus: Emit samples to eventlog --- rts/Trace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rts/Trace.c') diff --git a/rts/Trace.c b/rts/Trace.c index 10ad5031ab..ecc28d8fec 100644 --- a/rts/Trace.c +++ b/rts/Trace.c @@ -30,6 +30,7 @@ // events int TRACE_sched; int TRACE_gc; +int TRACE_nonmoving_gc; int TRACE_spark_sampled; int TRACE_spark_full; int TRACE_user; @@ -72,6 +73,9 @@ void initTracing (void) RtsFlags.GcFlags.giveStats = COLLECT_GC_STATS; } + TRACE_nonmoving_gc = + RtsFlags.TraceFlags.nonmoving_gc; + TRACE_spark_sampled = RtsFlags.TraceFlags.sparks_sampled; @@ -844,6 +848,12 @@ void traceConcUpdRemSetFlush(Capability *cap) postConcUpdRemSetFlush(cap); } +void traceNonmovingHeapCensus(uint32_t log_blk_size, + const struct NonmovingAllocCensus *census) +{ + if (eventlog_enabled && TRACE_nonmoving_gc) + postNonmovingHeapCensus(log_blk_size, census); +} void traceThreadStatus_ (StgTSO *tso USED_IF_DEBUG) { -- cgit v1.2.1