- 02 Nov, 1999 2 commits
-
-
simonmar authored
Fix CAF_BLACKHOLE and BLACKHOLE_BQ entry code for SMP case (it was going into a busy locking state through comparing against the wrong info pointer)
-
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.
-
- 25 Aug, 1999 1 commit
-
-
simonmar authored
Support for thread{WaitRead,WaitWrite,Delay}. These should behave identically to the 3.02 implementations. We now have the virtual timer on during all program runs, which ticks at 50Hz by default. This is used to implement threadDelay, so you won't get any better granularity than the tick frequency unfortunately. It remains to be seen whether using the virtual timer will have a measurable impact on performance for non-threadDelaying programs. All operations in the I/O subsystem should now be non-blocking with respect to other running Haskell threads. It remains to be seen whether this will have a measurable performance impact on non-concurrent programs (probably not).
-
- 06 Jul, 1999 1 commit
-
-
sewardj authored
Assembler/Disassembler: handle and print calls to compiled code Evaluator: return to scheduler when entering unknown closure StgCRun: debugging trace in miniinterpreter (temporary) Updates: fix normal and vectored returns to Hugs
-
- 08 Jun, 1999 1 commit
-
-
simonmar authored
Fix ifdef INTERPRETER code fragment.
-
- 21 May, 1999 1 commit
-
-
sof authored
Made rts_evalIO() stricter, i.e., rts_evalIO( action ); will now essentially cause `action' to be applied to the following (imaginary) defn of `evalIO': evalIO :: IO a -> IO a evalIO action = action >>= \ x -> x `seq` return x instead of just evalIO :: IO a -> IO a evalIO action = action >>= \ x -> return x The old, lazier behaviour is now available via rts_evalLazyIO().
-
- 13 May, 1999 1 commit
-
-
simonm authored
Support for "unregisterised" builds. An unregisterised build doesn't use the assembly mangler, doesn't do tail jumping (uses the mini-interpreter), and doesn't use global register variables. Plenty of cleanups and bugfixes in the process. Add way 'u' to GhcLibWays to get unregisterised libs & RTS. [ note: not *quite* working fully yet... there's still a bug or two lurking ]
-
- 11 May, 1999 1 commit
-
-
keithw authored
(this is number 9 of 9 commits to be applied together) Usage verification changes / ticky-ticky changes: We want to verify that SingleEntry thunks are indeed entered at most once. In order to do this, -ticky / -DTICKY_TICKY turns on eager blackholing. We blackhole with new blackholes: SE_BLACKHOLE and SE_CAF_BLACKHOLE. We will enter one of these if we attempt to enter a SingleEntry thunk twice. Note that CAFs are dealt with in by codeGen, and ordinary thunks by the RTS. We also want to see how many times we enter each Updatable thunk. To this end, we have modified -ticky. When -ticky is on, we update with a permanent indirection, and arrange that when we enter a permanent indirection we count the entry and then convert the indirection to a normal indirection. This gives us a means of counting the number of thunks entered again after the first entry. Obviously this screws up profiling, and so you can't build a ticky and profiling compiler any more. Also a few other changes that didn't make it into the previous 8 commits, but form a part of this set.
-
- 04 May, 1999 1 commit
-
-
sof authored
Misc tweaks to Win32 DLL setup
-
- 23 Apr, 1999 1 commit
-
-
simonm authored
More profiling fixes. Profiles looking more reasonable, but for best results add the -caf-all switch to GHC.
-
- 18 Mar, 1999 1 commit
-
-
simonm authored
Some fixes to profiling stuff.
-
- 16 Mar, 1999 1 commit
-
-
simonm authored
Improvements to the threading model. - asynchronous exceptions supported. - killThread# can now raise an exception in the specified thread. It's new type is killThread# :: ThreadId# -> Exception -> IO () High-level versions: killThread :: ThreadId -> IO () raiseInThread :: ThreadId -> Exception -> IO () (killThread raises a 'ThreadKilled' exception in the specified thread). If the thread has no exception handler, it is killed as before. Otherwise, the exception is passed to the innermost CATCH_FRAME and the thread is woken up if it was blocked. The current computation is suspended, instead of being replaced by the exception (as is the case with throw). Sending an exception to the current thread works too. - new primitive: myThreadId# :: IO ThreadId# and corresponding high-level version myThreadId :: IO ThreadId. - new primitive: yield# :: IO (), and yield :: IO (). - the TSO now contains a pointer to the resource currently blocked on (MVAR or BLACKHOLE_BQ). - Add a giant comment to TSO.h about what the various link fields are supposed to do, and invariants etc.
-
- 15 Mar, 1999 1 commit
-
-
simonm authored
Remove flags field from info tables; create a separate table of flags indexed by the closure type in the RTS.
-
- 09 Mar, 1999 1 commit
-
-
sewardj authored
Include CAF_ENTEREDs on the mutables list so they get scavenged correctly.
-
- 02 Mar, 1999 1 commit
-
-
sof authored
When putting the RTS in a DLL, we have to delay filling in the Charlike and Intlike tables until load-time.
-
- 11 Feb, 1999 1 commit
-
-
simonm authored
- s/finalise/finalize/g - make finalize run the finalizer immediately, and wait for its completion - make mkWeak take a (Maybe (IO ())) for the finalizer argument - remove mkWeakNoFinalizer
-
- 05 Feb, 1999 2 commits
- 02 Feb, 1999 1 commit
-
-
simonm authored
- Add ticky counter for total bytes copied during GC. - Separate mutable list into two lists, a "mut once" list for old generation indirections and MUT_CONS cells, and a "mut many" list for mutable arrays, TSOs etc. Objects on the "mut once" list will be eagerly promoted.
-
- 01 Feb, 1999 1 commit
-
-
simonm authored
- Add finalise# - Add mkWeakNoFinaliser - Move deRefWeak# from an out-of-line primop to an inline one.
-
- 27 Jan, 1999 1 commit
-
-
simonpj authored
Finally! This commits the ongoing saga of Simon's hygiene sweep FUNCTIONALITY ~~~~~~~~~~~~~ a) The 'unused variable' warnings from the renamer work. b) Better error messages here and there, esp type checker c) Fixities for Haskell 98 (maybe I'd done that before) d) Lazy reporting of name clashes for Haskell 98 (ditto) HYGIENE ~~~~~~~ a) type OccName has its own module. OccNames are represented by a single FastString, not three as in the last round. This string is held in Z-encoded form; a decoding function decodes for printing in user error messages. There's a nice tight encoding for (,,,,,,,,,,,,,,,,,,,,,,,,,,,,,) b) type Module is a proper ADT, in module OccName c) type RdrName is a proper ADT, in its own module d) type Name has a new, somwhat tidier, representation e) much grunting in the renamer to get Provenances right. This makes error messages look better (no spurious qualifiers)
-
- 26 Jan, 1999 1 commit
-
-
simonm authored
- Add Stable Names - Stable pointers and stable names are now both provided by the "Stable" module in ghc/lib/exts. Documentation is updated, and Foriegn still exports the stable pointer operations for backwards compatibility.
-
- 21 Jan, 1999 1 commit
-
-
simonm authored
Resurrect ticky-ticky profiling. Not quite polished yet, but it compiles and produces some reasonable-looking stats.
-
- 18 Jan, 1999 1 commit
-
-
simonm authored
- BLACKHOLE_BQ is a mutable object, because new threads get added to its blocking_queue field. Hence add a mut_link field and treat it as mutable in the garbage collector. - Change StgBlackHole to StgBlockingQueue while I'm at it. - Optimise evacuation of black holes: don't copy the padding words, just skip over them. - Several garbage collection fixes. - Improve sanity checking: now the older generations are fully checked at each GC.
-
- 15 Jan, 1999 2 commits
-
-
simonm authored
- Add new object BLACKHOLE_BQ: now a BLACKHOLE is defined as having an empty blocking queue, and the first time a thread blocks on a BLACKHOLE it is changed into a BLACKHOLE_BQ. - Remove UPD_INPLACE1 and replace it with UPD_IND in the two places it was used. UPD_INPLACE1 wouldn't have worked in a generational setting.
-
sewardj authored
Remove 'const' modifier from static closure declarations. Static closures are meant to live in R/W data space.
-
- 13 Jan, 1999 1 commit
-
-
simonm authored
Added a generational garbage collector. The collector is reliable but fairly untuned as yet. It works with an arbitrary number of generations: use +RTS -G<gens> to change the number of generations used (default 2). Stats: +RTS -Sstderr is quite useful, but to really see what's going on compile the RTS with -DDEBUG and use +RTS -D32. ARR_PTRS removed - it wasn't used anywhere. Sanity checking improved: - free blocks are now spammed when sanity checking is turned on - a check for leaking blocks is performed after each GC.
-
- 02 Dec, 1998 1 commit
-
-
simonm authored
Move 4.01 onto the main trunk.
-