/* ----------------------------------------------------------------------------
- * $Id: StgTicky.h,v 1.1 1999/01/21 10:31:44 simonm Exp $
+ * $Id: StgTicky.h,v 1.3 1999/02/05 16:02:30 simonm Exp $
+ *
+ * (c) The AQUA project, Glasgow University, 1994-1997
+ * (c) The GHC Team, 1998-1999
*
* Ticky-ticky profiling macros.
*
*/
#define TICK_GC_FAILED_PROMOTION() GC_FAILED_PROMOTION_ctr++
+/* Bytes copied: this is a fairly good measure of GC cost and depends
+ * on all sorts of things like number of generations, aging, eager
+ * promotion, generation sizing policy etc.
+ */
+#define TICK_GC_WORDS_COPIED(n) GC_WORDS_COPIED_ctr+=(n)
+
/* -----------------------------------------------------------------------------
The accumulators (extern decls)
-------------------------------------------------------------------------- */
EXTERN unsigned long GC_FAILED_PROMOTION_ctr INIT(0);
+EXTERN unsigned long GC_WORDS_COPIED_ctr INIT(0);
+
#undef INIT
#undef EXTERN
#define TICK_GC_SEL_MAJOR()
#define TICK_GC_FAILED_PROMOTION()
+#define TICK_GC_WORDS_COPIED(n)
#endif /* !TICKY_TICKY */