summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Install the RTS from a bindist correctlyIan Lynagh2007-06-051-7/+16
|
* Adding new ffi calls into the Hpc rts subsystemandy@galois.com2007-06-121-0/+2
| | | | | | | | | foreign import ccall unsafe hs_hpc_write :: CString -> IO () foreign import ccall unsafe hs_hpc_read :: CString -> IO () These write a Hpc description of the state of the world to a file, or read a description into the current Hpc tickbox subsystem.
* Fix PPC Mac OS X memory access problem in SMP.h (#1362)Thorkil Naur2007-05-181-1/+1
|
* FIX BUILD for way=u in RTSSimon Marlow2007-05-161-0/+1
|
* GHCi debugger: new flag -fbreak-on-exceptionSimon Marlow2007-05-152-0/+6
| | | | | | | | | | 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.
* improve comments about x86-64 relative-offset hackerySimon Marlow2007-05-101-0/+10
|
* Changing internal data structures used by Hpcandy@galois.com2007-04-301-1/+1
| | | | | | | | | - .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-272-2/+11
| | | | | | | | | | | | | | 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.
* Make ticky work, at least partly, on 64-bit machinessimonpj@microsoft.com2007-04-241-5/+5
| | | | | | | | | | | | | | The ticky StgEntCounter structure was trying to be clever by using a fixed-width 32-bit field for the registeredp value. But the code generators are not up to handling structures packed tightly like this (on a 64-bit architecture); result seg-fault on 64-bit. Really there should be some complaint from the code generators, not simply a seg fault. Anyway I switched to using native words for StgEntCounter fields, and now at least it works.
* Re-working of the breakpoint supportSimon Marlow2007-04-173-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove the ITBL_SIZE constants which were wrong, but fortunately unusedSimon Marlow2007-04-171-7/+0
|
* con_desc should be an OFFSET_FIELDSimon Marlow2007-04-171-1/+2
|
* MERGE: Fix a few uses of the wrong return convention for the schedulerSimon Marlow2007-04-161-0/+1
| | | | | | | | | | 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.
* HANDLE --> (void *), we can't rely on having included windows.h hereSimon Marlow2007-04-041-1/+1
| | | | HANDLE is defined to be (void *) anyway, so this shouldn't hurt
* Fix C/Haskell type mismatchesIan Lynagh2007-04-041-1/+5
|
* Fix C/Haskell type mismatchesIan Lynagh2007-04-031-6/+6
|
* move "boot :: all" after the include of target.mk to fix #1095Simon Marlow2007-03-261-4/+11
|
* add missing progress messageSimon Marlow2007-03-261-0/+1
|
* Add an --install-signal-handlers=<yes|no> RTS flag; fixes trac #804Ian Lynagh2007-03-221-0/+1
|
* ia64 tailcall fixred5_2@hotmail.com2007-03-171-2/+11
| | | | | | | Tail-calls now branch to the end of the function after the call. This stops gcc from trying to move instructions into the space immediately after the call, which confuses the mangler.
* add declaration for noDuplicatezh_fastSimon Marlow2007-03-071-0/+2
|
* Remove vectored returns.Simon Marlow2007-02-286-79/+37
| | | | | 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-272-2/+0
| | | | This is a simplification & minor optimisation for GHCi
* Constructor names in info tablesbjpop@csse.unimelb.edu.au2007-02-203-3/+21
| | | | | | | 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.
* Free thread local storage on shutdownIan Lynagh2007-02-221-0/+1
|
* fix closure_sizeW_() for AP closuresSimon Marlow2007-02-141-0/+1
| | | | | | | | | | Since thunks grew an extra padding word in GHC 6.6, closure_sizeW() has been wrong for AP closures because it assumed compatible layout between PAPs and APs. One symptom is that the compacting GC would crash if it encountered an AP. APs conly crop up in GHCi or when using asynchronous exceptions. Fixes #1010
* Using RTS debug tracing support inside Hpc.candy@galois.com2007-02-131-0/+1
|
* Lightweight ticky-ticky profilingKirsten Chevalier2007-02-076-785/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes restore ticky-ticky profiling to functionality from its formerly bit-rotted state. Sort of. (It got bit-rotted as part of the switch to the C-- back-end.) The way that ticky-ticky is supposed to work is documented in Section 5.7 of the GHC manual (though the manual doesn't mention that it hasn't worked since sometime around 6.0, alas). Changes from this are as follows (which I'll document on the wiki): * In the past, you had to build all of the libraries with way=t in order to use ticky-ticky, because it entailed a different closure layout. No longer. You still need to do make way=t in rts/ in order to build the ticky RTS, but you should now be able to mix ticky and non-ticky modules. * Some of the counters that worked in the past aren't implemented yet. I was originally just trying to get entry counts to work, so those should be correct. The list of counters was never documented in the first place, so I hope it's not too much of a disaster that some don't appear anymore. Someday, someone (perhaps me) should document all the counters and what they do. For now, all of the counters are either accurate (or at least as accurate as they always were), zero, or missing from the ticky profiling report altogether. This hasn't been particularly well-tested, but these changes shouldn't affect anything except when compiling with -fticky-ticky (famous last words...) Implementation details: I got rid of StgTicky.h, which in the past had the macros and declarations for all of the ticky counters. Now, those macros are defined in Cmm.h. StgTicky.h was still there for inclusion in C code. Now, any remaining C code simply cannot call the ticky macros -- or rather, they do call those macros, but from the perspective of C code, they're defined as no-ops. (This shouldn't be too big a problem.) I added a new file TickyCounter.h that has all the declarations for ticky counters, as well as dummy macros for use in C code. Someday, these declarations should really be automatically generated, since they need to be kept consistent with the macros defined in Cmm.h. Other changes include getting rid of the header that was getting added to closures before, and getting rid of various code having to do with eager blackholing and permanent indirections (the changes under compiler/ and rts/Updates.*).
* One more PAPI measurement, dropped precise cycle counting and replaced it ↵Alexey Rodriguez2006-12-211-0/+1
| | | | with instructions.
* Partial fix for #926Simon Marlow2007-02-011-0/+3
| | | | | | | | | | | | | | It seems that when a program exits with open DLLs on Windows, the system attempts to shut down the DLLs, but it also terminates (some of?) the running threads. The RTS isn't prepared for threads to die unexpectedly, so it sits around waiting for its workers to finish. This bites in two places: ShutdownIOManager() in the the unthreaded RTS, and shutdownCapability() in the threaded RTS. So far I've modified the latter to notice when worker threads have died unexpectedly and continue shutting down. It seems a bit trickier to fix the unthreaded RTS, so for now the workaround for #926 is to use the threaded RTS.
* Save the Win32 error code where necessarySimon Marlow2007-01-261-0/+3
| | | | | | | | Similarly to the way we save errno across context switches and suspendThread/resumeThread, we must save and restore the Win32 error code via GetLastError()/SetLastError(). Fixes #896.
* Adding command channel for the hpc debugger to the hpc part of the RTSandy@galois.com2007-01-091-2/+2
|
* Allow a word-sized argument for STKCHECKIan Lynagh2006-12-211-0/+4
|
* Retrieving the datacon of an arbitrary closurePepe Iborra2006-12-101-0/+3
| | | | | | | | | | | This patch extends the RTS linker and the dynamic linker so that it is possible to find out the datacon of a closure in heap at runtime: - The RTS linker now carries a hashtable 'Address->Symbol' for data constructors - The Persistent Linker State in the dynamic linker is extended in a similar way. Finally, these two sources of information are consulted by: > Linker.recoverDataCon :: a -> TcM Name
* Two new prim ops to access the Info Table and Payload of a closure:Pepe Iborra2006-12-091-0/+3
| | | | | | | | - infoPtr# :: a -> Addr# - closurePayload# :: a -> (# Array b, ByteArr# #) These prim ops provide the magic behind the ':print' command
* Updating rix output to new standard.andy@galois.com2006-12-141-1/+1
|
* Rework the block allocatorSimon Marlow2006-12-141-0/+44
| | | | | | | | The main goal here is to reduce fragmentation, which turns out to be the case of #743. While I was here I found some opportunities to improve performance too. The code is rather more complex, but it also contains a long comment describing the strategy, so please take a look at that for the details.
* Misc Hpc improvement to dynamic tracer outputandy@galois.com2006-12-132-4/+6
| | | | | | | - Added HPCRIX support for passing tracer filename. - Added thread tracing support. - Cleaned up use of HsFFI.h
* Adding tracing supportandy@galois.com2006-12-091-1/+3
|
* Add support for the IO manager thread on WindowsSimon Marlow2006-12-011-1/+10
| | | | | | | | | | | | | | | | | | | Fixes #637. The implications of this change are: - threadDelay on Windows no longer creates a new OS thread each time, instead it communicates with the IO manager thread in the same way as on Unix. - deadlock detection now works the same way on Windows as on Unix; that is the timer interrupt wakes up the IO manager thread, which causes the scheduler to check for deadlock. - Console events now get sent to the IO manager thread, in the same way as signals do on Unix. This means that console events should behave more reliably with -threaded on Windows. All this applies only with -threaded. Without -threaded, the old ConsoleEvent code is still used. After some testing, this could be pushed to the 6.6 branch.
* cas(): modify assembly syntax to make it work everywhere (hopefully)Simon Marlow2006-11-211-1/+1
|
* use "lock cmpxchg" instead of "lock/cmpxchg"Simon Marlow2006-11-171-1/+1
| | | | | I'm not sure where the latter version came from, but it apparently doesn't generate a legal instruction on Solaris.
* Selection of PAPI events via RTS command linemrchebas@gmail.com2006-11-091-0/+15
|
* move newSpark() prototype to RtsExternal.h to avoid warningsSimon Marlow2006-11-071-0/+1
|
* rts_ccs_lengthRavi Nanavati2006-09-291-0/+2
| | | | | | | | Add the -L RTS flag to control the length of the cost-centre stacks reported in a heap profile. Please include this change in the 6.6 branch as well as HEAD
* Make StablePtr and friends visible, this seems to be necessary for 64bit ↵sven.panne@aedion.de2006-11-101-0/+4
| | | | architectures
* rename spin lock functions, and use macros for non-THREADED_RTSSimon Marlow2006-10-261-9/+7
|
* markRootPtrTable: write out type in full instead of using evac_fn typedefSimon Marlow2006-10-261-2/+1
| | | | Fixes stage 2 build with -fvia-C
* Haskell Program Coverageandy@galois.com2006-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | This large checkin is the new ghc version of Haskell Program Coverage, an expression-level coverage tool for Haskell. Parts: - Hpc.[ch] - small runtime support for Hpc; reading/writing *.tix files. - Coverage.lhs - Annotates the HsSyn with coverage tickboxes. - New Note's in Core, - TickBox -- ticked on entry to sub-expression - BinaryTickBox -- ticked on exit to sub-expression, depending -- on the boolean result. - New Stg level TickBox (no BinaryTickBoxes, though) You can run the coverage tool with -fhpc at compile time. Main must be compiled with -fhpc.
* Split GC.c, and move storage manager into sm/ directorySimon Marlow2006-10-245-11/+16
| | | | | | | | | | | | | | | | | In preparation for parallel GC, split up the monolithic GC.c file into smaller parts. Also in this patch (and difficult to separate, unfortunatley): - Don't include Stable.h in Rts.h, instead just include it where necessary. - consistently use STATIC_INLINE in source files, and INLINE_HEADER in header files. STATIC_INLINE is now turned off when DEBUG is on, to make debugging easier. - The GC no longer takes the get_roots function as an argument. We weren't making use of this generalisation.