Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6b1098511aaabd2c9503ee7be6da1944466f9cb4 >--------------------------------------------------------------- commit 6b1098511aaabd2c9503ee7be6da1944466f9cb4 Author: Simon Marlow <[email protected]> Date: Fri Nov 25 13:11:39 2011 +0000 Time handling overhaul Terminology cleanup: the type "Ticks" has been renamed "Time", which is an StgWord64 in units of TIME_RESOLUTION (currently nanoseconds). The terminology "tick" is now used consistently to mean the interval between timer signals. The ticker now always ticks in realtime (actually CLOCK_MONOTONIC if we have it). Before it used CPU time in the non-threaded RTS and realtime in the threaded RTS, but I've discovered that the CPU timer has terrible resolution (at least on Linux) and isn't much use for profiling. So now we always use realtime. This should also fix The default tick interval is now 10ms, except when profiling where we drop it to 1ms. This gives more accurate profiles without affecting runtime too much (<1%). Lots of cleanups - the resolution of Time is now in one place only (Rts.h) rather than having calculations that depend on the resolution scattered all over the RTS. I hope I found them all. ghc/ghc.mk | 7 +- ghc/hschooks.c | 4 + includes/Rts.h | 30 ++++++++ includes/rts/Flags.h | 21 ++++-- includes/rts/storage/TSO.h | 6 ++ rts/GetTime.h | 14 +--- rts/PrimOps.cmm | 13 +-- rts/ProfHeap.c | 3 +- rts/ProfHeap.h | 4 +- rts/Profiling.c | 8 +- rts/Proftimer.c | 6 +- rts/RtsFlags.c | 76 +++++++++---------- rts/Schedule.c | 2 +- rts/Stats.c | 162 ++++++++++++++++++++-------------------- rts/Stats.h | 6 +- rts/Task.c | 6 +- rts/Task.h | 14 ++-- rts/Threads.c | 12 ++- rts/Ticker.h | 2 +- rts/eventlog/EventLog.c | 2 +- rts/posix/GetTime.c | 38 ++++----- rts/posix/Itimer.c | 122 +++++++++++------------------- rts/posix/Itimer.h | 2 - rts/posix/Select.c | 39 ++++++---- rts/posix/Select.h | 8 +- rts/sm/GCThread.h | 6 +- rts/win32/GetTime.c | 31 ++++---- rts/win32/Ticker.c | 178 +++++++++++-------------------------------- rules/build-prog.mk | 4 + 29 files changed, 380 insertions(+), 446 deletions(-) Diff suppressed because of size. To see it, use: git show 6b1098511aaabd2c9503ee7be6da1944466f9cb4 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
