+ getProcessTimes(&gct->gc_start_cpu, &gct->gc_start_elapsed);
+ gct->gc_start_thread_cpu = getThreadCPUTime();
+
+ if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
+ {
+ gct->gc_start_faults = getPageFaults();
+ }
+}
+
+void
+stat_gcWorkerThreadStart (gc_thread *gct)
+{
+ if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
+ {
+ getProcessTimes(&gct->gc_start_cpu, &gct->gc_start_elapsed);
+ gct->gc_start_thread_cpu = getThreadCPUTime();
+ }
+}
+
+void
+stat_gcWorkerThreadDone (gc_thread *gct)
+{
+ Ticks thread_cpu, elapsed, gc_cpu, gc_elapsed;
+
+ if (RtsFlags.GcFlags.giveStats != NO_GC_STATS)
+ {
+ elapsed = getProcessElapsedTime();
+ thread_cpu = getThreadCPUTime();
+
+ gc_cpu = thread_cpu - gct->gc_start_thread_cpu;
+ gc_elapsed = elapsed - gct->gc_start_elapsed;
+
+ taskDoneGC(gct->cap->running_task, gc_cpu, gc_elapsed);
+ }