diff options
author | Ian Lynagh <igloo@earth.li> | 2006-09-05 14:15:45 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2006-09-05 14:15:45 +0000 |
commit | 93db1991b5cacf8357493a2e17fbbfb485f3205b (patch) | |
tree | 4a9ebcc89dfbf9a106d42ec63b764cc7d0abdce2 /rts/Profiling.c | |
parent | c18587da71e16b581c293baee8d4af119b108da7 (diff) | |
download | haskell-93db1991b5cacf8357493a2e17fbbfb485f3205b.tar.gz |
new RTS flag: -V to modify the resolution of the RTS timer
Fixed version of an old patch by Simon Marlow. His description read:
Also, now an arbitrarily short context switch interval may now be
specified, as we increase the RTS ticker's resolution to match the
requested context switch interval. This also applies to +RTS -i (heap
profiling) and +RTS -I (the idle GC timer). +RTS -V is actually only
required for increasing the resolution of the profile timer.
Diffstat (limited to 'rts/Profiling.c')
-rw-r--r-- | rts/Profiling.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rts/Profiling.c b/rts/Profiling.c index 96a94e4e2e..695d66e019 100644 --- a/rts/Profiling.c +++ b/rts/Profiling.c @@ -277,7 +277,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 +732,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_), |