- StgChar *f_str; /* name of the thing */
- StgChar *f_arg_kinds; /* info about the args types */
- I_ ctr; /* the actual counter */
- struct ent_counter *link; /* link to chain them all together */
-};
-
-#define TICK_ENT_FUN_DIRECT(f_ct, f_str, f_arity, f_args, f_arg_kinds) \
+ char *str; /* name of the thing */
+ char *arg_kinds; /* info about the args types */
+ I_ entry_count; /* Trips to fast entry code */
+ I_ slow_entry_count; /* Trips to slow entry code */
+ I_ allocs; /* number of allocations by this fun */
+ struct _StgEntCounter *link;/* link to chain them all together */
+} StgEntCounter;
+
+#define TICK_CTR(f_ct, str, arity, args, arg_kinds) \
+ static StgEntCounter f_ct \
+ = { 0, arity, args, \
+ str, arg_kinds, \
+ 0, 0, 0, NULL };
+
+/* The slow entry point for a function always goes to
+ the fast entry point, which will register the stats block,
+ so no need to do so here */
+#define TICK_ENT_STATIC_FUN_STD(f_ct) \
+ f_ct.slow_entry_count++; \
+ ENT_STATIC_FUN_STD_ctr++ /* The static total one */
+
+#define TICK_ENT_DYN_FUN_STD(f_ct) \
+ f_ct.slow_entry_count++; \
+ ENT_DYN_FUN_STD_ctr++ /* The dynamic total one */
+
+#define TICK_ENT_FUN_DIRECT_BODY(f_ct) \