summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* add pure spin locksSimon Marlow2006-10-191-5/+134
|
* comments only: document allocateLocal()Simon Marlow2006-10-191-2/+6
|
* rename allocated_bytes() to allocatedBytes()Simon Marlow2006-10-191-2/+2
|
* remove performGCWithRoots()Simon Marlow2006-10-191-1/+0
| | | | | | | I don't think this can ever be useful, because to add more roots you need to do it consistently for every GC. The right way to add roots is to use newStablePtr.
* Rejig TABLES_NEXT_TO_CODE: the -unreg flag was broken by earlier changesSimon Marlow2006-10-171-7/+3
| | | | | | | | A GHC binary can generally build either registerised or unregisterised code, unless it is unregisterised only. The previous changes broke this, but I think I've now restored it.
* Partially fix GHCi when unregisterisedIan Lynagh2006-10-122-12/+11
| | | | | | | | We were constructing info tables designed for TABLES_NEXT_TO_CODE, but were building without TABLES_NEXT_TO_CODE. This patch also fixes a bug when we are unregisterised on amd64 and have code with an address above 2^32.
* STM invariantstharris@microsoft.com2006-10-077-43/+99
|
* Fix mulIntMayOflo on 64-bit arches; fixes trac #867Ian Lynagh2006-09-281-1/+3
| | | | | We were assuming we could multiply 2 32-bit numbers without overflowing a 64-bit number, but we can't as the top bit is the sign bit.
* 8 byte align data. Fixes SIBGUSs on HPPA/Linux.Ian Lynagh2006-09-091-2/+2
|
* Remove CONSTR_CHARLIKE and CONSTR_INTLIKE closure typesSimon Marlow2006-09-071-67/+65
| | | | | | | | These closure types aren't used/needed, as far as I can tell. The commoning up of Chars/Ints happens by comparing info pointers, and the info table for a dynamic C#/I# is CONSTR_0_1. The RTS seemed a little confused about whether CONSTR_CHARLIKE/CONSTR_INTLIKE were supposed to be static or dynamic closures, too.
* new RTS flag: -V to modify the resolution of the RTS timerIan Lynagh2006-09-053-3/+8
| | | | | | | | | Fixed version of an old patch by Simon Marlow. His description read: Also, now an arbitrarily short context switch interval may now be specified, as we increase the RTS ticker's resolution to match the requested context switch interval. This also applies to +RTS -i (heap profiling) and +RTS -I (the idle GC timer). +RTS -V is actually only required for increasing the resolution of the profile timer.
* add sysErrorBelch() for reporting system call errorsSimon Marlow2006-08-301-0/+15
|
* MAYBE_GC: initialise HpAllocSimon Marlow2006-08-301-0/+1
| | | | | | | | | HpAlloc was not being set when returning to the scheduler via MAYBE_GC(), which at the least was just wrong (the scheduler might allocate a large block more than once), and at worst could lead to crashes if HpAlloc contains garbage. Fixes at least one threaded2 test on Windows.
* Reserve a register for REG_Base on the SparcRoman Leshchinskiy2006-08-251-0/+2
|
* Add atomic SMP primitives for the SparcRoman Leshchinskiy2006-08-251-0/+18
|
* Mips registerised supportSimon Marlow2006-08-252-16/+37
| | | | Contributed by: Thiemo Seufer <ths@networkno.de>
* Fix unregisterised builds, and building on non-x86/amd64/powerpcIan Lynagh2006-08-253-10/+18
|
* Add closeMutex and use it on clean upEsa Ilari Vuokko2006-08-231-0/+1
|
* Add shared Typeable supportEsa Ilari Vuokko2006-08-231-0/+19
|
* fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com>Simon Marlow2006-08-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | From David's email: The problem is that the inline assembler code was placing the result of an operation in a register that is used as input later in the code. At the bottom of this message I've extracted a short short code fragment that you can run through gcc (on a powerpc machine) to see the generated assembly output. The changes to fix the problem are fairly simple. The first adds an ampersand to the output list of the assembly fragment ("=r" (result) --> "=&r" (result)) The ampersand just tells gcc that result can not be placed in a register used for any of the input parameters (o, n, or p). Otherwise, it feels free to place output parameters in the same registers used by the inputs -- but because of the flow of control here we need everything in a distinct register. This change fixes the TVar program above. The second change adds a clobber list (the :"cc", "memory"). This tells gcc that the condition code (due to the compare) and memory (due to the store) might be changed during the asm execution. The lack of a clobber list did not seem to be causing any trouble, but without it gcc is free to assume that no state is changed during the execution.
* remove out of date commentSimon Marlow2006-08-101-10/+0
|
* make exit() overridable, for use in DLLsSimon Marlow2006-08-091-0/+2
| | | | See #753
* Remember to free() memory on exitSimon Marlow2006-08-081-0/+3
| | | | | Patch mostly from Lennart Augustsson in #803, with additions to Task.c by me.
* change wired-in Haskell symbols to include the package nameSimon Marlow2006-07-261-4/+4
|
* Replace inline C functions with C-- macros in .cmm codeSimon Marlow2006-06-294-8/+29
| | | | So that we can build the RTS with the NCG.
* remove conditionals from definition of StgRegTableSimon Marlow2006-06-291-2/+0
| | | | | so that we can calculate deterministic offsets to some of the fields of Capability.
* use the new "prim %write_barrier()" in .cmm instead of calls to wb()Simon Marlow2006-06-291-3/+3
|
* fix sloppy conditionalsSimon Marlow2006-06-201-1/+1
|
* fix up slop-overwriting for THUNK_SELECTORS in DEBUG modeSimon Marlow2006-06-271-0/+2
|
* add decl for stg_block_throwto_retSimon Marlow2006-06-201-0/+1
|
* Asynchronous exception support for SMPSimon Marlow2006-06-165-22/+59
| | | | | | | | | | | | | | | | | This patch makes throwTo work with -threaded, and also refactors large parts of the concurrency support in the RTS to clean things up. We have some new files: RaiseAsync.{c,h} asynchronous exception support Threads.{c,h} general threading-related utils Some of the contents of these new files used to be in Schedule.c, which is smaller and cleaner as a result of the split. Asynchronous exception support in the presence of multiple running Haskell threads is rather tricky. In fact, to my annoyance there are still one or two bugs to track down, but the majority of the tests run now.
* make rmp_tmp_w an StgWord instead of StgIntSimon Marlow2006-06-161-1/+1
|
* fix warningsSimon Marlow2006-06-081-0/+11
|