summaryrefslogtreecommitdiff
path: root/rts/GetTime.h
Commit message (Collapse)AuthorAgeFilesLines
* base: fdReady(): Improve accuracy and simplify code.Niklas Hambüchen2017-09-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | This is done by reusing the existing cross-platform `getProcessElapsedTime()` function, which already provides nanosecond monotonic clocks, and fallback for platforms that don't have those. To do this, `getProcessElapsedTime()` had to be moved from a private RTS symbol into the public interface. Accuracy is improved in 2 ways: * Use of the monotonic clock where available * Measuring the total time spent waiting instead of a sum of intervals (between which there are small gaps) Reviewers: bgamari, austin, hvr, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3953
* cpp: Use #pragma once instead of #ifndef guardsBen Gamari2017-04-231-4/+1
| | | | | | | | | | | | | | This both says what we mean and silences a bunch of spurious CPP linting warnings. This pragma is supported by all CPP implementations which we support. Reviewers: austin, erikd, simonmar, hvr Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3482
* rts: drop unused getThreadCPUTimeSergei Trofimovich2016-02-071-1/+0
| | | | | | | | | | | | | | | | Use of this helper function was removed in: commit 3c9fc104337a142fe4f375d30d7a6b81d55a70c1 Author: Brian Brooks <brooks.brian@gmail.com> Date: Thu Jul 10 02:55:33 2014 -0500 Avoid unnecessary clock_gettime() syscalls in GC stats. Noticed by uselex.rb: getThreadCPUTime: [R]: exported from: ./rts/dist/build/posix/GetTime.p_o Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Revert "rts: add Emacs 'Local Variables' to every .c file"Simon Marlow2014-09-291-8/+0
| | | | This reverts commit 39b5c1cbd8950755de400933cecca7b8deb4ffcd.
* rts: add Emacs 'Local Variables' to every .c fileAustin Seipp2014-07-281-0/+8
| | | | | | | | This will hopefully help ensure some basic consistency in the forward by overriding buffer variables. In particular, it sets the wrap length, the offset to 4, and turns off tabs. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Expose the prototype for getMonotonicNSecIan Lynagh2013-01-171-1/+0
| | | | Fixes T3807 on OS X 32.
* More OS X build fixesIan Lynagh2012-09-141-1/+1
|
* Move getMonotonicUSec from base to the RTS.Paolo Capriotti2012-05-081-0/+3
|
* Time handling overhaulSimon Marlow2011-11-251-10/+4
| | | | | | | | | | | | | | | | | | | | | 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/+5
| | | | | | 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 the symbol visibility pragmasSimon Marlow2010-06-171-2/+2
|
* Omit visibility pragmas on Windows (fixes warnings/validate failures)Simon Marlow2009-09-091-2/+2
|
* Declare RTS-private prototypes with __attribute__((visibility("hidden")))Simon Marlow2009-08-051-0/+4
| | | | | | | | | | This has no effect with static libraries, but when the RTS is in a shared library it does two things: - it prevents the function from being exposed by the shared library - internal calls to the function can use the faster non-PLT calls, because the function cannot be overriden at link time.
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+26
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.