summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Windows: remove the {Enter,Leave}CricialSection wrappersSimon Marlow2007-08-291-4/+4
| | | | | | The C-- parser was missing the "stdcall" calling convention for foreign calls, but once added we can call {Enter,Leave}CricialSection directly.
* Use INSTALL_HEADERS in includes/ rather than abusing INSTALL_DATASIan Lynagh2007-08-281-7/+4
|
* Fix the IF_DEBUG(interpreter in StgCRun.cIan Lynagh2007-08-251-0/+4
|
* Fix the threaded RTS on WindowsIan Lynagh2007-08-161-2/+5
| | | | | When calling EnterCriticalSection and LeaveCriticalSection from C-- code, we go via wrappers which use ccall (rather than stdcall).
* Fix the build when GMP_INCLUDE_DIRS == ""Ian Lynagh2007-08-151-2/+5
|
* Fix build with external gmp library.gwright@antiope.com2007-08-132-0/+6
| | | | | | | | | | | | | | | | ghc fails to build if you use an external gmp library. This is because ghc requires the header file gmp.h, which used to be provided by the internal gmp source code. The file gmp.h is no longer part of the gmp source code, but is generated as part of the build procedure. If an external gmp is specified, the internal gmp is not build and the gmp.h file never gets generated. Of course, it was a bad idea anyway to use a header file from a potentially different version of the library. The patch sets HAVE_LIB_GMP if the gmp library is found during configuration and conditionalizes including the library header file on it.
* Build RTS as dynamic libraryClemens Fruhwirth2007-08-081-13/+13
|
* FIX recent PPC crashes introduced by the pointer-tagging patch (I hope)Simon Marlow2007-08-012-6/+1
| | | | | | | | There was an accidental endian-dependency in changes related to RET_FUN. The changes in question weren't strictly necessary - they were left over from the original workaround for the compacting GC problems, so I've just reverted those changes in this patch, which should hopefully fix the PPC problems.
* Pointer TaggingSimon Marlow2007-07-277-7/+99
| | | | | | | | | | | | | | | | | | | | | | This patch implements pointer tagging as per our ICFP'07 paper "Faster laziness using dynamic pointer tagging". It improves performance by 10-15% for most workloads, including GHC itself. The original patches were by Alexey Rodriguez Yakushev <mrchebas@gmail.com>, with additions and improvements by me. I've re-recorded the development as a single patch. The basic idea is this: we use the low 2 bits of a pointer to a heap object (3 bits on a 64-bit architecture) to encode some information about the object pointed to. For a constructor, we encode the "tag" of the constructor (e.g. True vs. False), for a function closure its arity. This enables some decisions to be made without dereferencing the pointer, which speeds up some common operations. In particular it enables us to avoid costly indirect jumps in many cases. More information in the commentary: http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
* remove unused TICK_FREQUENCYSimon Marlow2007-07-181-6/+0
|
* Implement the RTS side of GHC.Environment.getFullArgsIan Lynagh2007-07-171-0/+2
|
* FIX BUILD (OS X): Include correct gmp.h if using GMP.frameworkRoman Leshchinskiy2007-07-062-0/+8
| | | | | | On OS X, we have to #include <GMP/gmp.h> if we are using GMP.framework. Before the recent GMP changes, gcc (incorrectly) used the gmp.h supplied by ghc but that is gone now.
* Update the in-tree GMP; fixes trac #832Ian Lynagh2007-07-051-8/+2
| | | | | gmp is now in a top-level directory and we only have the tarball in the darcs repo. It gets untarred if it is needed.
* Implemented and fixed bugs in CmmInfo handlingMichael D. Adams2007-06-271-1/+1
|
* +RTS -xbXXXXX sets the "heap base" to 0xXXXXXXSimon Marlow2007-06-271-0/+2
| | | | | | | | | | When debugging the GC and storage manager we often want repeated runs of the program to allocate memory at the same addresses, so that we can set watch points. Unfortunately the OS doesn't always give us memory at predictable addresses. This flag gives the OS a hint as to where we would like our memory allocated. Previously I did this by changing the HEAP_BASE setting in MBlock.h and recompiling, this patch just adds a flag so I don't have to recompile.
* FIX BUILD (on Windows): follow changes to make threaded RTS compile with -fasmsimonmar@microsoft.com2007-06-271-0/+11
|
* Cleaning up Hpc.c; adding support for reflection into Hpc.andy@galois.com2007-06-271-5/+12
|
* Make the threaded RTS compilable using -fasmSimon Marlow2007-06-263-1/+35
| | | | | We needed to turn some inline C functions and C macros into either real C functions or C-- macros.
* Use %d rather than %zd on WindowsIan Lynagh2007-06-161-2/+8
|
* Fix size mismatch errors in mkDerivedConstants.cIan Lynagh2007-06-151-3/+3
|
* FIX #1418 (partially)Simon Marlow2007-06-131-31/+52
| | | | | | | | | | | | | When the con_desc field of an info table was made into a relative reference, this had the side effect of making the profiling fields (closure_desc and closure_type) also relative, but only when compiling via C, and the heap profiler was still treating them as absolute, leading to crashes when profiling with -hd or -hy. This patch fixes up the story to be consistent: these fields really should be relative (otherwise we couldn't make shared versions of the profiling libraries), so I've made them relative and fixed up the RTS to know about this.
* 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.