X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FProfiling.c;h=4e759b6942a85ba7d618d3ebc01e89e4859a71bb;hp=33301a91c1ce84804a91968dd59546cbd9e59d9c;hb=8a2809c29de9f23eba7ca682b48390033a9d40f6;hpb=5a2769f0273dd389977e8283375e7920d183bdd4 diff --git a/rts/Profiling.c b/rts/Profiling.c index 33301a9..4e759b6 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -13,7 +13,6 @@ #include "RtsUtils.h" #include "RtsFlags.h" #include "Profiling.h" -#include "Storage.h" #include "Proftimer.h" #include "Timer.h" #include "ProfHeap.h" @@ -23,6 +22,10 @@ #include +#ifdef DEBUG +#include "Trace.h" +#endif + /* * Profiling allocation arena. */ @@ -183,6 +186,12 @@ initProfiling1 (void) } void +freeProfiling1 (void) +{ + arenaFree(prof_arena); +} + +void initProfiling2 (void) { CostCentreStack *ccs, *next; @@ -277,7 +286,7 @@ initProfilingLogFile(void) if (RtsFlags.CcFlags.doCostCentres == COST_CENTRES_XML) { /* dump the time, and the profiling interval */ fprintf(prof_file, "\"%s\"\n", time_str()); - fprintf(prof_file, "\"%d ms\"\n", TICK_MILLISECS); + fprintf(prof_file, "\"%d ms\"\n", RtsFlags.MiscFlags.tickInterval); /* declare all the cost centres */ { @@ -732,8 +741,10 @@ reportCCSProfiling( void ) fprintf(prof_file, "\n\n"); fprintf(prof_file, "\ttotal time = %11.2f secs (%lu ticks @ %d ms)\n", - total_prof_ticks / (StgFloat) TICK_FREQUENCY, - total_prof_ticks, TICK_MILLISECS); + (double) total_prof_ticks * + (double) RtsFlags.MiscFlags.tickInterval / 1000, + (unsigned long) total_prof_ticks, + (int) RtsFlags.MiscFlags.tickInterval); fprintf(prof_file, "\ttotal alloc = %11s bytes", ullong_format_string(total_alloc * sizeof(W_), @@ -882,8 +893,6 @@ gen_XML_logfile( void ) reportCCS_XML(pruneCCSTree(CCS_MAIN)); fprintf(prof_file, " 0\n"); - - fclose(prof_file); } static void