summaryrefslogtreecommitdiff
path: root/rts
Commit message (Collapse)AuthorAgeFilesLines
* FIX: loading package ghc in GHCi (added a couple of missing symbols)Simon Marlow2007-05-311-0/+2
|
* FIX #767 (withMVar family have a bug)Simon Marlow2007-05-181-1/+6
| | | | | | We never want to raise a StackOverflow exception inside Control.Exception.block, because the user has no reasonable way of handling it, and it invalidates some useful guarantees.
* remove old comments and commented-out codeSimon Marlow2007-05-181-10/+1
|
* raise#: break *after* stripping the stack, not beforeSimon Marlow2007-05-161-23/+29
| | | | | | This means that thunks under evaluation will have been updated with the exception when we come to inspect them in GHCi. Blackholes are much less friendly.
* later mingw runtimes have gettimeofday, it seemsSimon Marlow2007-05-161-0/+7
|
* GHCi debugger: new flag -fbreak-on-exceptionSimon Marlow2007-05-153-37/+65
| | | | | | | | | | When -fbreak-on-exception is set, an exception will cause GHCi to suspend the current computation and return to the prompt, where the history of the current evaluation can be inspected (if we are in :trace). This isn't on by default, because the behaviour could be confusing: for example, ^C will cause a breakpoint. It can be very useful for finding the cause of a "head []" or a "fromJust Nothing", though.
* FIX BUILD: revert accidentally-committed patchSimon Marlow2007-05-111-1/+0
|
* FIX: loading the ghc package under GHCiSimon Marlow2007-05-101-0/+3
|
* FIX BUILD (non-profiling RTS was broken in previous patch)Simon Marlow2007-05-081-0/+5
|
* FIX: #1227 (biographical profiling broken)Simon Marlow2007-05-081-3/+3
| | | | | We were freeing the hash table storage with exitHashTable() before calling endProfiling(), which uses hash tables.
* FIX crash on exit with biographical profilingSimon Marlow2007-05-081-2/+4
| | | | | Seems to be a bug introduced by code to free the memory allocated by the heap profiler.
* FIX profiling :-(Simon Marlow2007-05-081-1/+1
|
* Use a primop for getting the fields of the AP_STACK rather than an FFI callSimon Marlow2007-05-032-24/+10
| | | | | | This means we can avoid some StablePtrs, and also catch cases where the AP_STACK has been evaluated (this can happen with :history, see the hist001 test).
* tidyup comments and fix a few warningsSimon Marlow2007-04-301-33/+42
|
* Changing internal data structures used by Hpcandy@galois.com2007-04-301-70/+83
| | | | | | | | | - .tix files are now a list of MixModule, which contain a hash of the contents of the .mix file. - .mix files now have (the same) hash number. This changes allow different binaries that use the same module compiled in the same way to share coverage information.
* Basic heap profile support without -profSimon Marlow2007-04-2710-182/+155
| | | | | | | | | | | | | | Now that constructor info tables contain the name of the constructor, we can generate useful heap profiles without requiring the whole program and libraries to be compiled with -prof. So now, "+RTS -hT" generates a heap profile for any program, dividing the profile by constructor. It wouldn't be hard to add support for grouping constructors by module, or to restrict the profile to certain constructors/modules/packages. This means that for the first time we can get heap profiles for GHCi, which was previously impossible because the byte-code interpreter and linker don't work with -prof.
* Avoid segfault when ticky file argument is stderrTim Chevalier2007-04-261-0/+8
| | | | | | | | | | | | | | If you compiled a program with -ticky and ran it with: ./foo +RTS -rstderr -RTS the result would be a segfault. This was because the RTS interprets stderr to mean "use debugBelch to print out messages," and sets the ticky file pointer to NULL as a result, but PrintTickyInfo (the function in Ticky.c that prints out the ticky report) wasn't checking for NULL. I changed PrintTickyInfo to check whether the ticky file pointer is NULL and output to stderr if so. Also removed an unused import from CodeOutput.lhs.
* Re-working of the breakpoint supportSimon Marlow2007-04-176-26/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the result of Bernie Pope's internship work at MSR Cambridge, with some subsequent improvements by me. The main plan was to (a) Reduce the overhead for breakpoints, so we could enable the feature by default without incurrent a significant penalty (b) Scatter more breakpoint sites throughout the code Currently we can set a breakpoint on almost any subexpression, and the overhead is around 1.5x slower than normal GHCi. I hope to be able to get this down further and/or allow breakpoints to be turned off. This patch also fixes up :print following the recent changes to constructor info tables. (most of the :print tests now pass) We now support single-stepping, which just enables all breakpoints. :step <expr> executes <expr> with single-stepping turned on :step single-steps from the current breakpoint The mechanism is quite different to the previous implementation. We share code with the HPC (haskell program coverage) implementation now. The coverage pass annotates source code with "tick" locations which are tracked by the coverage tool. In GHCi, each "tick" becomes a potential breakpoint location. Previously breakpoints were compiled into code that magically invoked a nested instance of GHCi. Now, a breakpoint causes the current thread to block and control is returned to GHCi. See the wiki page for more details and the current ToDo list: http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
* MERGE: Fix a few uses of the wrong return convention for the schedulerSimon Marlow2007-04-163-13/+12
| | | | | | | | | | We changed the convention a while ago so that BaseReg is returned to the scheduler in R1, because BaseReg may change during the run of a thread, e.g. during a foreign call. A few places got missed, mostly for very rare events. Should fix concprog001, although I'm not able to reliably reproduce the failure.
* Darwin/x86_64 linker supportwolfgang.thaller@gmx.net2007-04-122-62/+249
| | | | Initial support for loading x86_64 Mach-O files
* Darwin Linker: Do not add local symbols to lochashwolfgang.thaller@gmx.net2007-04-121-9/+0
| | | | | | ... so that GHCi doesn't complain about duplicate symbols when two C modules define the same static variable. MERGE TO STABLE.
* Handle Weak Definitions in the Darwin Linkerwolfgang.thaller@gmx.net2007-04-121-6/+11
| | | | | | | The __i686.get_pc_thunk symbols generated by gcc's PIC code generator are weak definitions that appear in every object file, so we need to deal with them. MERGE TO STABLE.
* fix adjustor generation on ia64 (test case ffi009)red5_2@hotmail.com2007-04-011-4/+14
| | | | | | | | | | | Some fixes to adjustor functions. The 8-byte address returned by the allocator is adjusted to be aligned to 16-byte boundaries. Fixed a typo in inserting an immediate address into an instruction. This fixes the calls to 5-argument and 6-argument functions in ffi009. Some functions still break. I suspect it's related to passing arguments on the stack.
* save two more FP registers on ia64red5_2@hotmail.com2007-03-271-4/+8
| | | | | | Save/restore two more registers in StgCRun(). The extra registers are used by ffi009.hs, when compiling with gcc 4.1.2.
* slight doc wibble for the -r flagSimon Marlow2007-04-041-1/+1
|
* MERGE: Fix bug exposed by conc052.Simon Marlow2007-04-041-5/+14
| | | | | | | | | A thread that was blocked on a blackhole but can now be woken up could possibly be treated as unreachable by the GC, and sent the NonTermination exception. This can give rise to spurious <<loop>>s in concurrent programs, so it's a good one to fix.
* Fix C/Haskell type mismatchesIan Lynagh2007-04-041-1/+1
|
* Fix C/Haskell type mismatchesIan Lynagh2007-04-034-12/+12
|
* Add an --install-signal-handlers=<yes|no> RTS flag; fixes trac #804Ian Lynagh2007-03-225-13/+45
|
* mangler and runtime updates for gcc 4 on ia64red5_2@hotmail.com2007-03-181-12/+31
| | | | | | | | | | | | | | | Gcc 4 is doing more clever optimizations than earlier gccs. These changes let ghc compile and run on ia64 with gcc 4.0.3. Register stack frames are enlarged so that all functions use the same size stack frame. The code to mangle tail calls has been cleaned up and made more general. Additional floating-point and special-purpose registers used by GCC are saved upon entering the STG runtime. More general handling of NOP instructions. Handling of functions with multiple epilogues or no epilogue.
* Have configure take arguments telling it where gmp is; fixes trac #957Ian Lynagh2007-03-112-3/+21
|
* add missing %ENTRY_CODE()Simon Marlow2007-03-081-2/+2
| | | | fixes unreg way in HEAD
* add noDuplicatezh_fast to symbol tableSimon Marlow2007-03-081-0/+1
|
* add noDuplicate#Simon Marlow2007-03-061-0/+20
| | | | | | This primop ensures that the current computation is not being duplicated, by calling threadPaused(). The idea is to use it inside unsafePerformIO/unsafeInterleaveIO (see #986).
* THREADED_RTS: use cas() when claiming thunksSimon Marlow2007-03-061-1/+21
| | | | | | I guess I forgot to do this the first time around; the upshot is that there could be some uncaught duplication of work on a multiprocessor (but unlikely).
* workerTaskStop(): set task->cap = NULLSimon Marlow2007-03-061-0/+1
| | | | avoids an assertion failure in newBoundTask()
* disable -Wbad-function-cast; it's hard/impossible to work aroundSimon Marlow2007-03-061-1/+1
|
* remove vestiges of CCallable/CReturnableSimon Marlow2007-03-061-18/+0
|
* forkProcess: startTimer() in the child, because the timer will be resetSimon Marlow2007-03-051-0/+4
|
* better autoconfery for timer_create()Simon Marlow2007-03-051-3/+1
|
* Use timer_create() for the interval timer, if availableSimon Marlow2007-03-025-89/+107
| | | | | | | | | | | This lets the threaded RTS use SIGVTALRM rather than SIGALRM for its interval timer signal, so the threaded and non-threaded RTS are compatible. It unfortunately doesn't completely fix #850/#1156, for that we really have to use a restartable sleep instead of usleep(). Also I cleaned up the timer API a little: instead of returning an error value that ultimately gets ignored, we now report errors from system calls and exit.
* Remove vectored returns.Simon Marlow2007-02-2816-361/+61
| | | | | We recently discovered that they aren't a win any more, and just cost code size.
* Remove the itbls field of BCO, put itbls in with the literalsSimon Marlow2007-02-276-20/+8
| | | | This is a simplification & minor optimisation for GHCi
* Constructor names in info tablesbjpop@csse.unimelb.edu.au2007-02-201-51/+0
| | | | | | | This patch adds data constructor names into their info tables. This is useful in the ghci debugger. It replaces the old scheme which was based on tracking data con names in the linker.
* pthread_key_delete wants the key itself, not a pointer to itIan Lynagh2007-02-231-1/+1
|
* Free thread local storage on shutdownIan Lynagh2007-02-223-0/+23
|
* freeTaskManager: don't free Tasks that are still in useSimon Marlow2007-02-201-4/+10
| | | | See conc059.
* Fix sleep delay for the non-threaded Windows RTSSimon Marlow2007-02-201-1/+1
| | | | | This is the Windows counterpart to "Make the non-threaded-RTS threadDelay wait at least as long as asked"
* add a ToDo, reference bug #1147Simon Marlow2007-02-141-0/+4
|
* Fixing bad allocation of tix box breakpointing array.andy@galois.com2007-02-131-1/+4
|