/* -----------------------------------------------------------------------------
- * $Id: Stats.c,v 1.36 2001/11/22 14:25:12 simonmar Exp $
+ * $Id: Stats.c,v 1.37 2001/11/23 10:27:58 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
return TICK_TO_DBL(CurrentUserTime - GC_tot_time - RP_tot_time - LDV_tot_time);
}
+#ifdef PROFILING
/*
mut_user_time_during_RP() is similar to mut_user_time_during_GC();
it returns the MUT time during retainer profiling.
{
return TICK_TO_DBL(LDV_start_time - GC_tot_time - RP_tot_time - LDV_tot_time);
}
+#endif // PROFILING
static nat
pageFaults(void)
/* -----------------------------------------------------------------------------
Called at the beginning of each Retainer Profiliing
-------------------------------------------------------------------------- */
-void stat_startRP(void)
+#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
-------------------------------------------------------------------------- */
-void stat_endRP(
+
+#ifdef PROFILING
+void
+stat_endRP(
nat retainerGeneration,
#ifdef DEBUG_RETAINER
nat maxCStackSize,
fprintf(prof_file, "\tCurrent total costs in bytes = %u\n", allCost * sizeof(StgWord));
fprintf(prof_file, "\tNumber of retainer sets = %u\n\n", numSet);
}
+#endif // PROFILING
/* -----------------------------------------------------------------------------
Called at the beginning of each LDV Profiliing
-------------------------------------------------------------------------- */
-void stat_startLDV(void)
+#ifdef PROFILING
+void
+stat_startLDV(void)
{
getTimes();
LDV_start_time = CurrentUserTime;
LDVe_start_time = CurrentElapsedTime;
}
+#endif // PROFILING
/* -----------------------------------------------------------------------------
Called at the end of each LDV Profiliing
-------------------------------------------------------------------------- */
-void stat_endLDV(void)
+#ifdef PROFILING
+void
+stat_endLDV(void)
{
getTimes();
LDV_tot_time += CurrentUserTime - LDV_start_time;
LDVe_tot_time += CurrentElapsedTime - LDVe_start_time;
}
+#endif // PROFILING
/* -----------------------------------------------------------------------------
stat_workerStop
Produce some detailed info on the state of the generational GC.
-------------------------------------------------------------------------- */
+#ifdef DEBUG
void
statDescribeGens(void)
{
}
fprintf(stderr,"\n");
}
+#endif
/* -----------------------------------------------------------------------------
Stats available via a programmatic interface, so eg. GHCi can time