X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FTicky.c;h=a24e7d08a2cb2bd9b939e9068adc1e6fd360eaac;hb=6c2b22efbcc3f213b24b53b832ba9901ea5954bd;hp=81bad573923324c7c44dd61dce9d7464d09be593;hpb=8e346b863084d46a87251cae1d8a71de7bf1fd0f;p=ghc-hetmet.git diff --git a/ghc/rts/Ticky.c b/ghc/rts/Ticky.c index 81bad57..a24e7d0 100644 --- a/ghc/rts/Ticky.c +++ b/ghc/rts/Ticky.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Ticky.c,v 1.9 1999/09/14 12:16:36 simonmar Exp $ + * $Id: Ticky.c,v 1.13 2001/08/14 13:40:09 sewardj Exp $ * * (c) The AQUA project, Glasgow University, 1992-1997 * (c) The GHC Team, 1998-1999 @@ -10,6 +10,7 @@ #if defined(TICKY_TICKY) #define TICKY_C /* define those variables */ +#include "PosixSource.h" #include "Rts.h" #include "RtsFlags.h" #include "Ticky.h" @@ -538,31 +539,45 @@ PrintTickyInfo(void) /* Data structure used in ``registering'' one of these counters. */ -struct ent_counter *ticky_entry_ctrs = NULL; /* root of list of them */ +StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */ /* To print out all the registered-counter info: */ static void printRegisteredCounterInfo (FILE *tf) { - struct ent_counter *p; + StgEntCounter *p; if ( ticky_entry_ctrs != NULL ) { - fprintf(tf,"\n**************************************************\n"); + fprintf(tf,"\n**************************************************\n\n"); } + 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, "%-40s%u\t%u\t%-16s%ld", - p->f_str, + fprintf(tf, "%11ld%11ld%11ld %6u%6u %-11s%-30s", + p->entry_count, + p->slow_entry_count, + p->allocs, p->arity, p->stk_args, - p->f_arg_kinds, - p->ctr); + p->arg_kinds, + p->str); fprintf(tf, "\n"); } } +/* Catch-all top-level counter struct. Allocations from CAFs will go + * here. + */ +StgEntCounter top_ct + = { 0, 0, 0, + "TOP", "", + 0, 0, 0, NULL }; + #endif /* TICKY_TICKY */