+ Called at the beginning of each Retainer Profiliing
+ -------------------------------------------------------------------------- */
+#ifdef PROFILING
+void
+stat_startRP(void)
+{
+ getTimes();
+ RP_start_time = CurrentUserTime;
+ RPe_start_time = CurrentElapsedTime;
+}
+#endif /* PROFILING */
+
+/* -----------------------------------------------------------------------------
+ Called at the end of each Retainer Profiliing
+ -------------------------------------------------------------------------- */
+
+#ifdef PROFILING
+void
+stat_endRP(
+ nat retainerGeneration,
+#ifdef DEBUG_RETAINER
+ nat maxCStackSize,
+ int maxStackSize,
+#endif
+ double averageNumVisit)
+{
+ getTimes();
+ RP_tot_time += CurrentUserTime - RP_start_time;
+ RPe_tot_time += CurrentElapsedTime - RPe_start_time;
+
+ fprintf(prof_file, "Retainer Profiling: %d, at %f seconds\n",
+ retainerGeneration, mut_user_time_during_RP());
+#ifdef DEBUG_RETAINER
+ fprintf(prof_file, "\tMax C stack size = %u\n", maxCStackSize);
+ fprintf(prof_file, "\tMax auxiliary stack size = %u\n", maxStackSize);
+#endif
+ fprintf(prof_file, "\tAverage number of visits per object = %f\n", averageNumVisit);
+}
+#endif /* PROFILING */
+
+/* -----------------------------------------------------------------------------
+ Called at the beginning of each heap census
+ -------------------------------------------------------------------------- */
+#ifdef PROFILING
+void
+stat_startHeapCensus(void)
+{
+ getTimes();
+ HC_start_time = CurrentUserTime;
+ HCe_start_time = CurrentElapsedTime;
+}
+#endif /* PROFILING */
+
+/* -----------------------------------------------------------------------------
+ Called at the end of each heap census
+ -------------------------------------------------------------------------- */
+#ifdef PROFILING
+void
+stat_endHeapCensus(void)
+{
+ getTimes();
+ HC_tot_time += CurrentUserTime - HC_start_time;
+ HCe_tot_time += CurrentElapsedTime - HCe_start_time;
+}
+#endif /* PROFILING */
+
+/* -----------------------------------------------------------------------------