summaryrefslogtreecommitdiff
path: root/ghc/hschooks.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop GHC 7.10 compatibilityRyan Scott2017-08-011-2/+0
| | | | | | | | | | | | | | | | GHC 8.2.1 is out, so now GHC's support window only extends back to GHC 8.0. This means we can delete gobs of code that was only used for GHC 7.10 support. Hooray! Test Plan: ./validate Reviewers: hvr, bgamari, austin, goldfire, simonmar Reviewed By: bgamari Subscribers: Phyx, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3781
* Prefer #if defined to #ifdefBen Gamari2017-04-281-1/+1
| | | | Our new CPP linter enforces this.
* hschooks.c: Fix long lineBen Gamari2016-12-081-1/+4
|
* Use C99's boolBen Gamari2016-11-291-1/+1
| | | | | | | | | | | | Test Plan: Validate on lots of platforms Reviewers: erikd, simonmar, austin Reviewed By: erikd, simonmar Subscribers: michalt, thomie Differential Revision: https://phabricator.haskell.org/D2699
* hschooks.c: Ensure correct header file is includedBen Gamari2016-11-291-1/+8
| | | | | | | | | | | | | | | | Consider the case of building a stage1 compiler. `hschooks.c` will be built by stage0 `ghc` and linked against the `stage0` RTS. Despite this it was #including the stage1 `Rts.h`. There is, of course, no guarantee that this is ABI-compatible with the stage0 RTS and when they diverge Bad Things happen (e.g. bells ringing at inappropriate times in D2699). Test Plan: Validate Reviewers: simonmar, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2763
* ghc/hschooks.c: Fix include path of Rts.hBen Gamari2016-11-221-1/+1
| | | | | | | | | | | | | | | We need to ensure that we don't include Rts.h from bootstrap compiler. See #12796. Test Plan: Validate Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2698 GHC Trac Issues: #12796
* Delete __GLASGOW_HASKELL__ ifdefs for stage0 < 7.8Thomas Miedema2015-07-211-4/+0
| | | | | | | | | | Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D904
* Replace hooks by callbacks in RtsConfig (#8785)Simon Marlow2015-04-071-0/+12
| | | | | | | | | | | | Summary: Hooks rely on static linking semantics, and are broken by -Bsymbolic which we need when using dynamic linking. Test Plan: Built it Reviewers: austin, hvr, tibbe Differential Revision: https://phabricator.haskell.org/D8
* Delete __GLASGOW_HASKELL__ ifdefs for stage0 < 7.6.Thomas Miedema2014-10-071-4/+0
| | | | | | | | | | | | | | | | Summary: My understanding is that ghc 7.10 should be buildable with the last 3 versions of ghc, i.e 7.6, 7.8 and 7.10 itself. Test Plan: x Reviewers: austin Reviewed By: austin Subscribers: hvr, simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D254
* Fix #8754 again.Austin Seipp2014-02-201-1/+14
| | | | | | | | This time, we carefully initialize the GC stats only if they're not already initialized - this way the user can override them (e.g. `+RTS -t --machine-readable`). Signed-off-by: Austin Seipp <austin@well-typed.com>
* Deprecate lnat, and use StgWord insteadSimon Marlow2012-09-071-1/+1
| | | | | | | | | | | | lnat was originally "long unsigned int" but we were using it when we wanted a 64-bit type on a 64-bit machine. This broke on Windows x64, where long == int == 32 bits. Using types of unspecified size is bad, but what we really wanted was a type with N bits on an N-bit machine. StgWord is exactly that. lnat was mentioned in some APIs that clients might be using (e.g. StackOverflowHook()), so we leave it defined but with a comment to say that it's deprecated.
* Improve compile times by enabling +RTS -H for GHC (only when bootstrapped)Simon Marlow2012-08-211-0/+8
|
* Fix the stage1 ghc hschooks.cIan Lynagh2012-04-301-1/+1
| | | | | The stage0 compiler might have a different idea as to what type lnat corresponds to, so cast the value to the type we want.
* Build fixesIan Lynagh2012-04-261-1/+1
|
* Win64 build fixIan Lynagh2012-04-261-2/+3
|
* Time handling overhaulSimon Marlow2011-11-251-0/+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.
* Cleanup sweep and fix a bug in RTS flag processing.Simon Marlow2011-04-121-1/+0
| | | | | | | | | | | | | This code has accumulated a great deal of cruft over the years, this pass cleans up a lot of the surrounding cruft but leaves the actual argument processing alone - so there's still more that could be done. Bug fixed: - ghc_rts_opts should not be subject to the --rtsopts setting. If the programmer explicitly declares options with ghc_rts_opts, they shouldn't also have to accept command-line RTS options to make them work.
* Remove more dead code now we require GHC >= 6.12Ian Lynagh2010-12-151-3/+0
|
* Use gcc to build C programs for stages >= 1Ian Lynagh2010-07-161-1/+1
|
* move hschooks.c to ghc/, and enable itSimon Marlow2009-09-111-0/+38