+ fprintf(sf, " INIT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(InitUserTime), TICK_TO_DBL(InitElapsedTime));
+ fprintf(sf, " MUT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(MutUserTime), TICK_TO_DBL(MutElapsedTime));
+ fprintf(sf, " GC time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(GC_tot_time), TICK_TO_DBL(GCe_tot_time));
+ fprintf(sf, " EXIT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(ExitUserTime), TICK_TO_DBL(ExitElapsedTime));
+ fprintf(sf, " Total time %6.2fs (%6.2fs elapsed)\n\n",
+ TICK_TO_DBL(time), TICK_TO_DBL(etime));
+ fprintf(sf, " %%GC time %5.1f%% (%.1f%% elapsed)\n\n",
+ TICK_TO_DBL(GC_tot_time)*100/time,
+ TICK_TO_DBL(GCe_tot_time)*100/etime);
+
+ if (time - GC_tot_time == 0)
+ ullong_format_string(0, temp, rtsTrue/*commas*/);
+ else
+ ullong_format_string(
+ (ullong)((GC_tot_alloc*sizeof(W_))/
+ TICK_TO_DBL(time - GC_tot_time)),
+ temp, rtsTrue/*commas*/);
+
+ fprintf(sf, " Alloc rate %s bytes per MUT second\n\n", temp);
+
+ fprintf(sf, " Productivity %5.1f%% of total user, %.1f%% of total elapsed\n\n",
+ TICK_TO_DBL(time - GC_tot_time - InitUserTime) * 100
+ / TICK_TO_DBL(time),
+ TICK_TO_DBL(time - GC_tot_time - InitUserTime) * 100
+ / TICK_TO_DBL(etime));
+ }
+
+ if (RtsFlags.GcFlags.giveStats == ONELINE_GC_STATS && sf != NULL) {
+ fprintf(sf, "<<ghc: %lld bytes, %d GCs, %ld/%ld avg/max bytes residency (%ld samples), %ldM in use, %.2f INIT (%.2f elapsed), %.2f MUT (%.2f elapsed), %.2f GC (%.2f elapsed) :ghc>>\n",
+ GC_tot_alloc*sizeof(W_), total_collections,
+ AvgResidency*sizeof(W_)/ResidencySamples,
+ MaxResidency*sizeof(W_),
+ ResidencySamples,
+ mblocks_allocated * MBLOCK_SIZE / (1024 * 1024),
+ TICK_TO_DBL(InitUserTime), TICK_TO_DBL(InitElapsedTime),
+ TICK_TO_DBL(MutUserTime), TICK_TO_DBL(MutElapsedTime),
+ TICK_TO_DBL(GC_tot_time), TICK_TO_DBL(GCe_tot_time));
+ }