\begin{code}
# define CC_IS_CAF 'c'
# define CC_IS_DICT 'd'
-# define CC_IS_SUBSUMED 'S'
+# define CC_IS_SUBSUMED 's'
# define CC_IS_BORING 'B'
# define STATIC_CC_REF(cc_ident) &CAT2(cc_ident,_struct)
CC_EXTERN(CC_CAFs); /* prelude cost centre (CAFs only) */
CC_EXTERN(CC_DICTs); /* prelude cost centre (DICTs only) */
-# define IS_CAF_OR_DICT_CC(cc) \
+# define IS_CAF_OR_DICT_OR_SUB_CC(cc) \
((cc)->is_subsumed & ' ') /* tests for lower case character */
-# define IS_SUBSUMED_CC(cc) ((cc)->is_subsumed == CC_IS_SUBSUMED)
-
\end{code}
Definitions referring to the Cost Centre sub-field of the fixed header.
do { \
CostCentre cc = (CostCentre) (centre); \
ASSERT_IS_REGISTERED(cc,1); \
- if ( ! IS_CAF_OR_DICT_CC(cc) ) { \
+ if ( ! IS_CAF_OR_DICT_OR_SUB_CC(cc) ) { \
CCC = cc; \
} else { \
CCC_DETAIL_COUNT(cc->caffun_subsumed); \
do { \
CostCentre cc = (CostCentre) (centre); \
ASSERT_IS_REGISTERED(cc,1); \
- if ( ! IS_CAF_OR_DICT_CC(cc) ) { \
+ if ( ! IS_CAF_OR_DICT_OR_SUB_CC(cc) ) { \
CCC = cc; \
+ CCC->scc_count++; \
} else { \
CCC_DETAIL_COUNT(cc->caffun_subsumed); \
CCC_DETAIL_COUNT(CCC->subsumed_caf_count); \
} while(0); \
FUNEND; }
+#else /* PROFILING */
+
+/* When things are working these shouldn't be emitted when not profiling,
+ but it was convenient at one point to have them expand to nothing
+ when not profiling. SLPJ Dec 96 */
+
+#define START_REGISTER_CCS(reg_mod_name)
+#define END_REGISTER_CCS()
+
#endif /* PROFILING */
\end{code}
do { /* beware of cc name-capture */ \
CostCentre c_c = (CostCentre) (cc); \
if (c_c->registered == NOT_REGISTERED) { \
- fprintf(stderr,"Entering unregistered CC: %s\n",c_c->label); \
+ fprintf(stderr,"Entering unregistered CC: %s %s\n",c_c->module, c_c->label); \
/* unsafe c-call, BTW */ \
} \
if ( (chk_not_overhead) && c_c == STATIC_CC_REF(CC_OVERHEAD) ) { \
I_ heap_profile_init PROTO((char *argv[]));
-extern void heap_profile_finish(STG_NO_ARGS);
+void heap_profile_finish(STG_NO_ARGS);
-extern void heap_profile_setup(STG_NO_ARGS); /* called at start of heap profile */
-extern void heap_profile_done(STG_NO_ARGS); /* called at end of heap profile */
+void heap_profile_setup(STG_NO_ARGS); /* called at start of heap profile */
+void heap_profile_done(STG_NO_ARGS); /* called at end of heap profile */
-extern void (* heap_profile_fn) PROTO((P_ closure,I_ size));
+void (* heap_profile_fn) PROTO((P_ closure,I_ size));
extern I_ earlier_ticks; /* no. of earlier ticks grouped */
extern hash_t time_intervals; /* no. of time intervals reported -- 18 */