summaryrefslogtreecommitdiff
path: root/rts/posix/GetTime.c
Commit message (Collapse)AuthorAgeFilesLines
* add a missing error checkSimon Marlow2011-12-131-0/+3
|
* Time handling overhaulSimon Marlow2011-11-251-21/+17
| | | | | | | | | | | | | | | | | | | | | 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.
* Add rts time util getUnixEpochTimeDuncan Coutts2011-10-261-0/+16
| | | | | | The other existing time utilities give us time elapsed since process or thread start. This is for wall clock time, using the common Unix epoch interpretation.
* Fix getThreadCPUTime()Simon Marlow2010-09-131-10/+19
| | | | | | ever since the patch "Check with sysconf _POSIX_THREAD_CPUTIME", it has been returning incorrect results, because the sysconf variable to check should have been _SC_THREAD_CPUTIME, not _POSIX_THREAD_CPUTIME.
* Use clock_gettime (if available) to measure the process CPU timeSimon Marlow2010-09-131-4/+26
| | | | | This is much more accurate than getrusage, which was giving misleading results when trying to time very quick operations like a minor GC.
* Partial support for Haiku (#3727)Simon Marlow2009-12-211-1/+1
|
* Add a BeConservative setting to the make systemIan Lynagh2007-09-101-1/+1
| | | | If it is set, we don't try to use clock_gettime
* Check with sysconf _POSIX_THREAD_CPUTIME is available before we try to use it.Ian Lynagh2007-01-161-9/+11
| | | | | Calling clock_gettime(CLOCK_THREAD_CPUTIME_ID,_) regardless was causing a segfault (trac #1030).
* Addition of PAPI to RTSmrchebas@gmail.com2006-11-081-1/+20
| | | | | | | This patch still requires the addition of the USE_PAPI define to compile with PAPI. Also, programs must be compiled and linked with the appropriate library flags for papi.
* Handle clock_gettime failingIan Lynagh2006-09-271-6/+8
|
* Fix ~2000 second profiling time wrapping bugIan Lynagh2006-09-111-3/+3
|
* add sysErrorBelch() for reporting system call errorsSimon Marlow2006-08-301-1/+1
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+141
Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.