summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2f1003a)
Report slow-entry counts in ticky-ticky
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-% $Id: CgClosure.lhs,v 1.37 1999/11/02 15:05:43 simonmar Exp $
+% $Id: CgClosure.lhs,v 1.38 1999/11/11 17:50:49 simonpj Exp $
%
\section[CgClosure]{Code generation for closures}
%
\section[CgClosure]{Code generation for closures}
--slow_entry_code = forceHeapCheck [] True slow_entry_code'
slow_entry_code
--slow_entry_code = forceHeapCheck [] True slow_entry_code'
slow_entry_code
- = profCtrC SLIT("TICK_ENT_FUN_STD") [] `thenC`
+ = profCtrC SLIT("TICK_ENT_FUN_STD") [
+ CLbl ticky_ctr_label DataPtrRep
+ ] `thenC`
-- Bind args, and record expected position of stk ptrs
mapCs bindNewToStack arg_offsets `thenC`
-- Bind args, and record expected position of stk ptrs
mapCs bindNewToStack arg_offsets `thenC`
/* ----------------------------------------------------------------------------
/* ----------------------------------------------------------------------------
- * $Id: StgTicky.h,v 1.8 1999/10/14 13:12:22 simonmar Exp $
+ * $Id: StgTicky.h,v 1.9 1999/11/11 17:50:47 simonpj Exp $
*
* (c) The AQUA project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
*
* (c) The AQUA project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
#define TICK_ENT_VIA_NODE() ENT_VIA_NODE_ctr++
#define TICK_ENT_THK() ENT_THK_ctr++ /* thunk */
#define TICK_ENT_VIA_NODE() ENT_VIA_NODE_ctr++
#define TICK_ENT_THK() ENT_THK_ctr++ /* thunk */
-#define TICK_ENT_FUN_STD() ENT_FUN_STD_ctr++ /* std entry pt */
typedef struct _StgEntCounter {
unsigned registeredp:16, /* 0 == no, 1 == yes */
typedef struct _StgEntCounter {
unsigned registeredp:16, /* 0 == no, 1 == yes */
/* (rest of args are in registers) */
StgChar *str; /* name of the thing */
StgChar *arg_kinds; /* info about the args types */
/* (rest of args are in registers) */
StgChar *str; /* name of the thing */
StgChar *arg_kinds; /* info about the args types */
- I_ ctr; /* the actual counter */
+ 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;
I_ allocs; /* number of allocations by this fun */
struct _StgEntCounter *link;/* link to chain them all together */
} StgEntCounter;
static StgEntCounter f_ct \
= { 0, arity, args, \
str, 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_FUN_STD(f_ct) \
+ f_ct.slow_entry_count++; \
+ ENT_FUN_STD_ctr++ /* The total one */
#define TICK_ENT_FUN_DIRECT(f_ct) \
{ \
#define TICK_ENT_FUN_DIRECT(f_ct) \
{ \
/* mark it as "registered" */ \
f_ct.registeredp = 1; \
} \
/* mark it as "registered" */ \
f_ct.registeredp = 1; \
} \
+ f_ct.entry_count += 1; \
- ENT_FUN_DIRECT_ctr++ /* the old boring one */
+ ENT_FUN_DIRECT_ctr++ /* The total one */
extern StgEntCounter top_ct;
extern StgEntCounter *ticky_entry_ctrs;
extern StgEntCounter top_ct;
extern StgEntCounter *ticky_entry_ctrs;
#define TICK_ENT_VIA_NODE()
#define TICK_ENT_THK()
#define TICK_ENT_VIA_NODE()
#define TICK_ENT_THK()
-#define TICK_ENT_FUN_STD()
+#define TICK_ENT_FUN_STD(n)
#define TICK_ENT_FUN_DIRECT(n)
#define TICK_ENT_CON(n)
#define TICK_ENT_FUN_DIRECT(n)
#define TICK_ENT_CON(n)
/* -----------------------------------------------------------------------------
/* -----------------------------------------------------------------------------
- * $Id: Ticky.c,v 1.11 1999/10/14 13:44:55 simonpj Exp $
+ * $Id: Ticky.c,v 1.12 1999/11/11 17:50:48 simonpj Exp $
*
* (c) The AQUA project, Glasgow University, 1992-1997
* (c) The GHC Team, 1998-1999
*
* (c) The AQUA project, Glasgow University, 1992-1997
* (c) The GHC Team, 1998-1999
if ( ticky_entry_ctrs != NULL ) {
fprintf(tf,"\n**************************************************\n\n");
}
if ( ticky_entry_ctrs != NULL ) {
fprintf(tf,"\n**************************************************\n\n");
}
- fprintf(tf, "%-11s%-11s %6s%6s %-16s%-30s\n",
- "Entries", "Allocs", "Arity", "Stack", "Kinds", "Function");
+ fprintf(tf, "%11s%11s%11s %6s%6s %-11s%-30s\n",
+ "Entries", "Slow ent", "Allocs", "Arity", "Stack", "Kinds", "Function");
fprintf(tf, "--------------------------------------------------------------------------------\n");
/* Function name at the end so it doesn't mess up the tabulation */
for (p = ticky_entry_ctrs; p != NULL; p = p->link) {
fprintf(tf, "--------------------------------------------------------------------------------\n");
/* Function name at the end so it doesn't mess up the tabulation */
for (p = ticky_entry_ctrs; p != NULL; p = p->link) {
- fprintf(tf, "%11ld%11ld%6u%6u %-11s%-30s",
- p->ctr,
+ fprintf(tf, "%11ld%11ld%11ld %6u%6u %-11s%-30s",
+ p->entry_count,
+ p->slow_entry_count,
p->allocs,
p->arity,
p->stk_args,
p->allocs,
p->arity,
p->stk_args,
StgEntCounter top_ct
= { 0, 0, 0,
"TOP", "",
StgEntCounter top_ct
= { 0, 0, 0,
"TOP", "",