X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTicky.c;h=140a705eaea5b888f1cf0f58c293afb7468a29eb;hb=26f4bfc82f2b2359259578e9c54d476fc2de650f;hp=c874d1a19cbc6792d9cc91ce4d7b2a7b040a5ecc;hpb=b0a91510ccce70f8094d69bf21ba085a853fe31e;p=ghc-hetmet.git diff --git a/rts/Ticky.c b/rts/Ticky.c index c874d1a..140a705 100644 --- a/rts/Ticky.c +++ b/rts/Ticky.c @@ -6,12 +6,29 @@ * Ticky-ticky profiling *-------------------------------------------------------------------------- */ -#if defined(TICKY_TICKY) - #define TICKY_C /* define those variables */ #include "PosixSource.h" #include "Rts.h" +/* Catch-all top-level counter struct. Allocations from CAFs will go + * here. + */ +StgEntCounter top_ct + = { 0, 0, 0, + "TOP", "", + 0, 0, NULL }; + +/* Data structure used in ``registering'' one of these counters. */ + +StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */ + +/* We want Haskell code compiled with -ticky to be linkable with any + * version of the RTS, so we have to make sure all the symbols that + * ticky-compiled code may refer to are defined by every RTS. (#3439) + * Hence the #ifdef is here, rather than up above. + */ +#if defined(TICKY_TICKY) + #include "Ticky.h" /* ----------------------------------------------------------------------------- @@ -290,9 +307,6 @@ PrintTickyInfo(void) PC(INTAVG(tot_old_updates,tot_gengc_updates))); } - fprintf(tf,"\nTotal bytes copied during GC: %ld\n", - GC_WORDS_COPIED_ctr * sizeof(W_)); - printRegisteredCounterInfo(tf); fprintf(tf,"\n**************************************************\n"); @@ -550,13 +564,8 @@ PrintTickyInfo(void) PR_CTR(GC_SEL_MINOR_ctr); PR_CTR(GC_SEL_MAJOR_ctr); PR_CTR(GC_FAILED_PROMOTION_ctr); - PR_CTR(GC_WORDS_COPIED_ctr); } -/* Data structure used in ``registering'' one of these counters. */ - -StgEntCounter *ticky_entry_ctrs = NULL; /* root of list of them */ - /* To print out all the registered-counter info: */ static void @@ -573,11 +582,11 @@ 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 %6zu%6zu %-11s%-30s", + fprintf(tf, "%11ld%11ld %6lu%6lu %-11s%-30s", p->entry_count, p->allocs, - p->arity, - p->stk_args, + (unsigned long)p->arity, + (unsigned long)p->stk_args, p->arg_kinds, p->str); @@ -585,14 +594,5 @@ printRegisteredCounterInfo (FILE *tf) } } - -/* Catch-all top-level counter struct. Allocations from CAFs will go - * here. - */ -StgEntCounter top_ct - = { 0, 0, 0, - "TOP", "", - 0, 0, NULL }; - #endif /* TICKY_TICKY */