X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FTicky.c;h=9ec5099d66b214012769a723dacfdaf1d53264ca;hp=89013317c0f8e0df96472a18c5233ff1a2012aaf;hb=8604da0136707cc14845d14a88c2272fe576b6d0;hpb=9ff76535edb25ab7434284adddb5c64708ecb547 diff --git a/rts/Ticky.c b/rts/Ticky.c index 8901331..9ec5099 100644 --- a/rts/Ticky.c +++ b/rts/Ticky.c @@ -30,8 +30,11 @@ static void printRegisteredCounterInfo (FILE *); /* fwd decl */ void PrintTickyInfo(void) { - unsigned long i; + // XXX This is only used in commented out or #if FALSE'd out code currently: + // unsigned long i; +/* XXX These are used only in an #if FALSE block below */ +#if FALSE unsigned long tot_allocs = /* total number of things allocated */ ALLOC_FUN_ctr + ALLOC_SE_THK_ctr + ALLOC_UP_THK_ctr + ALLOC_CON_ctr + ALLOC_TUP_ctr + + ALLOC_TSO_ctr + ALLOC_BH_ctr + ALLOC_PAP_ctr + ALLOC_PRIM_ctr @@ -66,6 +69,7 @@ PrintTickyInfo(void) unsigned long tot_wds = /* total words */ tot_adm_wds + tot_gds_wds + tot_slp_wds; +#endif unsigned long tot_thk_enters = ENT_STATIC_THK_ctr + ENT_DYN_THK_ctr; unsigned long tot_con_enters = ENT_STATIC_CON_ctr + ENT_DYN_CON_ctr; @@ -76,10 +80,13 @@ PrintTickyInfo(void) // This is the number of times we entered a function via some kind // of slow call. It amounts to all the slow applications, not // counting those that were to too few arguments. + /* + XXX This us unused - can we delete it? -- IGL 2008-04-25 unsigned long tot_fun_slow_enters = SLOW_CALL_ctr - SLOW_CALL_FUN_TOO_FEW_ctr - SLOW_CALL_PAP_TOO_FEW_ctr; + */ unsigned long tot_known_calls = KNOWN_CALL_ctr + KNOWN_CALL_TOO_FEW_ARGS_ctr + @@ -110,6 +117,14 @@ PrintTickyInfo(void) FILE *tf = RtsFlags.TickyFlags.tickyFile; + /* If tf = NULL, that means the user passed in stderr for the ticky stats + file. According to a comment in RtsFlags.c, this means to use + debugBelch to print out messages. But this function prints out a lot + of stuff so in order to avoid changing a lot of code, we just dump + the same output to stderr (for now). */ + if( tf == NULL ) + tf = stderr; + /* krc: avoid dealing with this just now */ #if FALSE fprintf(tf,"\n\nALLOCATIONS: %ld (%ld words total: %ld admin, %ld goods, %ld slop)\n", @@ -618,7 +633,7 @@ printRegisteredCounterInfo (FILE *tf) /* 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", + fprintf(tf, "%11ld%11ld %6zu%6zu %-11s%-30s", p->entry_count, p->allocs, p->arity,