summaryrefslogtreecommitdiff
path: root/includes/Regs.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the various mp registers from the StgRegTableDuncan Coutts2009-06-101-13/+0
| | | | No longer need them as temp vars in the cmm primop implementations.
* GHC new build system megapatchIan Lynagh2009-04-261-1/+1
|
* Instead of a separate context-switch flag, set HpLim to zeroSimon Marlow2009-03-131-12/+1
| | | | | | | | | | | | This reduces the latency between a context-switch being triggered and the thread returning to the scheduler, which in turn should reduce the cost of the GC barrier when there are many cores. We still retain the old context_switch flag which is checked at the end of each block of allocation. The idea is that setting HpLim may fail if the the target thread is modifying HpLim at the same time; the context_switch flag is a fallback. It also allows us to "context switch soon" without forcing an immediate switch, which can be costly.
* Fix more problems caused by padding in the Capability structureSimon Marlow2008-12-021-1/+1
| | | | Fixes crashes on Windows and Sparc
* Add optional eager black-holing, with new flag -feager-blackholingSimon Marlow2008-11-181-2/+4
| | | | | | | | | | | | | | | Eager blackholing can improve parallel performance by reducing the chances that two threads perform the same computation. However, it has a cost: one extra memory write per thunk entry. To get the best results, any code which may be executed in parallel should be compiled with eager blackholing turned on. But since there's a cost for sequential code, we make it optional and turn it on for the parallel package only. It might be a good idea to compile applications (or modules) with parallel code in with -feager-blackholing. ToDo: document -feager-blackholing.
* Work stealing for sparksberthold@mathematik.uni-marburg.de2008-09-151-95/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Spark stealing support for PARALLEL_HASKELL and THREADED_RTS versions of the RTS. Spark pools are per capability, separately allocated and held in the Capability structure. The implementation uses Double-Ended Queues (deque) and cas-protected access. The write end of the queue (position bottom) can only be used with mutual exclusion, i.e. by exactly one caller at a time. Multiple readers can steal()/findSpark() from the read end (position top), and are synchronised without a lock, based on a cas of the top position. One reader wins, the others return NULL for a failure. Work stealing is called when Capabilities find no other work (inside yieldCapability), and tries all capabilities 0..n-1 twice, unless a theft succeeds. Inside schedulePushWork, all considered cap.s (those which were idle and could be grabbed) are woken up. Future versions should wake up capabilities immediately when putting a new spark in the local pool, from newSpark(). Patch has been re-recorded due to conflicting bugfixes in the sparks.c, also fixing a (strange) conflict in the scheduler.
* Do not #include external header files when compiling via CSimon Marlow2008-04-021-13/+10
| | | | | | | | | | | | | | | | | | | | | | | 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 build with external gmp library.gwright@antiope.com2007-08-131-0/+2
| | | | | | | | | | | | | | | | ghc fails to build if you use an external gmp library. This is because ghc requires the header file gmp.h, which used to be provided by the internal gmp source code. The file gmp.h is no longer part of the gmp source code, but is generated as part of the build procedure. If an external gmp is specified, the internal gmp is not build and the gmp.h file never gets generated. Of course, it was a bad idea anyway to use a header file from a potentially different version of the library. The patch sets HAVE_LIB_GMP if the gmp library is found during configuration and conditionalizes including the library header file on it.
* 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.
* Fix unregisterised builds, and building on non-x86/amd64/powerpcIan Lynagh2006-08-251-2/+2
|
* remove conditionals from definition of StgRegTableSimon Marlow2006-06-291-2/+0
| | | | | so that we can calculate deterministic offsets to some of the fields of Capability.
* make rmp_tmp_w an StgWord instead of StgIntSimon Marlow2006-06-161-1/+1
|
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+787
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.