summaryrefslogtreecommitdiff
path: root/includes/Rts.h
Commit message (Collapse)AuthorAgeFilesLines
* pad step_workspace to 64 bytes, to speed up access to gct->steps[]Simon Marlow2008-04-161-0/+6
|
* add ROUNDUP_BYTES_TO_WDSsimonmar@microsoft.com2008-02-151-1/+3
|
* Fix conversions between Double/Float and simple-integerIan Lynagh2008-06-141-1/+1
|
* Add some more generic (en|de)code(Double|Float) codeIan Lynagh2008-04-171-0/+2
|
* Do not #include external header files when compiling via CSimon Marlow2008-04-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | This has several advantages: - -fvia-C is consistent with -fasm with respect to FFI declarations: both bind to the ABI, not the API. - foreign calls can now be inlined freely across module boundaries, since a header file is not required when compiling the call. - bootstrapping via C will be more reliable, because this difference in behavour between the two backends has been removed. There is one disadvantage: - we get no checking by the C compiler that the FFI declaration is correct. So now, the c-includes field in a .cabal file is always ignored by GHC, as are header files specified in an FFI declaration. This was previously the case only for -fasm compilations, now it is also the case for -fvia-C too.
* Fix the IF_DEBUG(interpreter in StgCRun.cIan Lynagh2007-08-251-0/+4
|
* Pointer TaggingSimon Marlow2007-07-271-0/+40
| | | | | | | | | | | | | | | | | | | | | | This patch implements pointer tagging as per our ICFP'07 paper "Faster laziness using dynamic pointer tagging". It improves performance by 10-15% for most workloads, including GHC itself. The original patches were by Alexey Rodriguez Yakushev <mrchebas@gmail.com>, with additions and improvements by me. I've re-recorded the development as a single patch. The basic idea is this: we use the low 2 bits of a pointer to a heap object (3 bits on a 64-bit architecture) to encode some information about the object pointed to. For a constructor, we encode the "tag" of the constructor (e.g. True vs. False), for a function closure its arity. This enables some decisions to be made without dereferencing the pointer, which speeds up some common operations. In particular it enables us to avoid costly indirect jumps in many cases. More information in the commentary: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
* FIX BUILD (OS X): Include correct gmp.h if using GMP.frameworkRoman Leshchinskiy2007-07-061-0/+4
| | | | | | On OS X, we have to #include <GMP/gmp.h> if we are using GMP.framework. Before the recent GMP changes, gcc (incorrectly) used the gmp.h supplied by ghc but that is gone now.
* Make ticky work, at least partly, on 64-bit machinessimonpj@microsoft.com2007-04-241-5/+5
| | | | | | | | | | | | | | The ticky StgEntCounter structure was trying to be clever by using a fixed-width 32-bit field for the registeredp value. But the code generators are not up to handling structures packed tightly like this (on a 64-bit architecture); result seg-fault on 64-bit. Really there should be some complaint from the code generators, not simply a seg fault. Anyway I switched to using native words for StgEntCounter fields, and now at least it works.
* Lightweight ticky-ticky profilingKirsten Chevalier2007-02-071-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes restore ticky-ticky profiling to functionality from its formerly bit-rotted state. Sort of. (It got bit-rotted as part of the switch to the C-- back-end.) The way that ticky-ticky is supposed to work is documented in Section 5.7 of the GHC manual (though the manual doesn't mention that it hasn't worked since sometime around 6.0, alas). Changes from this are as follows (which I'll document on the wiki): * In the past, you had to build all of the libraries with way=t in order to use ticky-ticky, because it entailed a different closure layout. No longer. You still need to do make way=t in rts/ in order to build the ticky RTS, but you should now be able to mix ticky and non-ticky modules. * Some of the counters that worked in the past aren't implemented yet. I was originally just trying to get entry counts to work, so those should be correct. The list of counters was never documented in the first place, so I hope it's not too much of a disaster that some don't appear anymore. Someday, someone (perhaps me) should document all the counters and what they do. For now, all of the counters are either accurate (or at least as accurate as they always were), zero, or missing from the ticky profiling report altogether. This hasn't been particularly well-tested, but these changes shouldn't affect anything except when compiling with -fticky-ticky (famous last words...) Implementation details: I got rid of StgTicky.h, which in the past had the macros and declarations for all of the ticky counters. Now, those macros are defined in Cmm.h. StgTicky.h was still there for inclusion in C code. Now, any remaining C code simply cannot call the ticky macros -- or rather, they do call those macros, but from the perspective of C code, they're defined as no-ops. (This shouldn't be too big a problem.) I added a new file TickyCounter.h that has all the declarations for ticky counters, as well as dummy macros for use in C code. Someday, these declarations should really be automatically generated, since they need to be kept consistent with the macros defined in Cmm.h. Other changes include getting rid of the header that was getting added to closures before, and getting rid of various code having to do with eager blackholing and permanent indirections (the changes under compiler/ and rts/Updates.*).
* Make StablePtr and friends visible, this seems to be necessary for 64bit ↵sven.panne@aedion.de2006-11-101-0/+4
| | | | architectures
* Split GC.c, and move storage manager into sm/ directorySimon Marlow2006-10-241-4/+7
| | | | | | | | | | | | | | | | | In preparation for parallel GC, split up the monolithic GC.c file into smaller parts. Also in this patch (and difficult to separate, unfortunatley): - Don't include Stable.h in Rts.h, instead just include it where necessary. - consistently use STATIC_INLINE in source files, and INLINE_HEADER in header files. STATIC_INLINE is now turned off when DEBUG is on, to make debugging easier. - The GC no longer takes the get_roots function as an argument. We weren't making use of this generalisation.
* fix warningsSimon Marlow2006-06-081-0/+11
|
* add 'const' modifiers to types where appropriateSimon Marlow2006-06-071-1/+1
|
* #define _REENTRANT 1 (needed to get the right errno on some OSs)Simon Marlow2006-05-181-0/+4
| | | | | Partial fix for hanging problems on Solaris and possibly *BSD. A similar fix is also required to libraries/base/includes/HsBase.h.
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+238
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.