summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Fix build on OS XIan Lynagh2013-06-221-0/+4
|
* Fix #8009 : Failure to compile on powerpc64-linux.Erik de Castro Lopo2013-06-221-0/+4
| | | | Add definitions for stg_C_FINALIZER_LIST and n_capabilities.
* Add some missing clang bits to the build system.Austin Seipp2013-06-171-0/+5
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Optimise lockClosure when n_capabilities == 1; fixes #693Ian Lynagh2013-06-152-7/+23
| | | | Based on a patch from Yuras Shumovich.
* Maintain per-generation lists of weak pointers (#7847)Takano Akio2013-06-152-1/+3
|
* Allow multiple C finalizers to be attached to a Weak#Takano Akio2013-06-152-5/+9
| | | | | | | | | | | | | The commit replaces mkWeakForeignEnv# with addCFinalizerToWeak#. This new primop mutates an existing Weak# object and adds a new C finalizer to it. This change removes an invariant in MarkWeak.c, namely that the relative order of Weak# objects in the list needs to be preserved across GC. This makes it easier to split the list into per-generation structures. The patch also removes a race condition between two threads calling finalizeWeak# on the same WEAK object at that same time.
* Whitespace only in rts/storage/SMPClosureOps.hIan Lynagh2013-06-141-7/+7
|
* use libffi for iOS adjustors; fixes #7718Ian Lynagh2013-06-081-2/+5
| | | | Based on a patch from Stephen Blackheath.
* Implement cardinality analysisSimon Peyton Jones2013-06-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This major patch implements the cardinality analysis described in our paper "Higher order cardinality analysis". It is joint work with Ilya Sergey and Dimitrios Vytiniotis. The basic is augment the absence-analysis part of the demand analyser so that it can tell when something is used never at most once some other way The "at most once" information is used a) to enable transformations, and in particular to identify one-shot lambdas b) to allow updates on thunks to be omitted. There are two new flags, mainly there so you can do performance comparisons: -fkill-absence stops GHC doing absence analysis at all -fkill-one-shot stops GHC spotting one-shot lambdas and single-entry thunks The big changes are: * The Demand type is substantially refactored. In particular the UseDmd is factored as follows data UseDmd = UCall Count UseDmd | UProd [MaybeUsed] | UHead | Used data MaybeUsed = Abs | Use Count UseDmd data Count = One | Many Notice that UCall recurses straight to UseDmd, whereas UProd goes via MaybeUsed. The "Count" embodies the "at most once" or "many" idea. * The demand analyser itself was refactored a lot * The previously ad-hoc stuff in the occurrence analyser for foldr and build goes away entirely. Before if we had build (\cn -> ...x... ) then the "\cn" was hackily made one-shot (by spotting 'build' as special. That's essential to allow x to be inlined. Now the occurrence analyser propagates info gotten from 'build's stricness signature (so build isn't special); and that strictness sig is in turn derived entirely automatically. Much nicer! * The ticky stuff is improved to count single-entry thunks separately. One shortcoming is that there is no DEBUG way to spot if an allegedly-single-entry thunk is acually entered more than once. It would not be hard to generate a bit of code to check for this, and it would be reassuring. But it's fiddly and I have not done it. Despite all this fuss, the performance numbers are rather under-whelming. See the paper for more discussion. nucleic2 -0.8% -10.9% 0.10 0.10 +0.0% sphere -0.7% -1.5% 0.08 0.08 +0.0% -------------------------------------------------------------------------------- Min -4.7% -10.9% -9.3% -9.3% -50.0% Max -0.4% +0.5% +2.2% +2.3% +7.4% Geometric Mean -0.8% -0.2% -1.3% -1.3% -1.8% I don't quite know how much credence to place in the runtime changes, but movement seems generally in the right direction.
* fix comment (#7907)Simon Marlow2013-05-211-1/+1
|
* Expose __word_encode{Float,Double}; fixes integer-simple buildIan Lynagh2013-05-191-0/+2
|
* Move the genSym stuff from rts into compilerIan Lynagh2013-05-171-5/+0
| | | | | It's no longer used by Data.Unique, so there's no need to have it in rts any more.
* Fix an all-target call in the build systemIan Lynagh2013-05-101-1/+1
|
* Small build system refactoringIan Lynagh2013-04-201-5/+5
|
* added ticky counters for heap and stack checksNicolas Frisby2013-04-112-0/+5
|
* ticky enhancementsNicolas Frisby2013-03-293-38/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * the new StgCmmArgRep module breaks a dependency cycle; I also untabified it, but made no real changes * updated the documentation in the wiki and change the user guide to point there * moved the allocation enters for ticky and CCS to after the heap check * I left LDV where it was, which was before the heap check at least once, since I have no idea what it is * standardized all (active?) ticky alloc totals to bytes * in order to avoid double counting StgCmmLayout.adjustHpBackwards no longer bumps ALLOC_HEAP_ctr * I resurrected the SLOW_CALL counters * the new module StgCmmArgRep breaks cyclic dependency between Layout and Ticky (which the SLOW_CALL counters cause) * renamed them SLOW_CALL_fast_<pattern> and VERY_SLOW_CALL * added ALLOC_RTS_ctr and _tot ticky counters * eg allocation by Storage.c:allocate or a BUILD_PAP in stg_ap_*_info * resurrected ticky counters for ALLOC_THK, ALLOC_PAP, and ALLOC_PRIM * added -ticky and -DTICKY_TICKY in ways.mk for debug ways * added a ticky counter for total LNE entries * new flags for ticky: -ticky-allocd -ticky-dyn-thunk -ticky-LNE * all off by default * -ticky-allocd: tracks allocation *of* closure in addition to allocation *by* that closure * -ticky-dyn-thunk tracks dynamic thunks as if they were functions * -ticky-LNE tracks LNEs as if they were functions * updated the ticky report format, including making the argument categories (more?) accurate again * the printed name for things in the report include the unique of their ticky parent as well as if they are not top-level
* Closures must be zeroed even without LDV-profiling. Partially fixes #7747Edward Z. Yang2013-03-071-4/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Update source pointer.Edward Z. Yang2013-03-021-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Only emit %write_barrier primitive for THREADED_RTSGabor Greif2013-02-262-3/+9
|
* declare stable_ptr_table (should fix via-C compilation)Simon Marlow2013-02-181-0/+1
|
* Separate StablePtr and StableName tables (#7674)Simon Marlow2013-02-143-8/+15
| | | | To improve performance of StablePtr.
* Simplify the allocation stats accountingSimon Marlow2013-02-141-1/+1
| | | | | | | | | | | We were doing it in two different ways and asserting that the results were the same. In most cases they were, but I found one case where they weren't: the GC itself allocates some memory for running finalizers, and this memory was accounted for one way but not the other. It was simpler to remove the old way of counting allocation that to try to fix it up, so I did that.
* Added RTS hooks for the timer manager.Andreas Voellmy2013-02-111-0/+2
|
* Fix a typoIan Lynagh2013-02-051-1/+1
|
* Add support for passing SSE vectors in registers.Geoffrey Mainland2013-02-014-12/+82
| | | | | | | This patch adds support for 6 XMM registers on x86-64 which overlap with the F and D registers and may hold 128-bit wide SIMD vectors. Because there is not a good way to attach type information to STG registers, we aggressively bitcast in the LLVM back-end.
* Always pass vector values on the stack.Geoffrey Mainland2013-02-013-20/+24
| | | | | Vector values are now always passed on the stack. This isn't particularly efficient, but it will have to do for now.
* MachRegs.h requires ghcautoconf.h to be included before it (#7591)Stephen Blackheath2013-02-011-0/+1
| | | | | | | Because, in the case of ARM processors, it needs to know what ARM variant is being used. This patch fixes that in includes/CodeGen.Platform.hs, otherwise there is a mismatch between the compiler and llvm.
* typosGabor Greif2013-01-301-1/+1
|
* include "stg/MachRegs.h" -> include "MachRegs.h"Simon Marlow2013-01-302-2/+2
| | | | | | We were getting the installed compiler's MachRegs.h sometimes (in GenApply.hs, as it turns out). This probably caused some weird effects...
* \#undef REG_R[1-10] as a precautionSimon Marlow2013-01-301-0/+15
|
* fix warningsSimon Marlow2013-01-301-1/+0
|
* STM: Only wake up onceBen Gamari2013-01-303-1/+6
| | | | | | | | | | | Previously, threads blocked on an STM retry would be sent a wakeup message each time an unpark was requested. This could result in the accumulation of a large number of wake-up messages, which would slow wake-up once the sleeping thread is finally scheduled. Here, we introduce a new closure type, STM_AWOKEN, which marks a TSO which has been sent a wake-up message, allowing us to send only one wakeup.
* Expose genericRaise; fixes signals004(dyn) no OS X 32Ian Lynagh2013-01-171-0/+3
|
* Expose the prototype for getMonotonicNSecIan Lynagh2013-01-172-0/+20
| | | | Fixes T3807 on OS X 32.
* typoGabor Greif2012-12-191-2/+2
|
* Make enabled_capabilities visible (fixes dynamic linking)Simon Marlow2012-12-131-0/+3
|
* Remove most of TailCalls.hSimon Marlow2012-12-132-189/+3
| | | | it was only needed for registerised compilation.
* Add a write barrier for TVAR closuresSimon Marlow2012-11-162-19/+21
| | | | | | | | | | This improves GC performance when there are a lot of TVars in the heap. For instance, a TChan with a lot of elements causes a massive GC drag without this patch. There's more to do - several other STM closure types don't have write barriers, so GC performance when there are a lot of threads blocked on STM isn't great. But fixing the problem for TVar is a good start.
* Don't include a (void *) cast in BLOCK_ROUND_UPIan Lynagh2012-11-131-1/+1
| | | | | | All uses of it cast the result anyway. However, DeriveConstants needs it to not include the cast, as (void *) casts can't be used in constant expressions.
* Add some more flags to includes_CC_OPTSIan Lynagh2012-11-121-0/+5
| | | | Fixes build on OS X
* Replace mkDerivedConstants.c with DeriveConstants.hsIan Lynagh2012-11-124-1317/+22
| | | | | | | | | DeriveConstants.hs works in a cross-compilation-friendly way. Rather than running a C program that prints out the constants, we just compile a C file which has the constants are encoded in symbol sizes. We then parse the output of 'nm' to find out what the constants are. Based on work by Gabor Greif <ggreif@gmail.com>.
* Give an error if we can't find a suitable value for PRIdPTRIan Lynagh2012-11-081-1/+3
|
* define own version of PRIdPTR on platform where its not availableKarel Gardas2012-11-081-0/+10
| | | | | | Note that PRIdPTR is considered as linux-ism so it's not available on platforms like Solaris, although some other free Unix(-like) OSes apparently supports it too.
* small optimisation: inline stmNewTVar()Simon Marlow2012-11-051-0/+3
|
* The shape of StgTVar should not depend on THREADED_RTSSimon Marlow2012-11-011-2/+0
| | | | | By shear luck I think this didn't lead to any actual runtime crashes, but it did cause some problems for debugging.
* Don't clearNurseries() in parallel with -debugSimon Marlow2012-11-011-0/+6
| | | | It makes sanity-checking fail.
* Fix C macro bug that was causing some stack checks to erroneously succeedSimon Marlow2012-10-311-8/+8
|
* Draw STG F and D registers from the same pool of available SSE registers on ↵Geoffrey Mainland2012-10-306-10/+284
| | | | | | | | | | | | x86-64. On x86-64 F and D registers are both drawn from SSE registers, so there is no reason not to draw them from the same pool of available SSE registers. This means that whereas previously a function could only receive two Double arguments in registers even if it did not have any Float arguments, now it can receive up to 6 arguments that are any mix of Float and Double in registers. This patch breaks the LLVM back end. The next patch will fix this breakage.
* Properly mark C-- calls to _assertFail as "never returns".Geoffrey Mainland2012-10-301-1/+1
|
* Fix build on platforms on which we don't have register infoIan Lynagh2012-10-272-1/+10
|