- 10 Feb, 2005 1 commit
-
-
simonmar authored
GC changes: instead of threading old-generation mutable lists through objects in the heap, keep it in a separate flat array. This has some advantages: - the IND_OLDGEN object is now only 2 words, so the minimum size of a THUNK is now 2 words instead of 3. This saves some amount of allocation (about 2% on average according to my measurements), and is more friendly to the cache by squashing objects together more. - keeping the mutable list separate from the IND object will be necessary for our multiprocessor implementation. - removing the mut_link field makes the layout of some objects more uniform, leading to less complexity and special cases. - I also unified the two mutable lists (mut_once_list and mut_list) into a single mutable list, which lead to more simplifications in the GC.
-
- 28 Jan, 2005 1 commit
-
-
simonmar authored
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.
-
- 19 Nov, 2004 1 commit
-
-
tharris authored
Fix build error during unregistered builds, remove warning building GCCompact
-
- 18 Nov, 2004 1 commit
-
-
tharris authored
Support for atomic memory transactions and associated regression tests conc041-048
-
- 09 Nov, 2004 1 commit
-
-
sof authored
threadDelay(mingw32): introduce and use the return continuation stg_block_async_void; fixes mem leak, cf. http://haskell.org/pipermail/cvs-ghc/2004-November/022325.html
-
- 16 Aug, 2004 1 commit
-
-
simonpj authored
stg_interp_constr_entry and friends don't have info tables, so declare them using RTS_FUN() rather than RTS_ENTRY().
-
- 13 Aug, 2004 1 commit
-
-
simonmar authored
Merge backend-hacking-branch onto HEAD. Yay!
-
- 27 Mar, 2003 1 commit
-
-
simonmar authored
Two performance tweaks: - Use specialised indirections, which perform the right kind of return without needing to enter the object they point to. This saves a small percentages of memory reads. - Tweak the update code to generate better code with gcc. This saves a few instructions per update.
-
- 21 Feb, 2003 1 commit
-
-
sof authored
Asynchronous / non-blocking I/O for Win32 platforms. This commit introduces a Concurrent Haskell friendly view of I/O on Win32 platforms. Through the use of a pool of worker Win32 threads, CH threads may issue asynchronous I/O requests without blocking the progress of other CH threads. The issuing CH thread is blocked until the request has been serviced though. GHC.Conc exports the primops that take care of issuing the asynchronous I/O requests, which the IO implementation now takes advantage of. By default, all Handles are non-blocking/asynchronous, but should performance become an issue, having a per-Handle flag for turning off non-blocking could easily be imagined&introduced. [Incidentally, this thread pool-based implementation could easily be extended to also allow Haskell code to delegate the execution of arbitrary pieces of (potentially blocking) external code to another OS thread. Given how relatively gnarly the locking story has turned out to be with the 'threaded' RTS, that may not be such a bad idea.]
-
- 07 Jan, 2003 1 commit
-
-
simonmar authored
Declare stg_BCO_entry. (this should have been committed with rev. 1.4 of utils/genapply/GenApply.hs).
-
- 11 Dec, 2002 1 commit
-
-
simonmar authored
Merge the eval-apply-branch on to the HEAD ------------------------------------------ This is a change to GHC's evaluation model in order to ultimately make GHC more portable and to reduce complexity in some areas. At some point we'll update the commentary to describe the new state of the RTS. Pending that, the highlights of this change are: - No more Su. The Su register is gone, update frames are one word smaller. - Slow-entry points and arg checks are gone. Unknown function calls are handled by automatically-generated RTS entry points (AutoApply.hc, generated by the program in utils/genapply). - The stack layout is stricter: there are no "pending arguments" on the stack any more, the stack is always strictly a sequence of stack frames. This means that there's no need for LOOKS_LIKE_GHC_INFO() or LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know how to find the boundary between the text and data segments (BIG WIN!). - A couple of nasty hacks in the mangler caused by the neet to identify closure ptrs vs. info tables have gone away. - Info tables are a bit more complicated. See InfoTables.h for the details. - As a side effect, GHCi can now deal with polymorphic seq. Some bugs in GHCi which affected primitives and unboxed tuples are now fixed. - Binary sizes are reduced by about 7% on x86. Performance is roughly similar, some programs get faster while some get slower. I've seen GHCi perform worse on some examples, but haven't investigated further yet (GHCi performance *should* be about the same or better in theory). - Internally the code generator is rather better organised. I've moved info-table generation from the NCG into the main codeGen where it is shared with the C back-end; info tables are now emitted as arrays of words in both back-ends. The NCG is one step closer to being able to support profiling. This has all been fairly thoroughly tested, but no doubt I've messed up the commit in some way.
-
- 02 Mar, 2002 1 commit
-
-
sof authored
Add stg_ut_1_0_unreg_info proto (only)
-
- 26 Jan, 2002 1 commit
-
-
rje authored
Change to declarations of info tables of the form X_ret_info to syncronise with my previous commit to HeapStackCheck.hc
-
- 11 Dec, 2001 1 commit
-
-
chak authored
I guess, this got lost in Julian's commit yesterday.
-
- 08 Nov, 2001 1 commit
-
-
simonmar authored
Fix the large block allocation bug (Yay!) ----------------------------------------- In order to do this, I had to 1. in each heap-check failure branch, return the amount of heap actually requested, in a known location (I added another slot in StgRegTable called HpAlloc for this purpose). This is useful for other reasons - in particular it makes it possible to get accurate allocation statistics. 2. In the scheduler, if a heap check fails and we wanted more than BLOCK_SIZE_W words, then allocate a special large block and place it in the nursery. The nursery now has to be double-linked so we can insert the new block in the middle. 3. The garbage collector has to be able to deal with multiple objects in a large block. It turns out that this isn't a problem as long as the large blocks only occur in the nursery, because we always copy objects from the nursery during GC. One small change had to be made: in evacuate(), we may need to follow the link field from the block descriptor to get to the block descriptor for the head of a large block. 4. Various other parts of the storage manager had to be modified to cope with a nursery containing a mixture of block sizes. Point (3) causes a slight pessimization in the garbage collector. I don't see a way to avoid this. Point (1) causes some code bloat (a rough measurement is around 5%), so to offset this I made the following change which I'd been meaning to do for some time: - Store the values of some commonly-used absolute addresses (eg. stg_update_PAP) in the register table. This lets us use shorter instruction forms for some absolute jumps and saves some code space. - The type of Capability is no longer the same as an StgRegTable. MainRegTable renamed to MainCapability. See Regs.h for details. Other minor changes: - remove individual declarations for the heap-check-failure jump points, and declare them all in StgMiscClosures.h instead. Remove HeapStackCheck.h. Updates to the native code generator to follow.
-
- 09 Jul, 2001 1 commit
-
-
sof authored
Hmm..are the Cambridge offices running low on oxygen? Desloppified to make stage2 work again
-
- 22 Mar, 2001 1 commit
-
-
hwloidl authored
-*- 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
-
- 15 Feb, 2001 1 commit
-
-
sewardj authored
VoidRep call/return support for the interpreter.
-
- 12 Feb, 2001 1 commit
-
-
chak authored
Finish SimonM's "non-optional GHCi RTS" patch.
-
- 11 Feb, 2001 1 commit
-
-
simonmar authored
Bite the bullet and make GHCi support non-optional in the RTS. GHC 4.11 should be able to build GHCi without any additional tweaks now. - the Linker is split into two parts: LinkerBasic.c, containing the routines required by the rest of the RTS, and Linker.c, containing the linker proper, which is not referred to from the rest of the RTS. Only Linker.c requires -ldl, so programs which don't make use of the linker (everything except GHC, in other words) won't need -ldl.
-
- 09 Feb, 2001 1 commit
-
-
simonmar authored
Remove all vestiges of INTERPRETER and __HUGS__.
-
- 29 Jan, 2001 1 commit
-
-
simonmar authored
Remove the old Hugs CAF code, install our own (minimal, somewhat cryptic, but better commented) CAF reversion story. See Storage.c:newCaf() for the details.
-
- 15 Jan, 2001 1 commit
-
-
sewardj authored
In interpreted code, basic support for routing primop calls through to functions in PrelPrimopWrappers.lhs.
-
- 20 Dec, 2000 2 commits
- 19 Dec, 2000 4 commits
- 14 Dec, 2000 2 commits
- 04 Dec, 2000 1 commit
-
-
simonmar authored
merge recent changes from before-ghci-branch onto the HEAD
-
- 13 Nov, 2000 1 commit
-
-
simonmar authored
Change the names of several RTS symbols so they don't potentially clash with user code. All the symbols that may clash now have an "stg_" prefix.
-
- 07 Nov, 2000 1 commit
-
-
simonmar authored
merge before-ghci -> before-ghci-branch-merged into the ghc (non-compiler) parts of the tree.
-
- 12 Oct, 2000 1 commit
-
-
simonmar authored
remove kludge
-
- 11 Sep, 2000 1 commit
-
-
sewardj authored
Initial primop support for the metacircular interpreter (GHCI). Only appears if you compile with -DGHCI; if not, the world is unchanged. new primops: indexPtrOffClosure# indexWordOffClosure# modified: dataToTag# -- now dereferences indirections before extracting tag new entry code mci_constr_entry and mci_constr[1..8]entry being the direct and vectored return code fragments for interpreter created constructors. Support for static constructors is not yet done. New handwritten .hc functions: mci_make_constr* being code to create various flavours of constructors from args on the stack. An interface file to describe these will follow in a later commit.
-
- 02 Aug, 2000 1 commit
-
-
rrt authored
Many fixes to DLLisation. These were previously covered up because code was leaking into the import libraries for DLLs, so the fact that some symbols were thought of as local rather than in another DLL wasn't a problem. The main problems addressed by this commit are: 1. Fixes RTS symbols working properly when DLLised. They didn't before. 2. Uses NULL instead of stg_error_entry, because DLL entry points can't be used as static initialisers. 3. PrelGHC.hi-boot changed to be in package RTS, and export of PrelNum and PrelErr moved to PrelBase, so that references to primops & the like are cross-DLL as they should be. 4. Pass imports around as Modules rather than ModuleNames, so that ModuleInitLabels can be checked to see if they're in a DLL or not.
-
- 21 Jul, 2000 1 commit
-
-
rrt authored
Add EXTINFO_RTS and use it (same as EXTFUN_RTS for info tables).
-
- 13 Jan, 2000 1 commit
-
-
hwloidl authored
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.
-
- 02 Nov, 1999 1 commit
-
-
simonmar authored
This commit adds in the current state of our SMP support. Notably, this allows the new way 's' to be built, providing support for running multiple Haskell threads simultaneously on top of any pthreads implementation, the idea being to take advantage of commodity SMP boxes. Don't expect to get much of a speedup yet; due to the excessive locking required to synchronise access to mutable heap objects, you'll see a slowdown in most cases, even on a UP machine. The best I've seen is a 1.6-1.7 speedup on an example that did no locking (two optimised nfibs in parallel). - new RTS -N flag specifies how many pthreads to start. - new driver -smp flag, tells the driver to use way 's'. - new compiler -fsmp option (not for user comsumption) tells the compiler not to generate direct jumps to thunk entry code. - largely rewritten scheduler - _ccall_GC is now done by handing back a "token" to the RTS before executing the ccall; it should now be possible to execute blocking ccalls in the current thread while allowing the RTS to continue running Haskell threads as normal. - you can only call thread-safe C libraries from a way 's' build, of course. Pthread support is still incomplete, and weird things (including deadlocks) are likely to happen.
-