summaryrefslogtreecommitdiff
path: root/ghc/rts/parallel
Commit message (Collapse)AuthorAgeFilesLines
* Reorganisation of the source treeSimon Marlow2006-04-0727-18034/+0
| | | | | | | | | | | | | | | 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.
* [project @ 2005-03-27 13:41:13 by panne]panne2005-03-271-2/+2
| | | | | | | | | | * Some preprocessors don't like the C99/C++ '//' comments after a directive, so use '/* */' instead. For consistency, a lot of '//' in the include files were converted, too. * UnDOSified libraries/base/cbits/runProcess.c. * My favourite sport: Killed $Id$s.
* [project @ 2005-01-28 12:55:17 by simonmar]simonmar2005-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationalise the BUILD,HOST,TARGET defines. Recall that: - build is the platform we're building on - host is the platform we're running on - target is the platform we're generating code for The change is that now we take these definitions as applying from the point of view of the particular source code being built, rather than the point of view of the whole build tree. For example, in RTS and library code, we were previously testing the TARGET platform. But under the new rule, the platform on which this code is going to run is the HOST platform. TARGET only makes sense in the compiler sources. In practical terms, this means that the values of BUILD, HOST & TARGET may vary depending on which part of the build tree we are in. Actual changes: - new file: includes/ghcplatform.h contains platform defines for the RTS and library code. - new file: includes/ghcautoconf.h contains the autoconf settings only (HAVE_BLAH). This is so that we can get hold of these settings independently of the platform defines when necessary (eg. in GHC). - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h. - MachRegs.h, which is included into both the compiler and the RTS, now has to cope with the fact that it might need to test either _TARGET_ or _HOST_ depending on the context. - the compiler's Makefile now generates stage{1,2,3}/ghc_boot_platform.h which contains platform defines for the compiler. These differ depending on the stage, of course: in stage2, the HOST is the TARGET of stage1. This was wrong before. - The compiler doesn't get platform info from Config.hs any more. Previously it did (sometimes), but unless we want to generate a new Config.hs for each stage we can't do this. - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically in CPP'd Haskell source. - ghcplatform.h defines *_TARGET_* for backwards compatibility (ghcplatform.h is included by ghcconfig.h, which is included by config.h, so code which still #includes config.h will get the TARGET settings as before). - The Users's Guide is updated to mention *_HOST_* rather than *_TARGET_*. - coding-style.html in the commentary now contains a section on platform defines. There are further doc updates to come. Thanks to Wolfgang Thaller for pointing me in the right direction.
* [project @ 2004-09-12 11:45:04 by panne]panne2004-09-121-1/+1
| | | | Nuked "Revision" CVS keyword
* [project @ 2004-09-12 11:27:10 by panne]panne2004-09-1217-18/+1
| | | | | Removed the annoying "Id" CVS keywords, they're a real PITA when it comes to merging...
* [project @ 2003-06-03 09:41:48 by ross]ross2003-06-031-1/+1
| | | | | change trailing comments on #else/#endif lines to C style to avoid warnings from gcc 3.3's preprocessor.
* [project @ 2003-01-28 17:06:24 by simonmar]simonmar2003-01-281-0/+4
| | | | I moved startTime here, from RtsStartup.c where it seemed out of placed
* [project @ 2002-01-31 07:04:27 by sof]sof2002-01-311-2/+2
| | | | got tired of seeing gcc trigraph warning
* [project @ 2001-08-14 13:40:07 by sewardj]sewardj2001-08-144-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
* [project @ 2001-07-24 05:04:58 by ken]ken2001-07-241-5/+5
| | | | | | | | Removed 32-bit dependencies in the generation and handling of liveness mask bitmaps. We now support both 32-bit and 64-bit machines with identical .hc files. Support for >64-bit machines would be easy to add. Note that old .hc files are incompatible with the changes made to ghc/include/InfoMacros.h!
* [project @ 2001-07-23 17:23:19 by simonmar]simonmar2001-07-231-2/+1
| | | | | | | | | | | | | | | | | Add a compacting garbage collector. It isn't enabled by default, as there are still a couple of problems: there's a fallback case I haven't implemented yet which means it will occasionally bomb out, and speed-wise it's quite a bit slower than the copying collector (about 1.8x slower). Until I can make it go faster, it'll only be useful when you're actually running low on real memory. '+RTS -c' to enable it. Oh, and I cleaned up a few things in the RTS while I was there, and fixed one or two possibly real bugs in the existing GC.
* [project @ 2001-05-28 07:13:54 by sof]sof2001-05-283-7/+7
| | | | get rid of some more cpp warnings
* [project @ 2001-03-23 16:36:20 by simonmar]simonmar2001-03-231-1/+2
| | | | | | | | | | | | | | | Changes to support bootstrapping the compiler from .hc files. It's not quite working yet, but it's not far off. - the biggest change is that any injected #includes are now placed in the .hc file at generation time, rather than compilation time. I can't see any reason not to do this - it makes it clear by looking at the .hc file which files are being #included, it means one less temporary file at compilation time, and it means the .hc file is more standalone. - all the gruesomeness is in mk/bootstrap.mk, which handles building .hc files without a ghc driver.
* [project @ 2001-03-22 03:51:08 by hwloidl]hwloidl2001-03-2222-1136/+3727
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -*- outline -*- Time-stamp: <Thu Mar 22 2001 03:50:16 Stardate: [-30]6365.79 hwloidl> This commit covers changes in GHC to get GUM (way=mp) and GUM/GdH (way=md) working. It is a merge of my working version of GUM, based on GHC 4.06, with GHC 4.11. Almost all changes are in the RTS (see below). GUM is reasonably stable, we used the 4.06 version in large-ish programs for recent papers. Couple of things I want to change, but nothing urgent. GUM/GdH has just been merged and needs more testing. Hope to do that in the next weeks. It works in our working build but needs tweaking to run. GranSim doesn't work yet (*sigh*). Most of the code should be in, but needs more debugging. ToDo: I still want to make the following minor modifications before the release - Better wrapper skript for parallel execution [ghc/compiler/main] - Update parallel docu: started on it but it's minimal [ghc/docs/users_guide] - Clean up [nofib/parallel]: it's a real mess right now (*sigh*) - Update visualisation tools (minor things only IIRC) [ghc/utils/parallel] - Add a Klingon-English glossary * RTS: Almost all changes are restricted to ghc/rts/parallel and should not interfere with the rest. I only comment on changes outside the parallel dir: - Several changes in Schedule.c (scheduling loop; createThreads etc); should only affect parallel code - Added ghc/rts/hooks/ShutdownEachPEHook.c - ghc/rts/Linker.[ch]: GUM doesn't know about Stable Names (ifdefs)!! - StgMiscClosures.h: END_TSO_QUEUE etc now defined here (from StgMiscClosures.hc) END_ECAF_LIST was missing a leading stg_ - SchedAPI.h: taskStart now defined in here; it's only a wrapper around scheduleThread now, but might use some init, shutdown later - RtsAPI.h: I have nuked the def of rts_evalNothing * Compiler: - ghc/compiler/main/DriverState.hs added PVM-ish flags to the parallel way added new ways for parallel ticky profiling and distributed exec - ghc/compiler/main/DriverPipeline.hs added a fct run_phase_MoveBinary which is called with way=mp after linking; it moves the bin file into a PVM dir and produces a wrapper script for parallel execution maybe cleaner to add a MoveBinary phase in DriverPhases.hs but this way it's less intrusive and MoveBinary makes probably only sense for mp anyway * Nofib: - nofib/spectral/Makefile, nofib/real/Makefile, ghc/tests/programs/Makefile: modified to skip some tests if HWL_NOFIB_HACK is set; only tmp to record which test prgs cause problems in my working build right now
* [project @ 2000-08-07 23:37:19 by qrczak]qrczak2000-08-071-20/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now Char, Char#, StgChar have 31 bits (physically 32). "foo"# is still an array of bytes. CharRep represents 32 bits (on a 64-bit arch too). There is also Int8Rep, used in those places where bytes were originally meant. readCharArray, indexCharOffAddr etc. still use bytes. Storable and {I,M}Array use wide Chars. In future perhaps all sized integers should be primitive types. Then some usages of indexing primops scattered through the code could be changed to then-available Int8 ones, and then Char variants of primops could be made wide (other usages that handle text should use conversion that will be provided later). I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used for string literals (only). Z-encoding is ready for Unicode identifiers. Ranges of intlike and charlike closures are more easily configurable. I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I don't know the Alpha assembler to fix it (what is zapnot?). Generally I'm not sure if I've done the NCG changes right. This commit breaks the binary compatibility (of course). TODO: * is* and to{Lower,Upper} in Char (in progress). * Libraries for text conversion (in design / experiments), to be plugged to I/O and a higher level foreign library. * PackedString. * StringBuffer and accepting source in encodings other than ISO-8859-1.
* [project @ 2000-03-31 03:09:35 by hwloidl]hwloidl2000-03-3116-1275/+3111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Numerous changes in the RTS to get GUM-4.06 working (currently works with parfib-ish programs). Most changes are isolated in the rts/parallel dir. rts/parallel/: The most important changes are a rewrite of the (un-)packing code (Pack.c) and changes in LAGA, GALA table operations (Global.c) expecially in rebuilding the tables during GC. rts/: Minor changes in Schedule.c, GC.c (interface to par specific root marking and evacuation), and lots of additions to Sanity.c (surprise ;-) Main.c change for startup: I use a new function rts_evalNothing to start non-main-PEs in a PAR || SMP setup (RtsAPI.c) includes/: Updated GranSim macros in PrimOps.h. lib/std: Few changes in PrelHandle.c etc replacing ForeignObj by Addr in a PAR setup (we still don't support ForeignObjs or WeakPtrs in GUM). Typically use #define FILE_OBJECT Addr when dealing with files. hslibs/lang/: Same as above (in Foreign(Obj).lhs, Weak.lhs, IOExts.lhs etc). -- HWL
* [project @ 2000-03-17 14:37:21 by simonmar]simonmar2000-03-171-3/+3
| | | | More random cleanups.
* [project @ 2000-01-14 16:15:08 by simonmar]simonmar2000-01-141-2/+3
| | | | | - add missing FB_ macro - correct a couple of comments
* [project @ 2000-01-14 14:56:40 by simonmar]simonmar2000-01-142-118/+1
| | | | Move closure type printing stuff to Printer.c, since it's generally useful.
* [project @ 2000-01-14 14:06:48 by hwloidl]hwloidl2000-01-142-2/+32
| | | | Minor cleanup (to get rid of warnings)
* [project @ 2000-01-14 11:45:21 by hwloidl]hwloidl2000-01-141-5/+4
| | | | Bugfix (raiseError in non-enterable closures); added GranSim code to Schedule.c
* [project @ 2000-01-13 14:33:57 by hwloidl]hwloidl2000-01-1323-0/+13688
Merged GUM-4-04 branch into the main trunk. In particular merged GUM and SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.