X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FProfiling.c;h=f865d0a9cf18d862575bc5123e59a26b153f03e8;hb=afef39736dcde6f4947a6f362f9e6b3586933db4;hp=33301a91c1ce84804a91968dd59546cbd9e59d9c;hpb=5a2769f0273dd389977e8283375e7920d183bdd4;p=ghc-hetmet.git diff --git a/rts/Profiling.c b/rts/Profiling.c index 33301a9..f865d0a 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -23,6 +23,10 @@ #include +#ifdef DEBUG +#include "Trace.h" +#endif + /* * Profiling allocation arena. */ @@ -277,7 +281,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 +736,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 +888,6 @@ gen_XML_logfile( void ) reportCCS_XML(pruneCCSTree(CCS_MAIN)); fprintf(prof_file, " 0\n"); - - fclose(prof_file); } static void