+ statsPrintf("\n%11ld Mb total memory in use\n\n",
+ mblocks_allocated * MBLOCK_SIZE / (1024 * 1024));
+
+#ifdef SMP
+ {
+ nat i;
+ for (i = 0; i < RtsFlags.ParFlags.nNodes; i++) {
+ statsPrintf(" Task %2d: MUT time: %6.2fs (%6.2fs elapsed)\n"
+ " GC time: %6.2fs (%6.2fs elapsed)\n\n",
+ i,
+ TICK_TO_DBL(task_ids[i].mut_time),
+ TICK_TO_DBL(task_ids[i].mut_etime),
+ TICK_TO_DBL(task_ids[i].gc_time),
+ TICK_TO_DBL(task_ids[i].gc_etime));
+ }
+ }
+#endif
+
+ statsPrintf(" INIT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(InitUserTime), TICK_TO_DBL(InitElapsedTime));
+ statsPrintf(" MUT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(MutUserTime), TICK_TO_DBL(MutElapsedTime));
+ statsPrintf(" GC time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(GC_tot_time), TICK_TO_DBL(GCe_tot_time));
+#ifdef PROFILING
+ statsPrintf(" RP time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(RP_tot_time), TICK_TO_DBL(RPe_tot_time));
+ statsPrintf(" PROF time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(HC_tot_time), TICK_TO_DBL(HCe_tot_time));
+#endif
+ statsPrintf(" EXIT time %6.2fs (%6.2fs elapsed)\n",
+ TICK_TO_DBL(ExitUserTime), TICK_TO_DBL(ExitElapsedTime));
+ statsPrintf(" Total time %6.2fs (%6.2fs elapsed)\n\n",
+ TICK_TO_DBL(time), TICK_TO_DBL(etime));
+ statsPrintf(" %%GC time %5.1f%% (%.1f%% elapsed)\n\n",
+ TICK_TO_DBL(GC_tot_time)*100/TICK_TO_DBL(time),
+ TICK_TO_DBL(GCe_tot_time)*100/TICK_TO_DBL(etime));
+
+ if (time - GC_tot_time - PROF_VAL(RP_tot_time + HC_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 -
+ PROF_VAL(RP_tot_time + HC_tot_time))),
+ temp, rtsTrue/*commas*/);
+
+ statsPrintf(" Alloc rate %s bytes per MUT second\n\n", temp);
+
+ statsPrintf(" Productivity %5.1f%% of total user, %.1f%% of total elapsed\n\n",
+ TICK_TO_DBL(time - GC_tot_time -
+ PROF_VAL(RP_tot_time + HC_tot_time) - InitUserTime) * 100
+ / TICK_TO_DBL(time),
+ TICK_TO_DBL(time - GC_tot_time -
+ PROF_VAL(RP_tot_time + HC_tot_time) - InitUserTime) * 100
+ / TICK_TO_DBL(etime));
+ }
+
+ if (RtsFlags.GcFlags.giveStats == ONELINE_GC_STATS) {
+ /* print the long long separately to avoid bugginess on mingwin (2001-07-02, mingw-0.5) */
+ statsPrintf("<<ghc: %llu bytes, ", GC_tot_alloc*sizeof(W_));
+ statsPrintf("%d GCs, %ld/%ld avg/max bytes residency (%ld samples), %luM in use, %.2f INIT (%.2f elapsed), %.2f MUT (%.2f elapsed), %.2f GC (%.2f elapsed) :ghc>>\n",
+ total_collections,
+ ResidencySamples == 0 ? 0 :
+ AvgResidency*sizeof(W_)/ResidencySamples,
+ MaxResidency*sizeof(W_),
+ ResidencySamples,
+ (unsigned long)(mblocks_allocated * MBLOCK_SIZE / (1024L * 1024L)),
+ 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));
+ }
+
+ statsFlush();
+ statsClose();