[project @ 2001-10-03 13:57:42 by simonmar]
[ghc-hetmet.git] / ghc / includes / StgProf.h
index f19f4d2..46f8491 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: StgProf.h,v 1.10 2000/05/12 13:01:04 simonmar Exp $
+ * $Id: StgProf.h,v 1.11 2001/10/03 13:57:42 simonmar Exp $
  *
  * (c) The GHC Team, 1998
  *
@@ -9,33 +9,9 @@
 #ifndef STGPROF_H
 #define STGPROF_H
 
-#if !defined(PROFILING)
-  
-#define CCS_ALLOC(ccs, amount) doNothing()
-#define ENTER_CC_PAP_CL(r)     doNothing()
-#define ENTER_CCS_PAP_CL(r)    doNothing()
-#else /* PROFILING... */
-
-/* -----------------------------------------------------------------------------
- * Constants
- * ---------------------------------------------------------------------------*/
-
-#define EMPTY_STACK NULL
-#define EMPTY_TABLE NULL
-
-/* Constants used to set sumbsumed flag on CostCentres */
-
-#define CC_IS_CAF      'c'            /* 'c'  => *is* a CAF cc           */
-#define CC_IS_BORING   'B'            /* 'B'  => *not* a CAF/sub cc      */
-
 /* -----------------------------------------------------------------------------
  * Data Structures 
  * ---------------------------------------------------------------------------*/  
-/* 
- * CostCentre 
- */
-
 typedef struct _CostCentre {
   int ccID;
 
@@ -44,7 +20,7 @@ typedef struct _CostCentre {
  
   /* used for accumulating costs at the end of the run... */
   unsigned long time_ticks;
-  unsigned long mem_alloc;
+  unsigned long long mem_alloc;
 
   char is_caf;
 
@@ -52,11 +28,6 @@ typedef struct _CostCentre {
 } CostCentre;
 
 
-       
-/* 
- * CostCentreStack 
- */
-
 typedef struct _CostCentreStack {
   int ccsID;
 
@@ -64,20 +35,46 @@ typedef struct _CostCentreStack {
   struct _CostCentreStack *prevStack;
   struct _IndexTable *indexTable;
   
-  unsigned long scc_count;
+  unsigned long long scc_count;
     
   unsigned long time_ticks;
-  unsigned long mem_alloc;
+  unsigned long long mem_alloc;
   unsigned long mem_resid;
 
   unsigned long inherited_ticks;
-  unsigned long inherited_alloc;
+  unsigned long long inherited_alloc;
 
   CostCentre *root;
 } CostCentreStack;
 
 
+/* -----------------------------------------------------------------------------
+ * The rest is PROFILING only...
+ * ---------------------------------------------------------------------------*/
 
+#if !defined(PROFILING)
+  
+#define CCS_ALLOC(ccs, amount) doNothing()
+#define ENTER_CC_PAP_CL(r)     doNothing()
+#define ENTER_CCS_PAP_CL(r)    doNothing()
+#else /* PROFILING... */
+
+/* -----------------------------------------------------------------------------
+ * Constants
+ * ---------------------------------------------------------------------------*/
+
+#define EMPTY_STACK NULL
+#define EMPTY_TABLE NULL
+
+/* Constants used to set sumbsumed flag on CostCentres */
+
+#define CC_IS_CAF      'c'            /* 'c'  => *is* a CAF cc           */
+#define CC_IS_BORING   'B'            /* 'B'  => *not* a CAF/sub cc      */
+
+/* -----------------------------------------------------------------------------
+ * Data Structures 
+ * ---------------------------------------------------------------------------*/  
 /* 
  * IndexTable 
  */