summaryrefslogtreecommitdiff
path: root/rts
Commit message (Collapse)AuthorAgeFilesLines
* Ensure gc_type is StgWord8.Austin Seipp2013-06-211-1/+1
| | | | | | | Again, the range of gc_type is actually 1-3, which is technically outside the range of rtsBool. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Ensure gc_thread->wakeup is of type StgWord8.Austin Seipp2013-06-211-1/+1
| | | | | | | | | | rtsBool is defined to only have two inhabitants, which are true (1) and false (0) But the wakeup flag is set to 4 possible values, outside the range of rtsBool. This leads Clang to warn about tautological comparisons. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Don't use -finline-limit with Clang.Austin Seipp2013-06-211-0/+2
| | | | | | It's unsupported. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Initialize ptr to NULL to silence Clang warning.Austin Seipp2013-06-201-1/+1
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix rts/package.conf.in ld-options for Clang.Austin Seipp2013-06-201-78/+78
| | | | | | | | | Now with less Mac-breakage. With this change, I can get a working stage1/stage2 compiler using Clang 3.4svn, which can be used to link working executables! Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Re-untabify rts/packages.conf.inAustin Seipp2013-06-191-25/+25
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Revert "Fix rts/packages.conf.in ld-options for clang."Austin Seipp2013-06-191-78/+78
| | | | | | This reverts commit 991f285e681e8541632502d05d8a46de2d44b7bd. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Revert "Untabify rts/packages.conf.in"Austin Seipp2013-06-191-25/+25
| | | | | | This reverts commit ebf97ad146173afd9e094f4975aa33717ed3a11e. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Revert "Actually fix rts/packages.conf.in ld-options."Austin Seipp2013-06-191-78/+78
| | | | | | This reverts commit 5dc74f385f1bbc9248ed950af255b946677c2ff9. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix typo in header guard.Austin Seipp2013-06-191-1/+1
| | | | | | Spotted by Clang. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Actually fix rts/packages.conf.in ld-options.Austin Seipp2013-06-181-78/+78
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Untabify rts/packages.conf.inAustin Seipp2013-06-181-25/+25
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix rts/packages.conf.in ld-options for clang.Austin Seipp2013-06-181-78/+78
| | | | | | | | Technically, '-u' is an ld option, not a compiler option, and clang considers this argument unused. Hence, we must explicitly forward this to the linker. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Optimise lockClosure when n_capabilities == 1; fixes #693Ian Lynagh2013-06-151-4/+24
| | | | Based on a patch from Yuras Shumovich.
* Whitespace and braces onlyIan Lynagh2013-06-151-4/+5
|
* Add braces for clarityIan Lynagh2013-06-151-1/+2
|
* Maintain per-generation lists of weak pointers (#7847)Takano Akio2013-06-159-109/+157
|
* Check for a weak pointer being dead before we do any allocation for itIan Lynagh2013-06-151-8/+8
|
* Allow multiple C finalizers to be attached to a Weak#Takano Akio2013-06-157-88/+84
| | | | | | | | | | | | | 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.
* Optimization for takeMVar/putMVar when MVar left empty; fixes #7923Ian Lynagh2013-06-151-20/+29
| | | | | | | | We only need to apply the write barrier to an MVar when it acquires a reference to live data; when the MVar is left empty in the case of a takeMVar/putMVar, we can save a memory reference. Patch from Edward Z. Yang.
* Cleaning fixes, and other build system tweaks; part of #7941Ian Lynagh2013-06-141-6/+6
|
* Fix a commentIan Lynagh2013-06-091-3/+1
|
* Whitespace onlyIan Lynagh2013-06-091-124/+124
|
* use libffi for iOS adjustors; fixes #7718Ian Lynagh2013-06-081-4/+54
| | | | Based on a patch from Stephen Blackheath.
* Implement cardinality analysisSimon Peyton Jones2013-06-062-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 crash with large objects (#7919)Simon Marlow2013-05-241-14/+44
| | | | See comments for details.
* Fix a problem caused by very large objects (#7919)Simon Marlow2013-05-211-5/+12
| | | | | | As far as I can tell the bug should be harmless, apart from the failing assertion. Since the ticket reported crashes, there might be problems elsewhere that aren't triggered by this test case.
* Expose __word_encode{Float,Double}; fixes integer-simple buildIan Lynagh2013-05-191-3/+1
|
* Remove unused __2Int_encodeDoubleIan Lynagh2013-05-193-25/+0
|
* Move the genSym stuff from rts into compilerIan Lynagh2013-05-172-21/+0
| | | | | It's no longer used by Data.Unique, so there's no need to have it in rts any more.
* Kill dead code.Austin Seipp2013-05-125-993/+114
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Make sure the RTS is built, even when no programs are being built with stage1Ian Lynagh2013-05-101-1/+1
| | | | Part of #7841
* rts_checkSchedStatus: exit the thread, not the process, when InterruptedSimon Marlow2013-05-101-1/+10
| | | | | | | | | This means that when the process is shutting down, if we have calls to foreign exports in progress, they get forcibly terminated as before, but now they only shut down the calling thread rather than the whole process (with -threaded). This came up in a discussion started by Akio Takano on ghc-users.
* Generate dependencies for .cmm files properlyIan Lynagh2013-05-091-3/+6
|
* Fix the name of libffiIan Lynagh2013-05-091-12/+13
| | | | | On Windows, we need to keep the DLL called libffi-6.dll (rather than libffi.dll) or Windows can't find it.
* Fix build on OS XIan Lynagh2013-04-301-2/+4
| | | | sed on OS X doesn't handle \+
* Fix buildIan Lynagh2013-04-281-2/+2
|
* Add -L flags to libs.depend (fixes #7465)Ian Lynagh2013-04-281-1/+3
| | | | Based on a patch from Peter Trommler
* Tidy up some build system codeIan Lynagh2013-04-281-2/+2
|
* Record libffi directory in rts package conf; trac #7465Ian Lynagh2013-04-281-2/+2
| | | | Patch from Peter Trommler
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2013-04-281-0/+3
|\
| * Fix linking with binutils 2.22 or later on FreeBSD 9.1, where one shouldGabor Pali2013-04-271-0/+3
| | | | | | | | explicitly link against any dependent library
* | Fix build on WindowsIan Lynagh2013-04-281-0/+4
|/
* Fix mismatched visibility of assembler impls of StgRunIan Lynagh2013-04-271-8/+25
| | | | | | | | | Based on a patch from PHO, in trac #7813. We were previously declaring StgRun as a private symbol (in rts/StgRun.h), but were actually defining it as a public one (in rts/StgCRun.c). This caused a linkage problem with old binutils. See: http://www.haskell.org/pipermail/ghc-devs/2013-April/000932.html
* Handle sign bit when generating veneer for ARM Thumb branch relocationColin Watson2013-04-271-0/+1
|
* When linking with $ORIGIN rpaths, use the "-z origin" linker flag tooIan Lynagh2013-04-271-1/+1
| | | | | On FreeBSD, one needs use "-z origin" in order to enable resolution of $ORIGIN in RPATH. Part of #7819.
* More accurate cost attribution for stacks. Fixes #7818.Edward Z. Yang2013-04-221-2/+2
| | | | | | | | Previously, stacks were always attributed to CCCS_SYSTEM. Now, we attribute them to the CCS when the stack was allocated. If a stack grows, new stack chunks inherit the CCS of the old stack. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Add stg_sel_n_noupd_info symbols to Linker.cSimon Peyton Jones2013-04-221-6/+22
|
* Update error message text; spotted bu Sergei TrofimovichIan Lynagh2013-04-211-1/+1
|
* Use a pthread-based implementation of Itimer.c on iOSIan Lynagh2013-04-211-5/+50
| | | | | | | | Patch from Stephen Blackheath. timer_create doesn't exist and setitimer doesn't fire on iOS, so we're using a pthreads-based implementation. It may be to do with interference with the signals of the debugger. Revisit. See #7723.