/* -----------------------------------------------------------------------------
- * $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
/* -----------------------------------------------------------------------------
- * $Id: Stats.h,v 1.12 2001/11/22 14:25:12 simonmar Exp $
+ * $Id: Stats.h,v 1.13 2001/11/23 10:27:58 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
extern void stat_endGC(lnat alloc, lnat collect, lnat live,
lnat copied, lnat gen);
+#ifdef PROFILING
extern void stat_startRP(void);
extern void stat_endRP(nat,
#ifdef DEBUG_RETAINER
extern void stat_startLDV(void);
extern void stat_endLDV(void);
+#endif // PROFILING
extern void stat_startExit(void);
extern void stat_endExit(void);
extern void initStats(void);
extern double mut_user_time_during_GC(void);
+extern double mut_user_time(void);
+
#ifdef PROFILING
-// @retainer profiling
extern double mut_user_time_during_RP(void);
extern double mut_user_time_during_LDV(void);
-#endif
-extern double mut_user_time(void);
+#endif // PROFILING
extern void statDescribeGens( void );
extern HsInt getAllocations( void );