summaryrefslogtreecommitdiff
path: root/rts/Linker.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Add darwin to the list of OSes for which we use mmapIan Lynagh2010-05-291-1/+1
| | | | Patch from Barney Stratford
* Simplify the CPP logic in rts/Linker.cIan Lynagh2010-05-291-3/+1
|
* Fix validate on OS XIan Lynagh2010-05-291-0/+4
|
* OS X x86_64 fix from Barney StratfordIan Lynagh2010-05-291-0/+3
|
* Fix build on FreeBSD; patch from Gabor PALIIan Lynagh2010-05-191-3/+4
|
* Fix some cpp warnings when building on FreeBSD; patch from Gabor PALIIan Lynagh2010-04-281-0/+8
|
* New implementation of BLACKHOLEsSimon Marlow2010-03-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the global blackhole_queue with a clever scheme that enables us to queue up blocked threads on the closure that they are blocked on, while still avoiding atomic instructions in the common case. Advantages: - gets rid of a locked global data structure and some tricky GC code (replacing it with some per-thread data structures and different tricky GC code :) - wakeups are more prompt: parallel/concurrent performance should benefit. I haven't seen anything dramatic in the parallel benchmarks so far, but a couple of threading benchmarks do improve a bit. - waking up a thread blocked on a blackhole is now O(1) (e.g. if it is the target of throwTo). - less sharing and better separation of Capabilities: communication is done with messages, the data structures are strictly owned by a Capability and cannot be modified except by sending messages. - this change will utlimately enable us to do more intelligent scheduling when threads block on each other. This is what started off the whole thing, but it isn't done yet (#3838). I'll be documenting all this on the wiki in due course.
* Keep gcc 4.5 happySimon Marlow2010-03-301-37/+42
|
* Fix warning compiling Linker.c for PPC Macnaur@post11.tele.dk2010-04-031-1/+2
| | | | | | The warning message eliminated is: > rts/Linker.c:4756:0: > warning: nested extern declaration of 'symbolsWithoutUnderscore'
* fix build on WindowsSimon Marlow2010-01-221-1/+1
|
* fix warning on WindowsSimon Marlow2010-01-221-0/+2
|
* Include regex.h in Linker.c on OS X tooIan Lynagh2010-01-201-0/+1
|
* We no longer need a prototype for __eprintfIan Lynagh2010-01-201-2/+1
| | | | | It looks like it was only needed on OSX, but it has a prototype in assert.h which now gets #included.
* Fix buildIan Lynagh2010-01-201-1/+0
| | | | Remove a prototype of a function that wasn't defined
* FIX #2615 (linker scripts in .so files)howard_b_golden@yahoo.com2009-12-161-15/+134
| | | | | | | | This patch does not apply to Windows. It only applies to systems with ELF binaries. This is a patch to rts/Linker.c to recognize linker scripts in .so files and find the real target .so shared library for loading.
* export g0Simon Marlow2009-12-031-0/+1
|
* Refactoring onlySimon Marlow2009-12-021-0/+1
|
* Make allocatePinned use local storage, and other refactoringsSimon Marlow2009-12-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a batch of refactoring to remove some of the GC's global state, as we move towards CPU-local GC. - allocateLocal() now allocates large objects into the local nursery, rather than taking a global lock and allocating then in gen 0 step 0. - allocatePinned() was still allocating from global storage and taking a lock each time, now it uses local storage. (mallocForeignPtrBytes should be faster with -threaded). - We had a gen 0 step 0, distinct from the nurseries, which are stored in a separate nurseries[] array. This is slightly strange. I removed the g0s0 global that pointed to gen 0 step 0, and removed all uses of it. I think now we don't use gen 0 step 0 at all, except possibly when there is only one generation. Possibly more tidying up is needed here. - I removed the global allocate() function, and renamed allocateLocal() to allocate(). - the alloc_blocks global is gone. MAYBE_GC() and doYouWantToGC() now check the local nursery only.
* Windows DLLs: CHARLIKE_closure and INTLIKE_closure aren't defined in this way.Ben.Lippmeier@anu.edu.au2009-11-141-3/+17
|
* Second attempt to fix #1185 (forkProcess and -threaded)Simon Marlow2009-11-111-1/+8
| | | | | | | | | | | | Patch 1/2: second part of the patch is to libraries/base This time without dynamic linker hacks, instead I've expanded the existing rts/Globals.c to cache more CAFs, specifically those in GHC.Conc. We were already using this trick for signal handlers, I should have realised before. It's still quite unsavoury, but we can do away with rts/Globals.c in the future when we switch to a dynamically-linked GHCi.
* Support for DragonFly BSDSimon Marlow2009-11-111-4/+4
| | | | | | Patches from Goetz Isenmann <info@goetz-isenmann.de>, slightly updated for HEAD (the method for configuring platforms in configure.ac has changed).
* Barf on unhandled Mach-O relocations in the ghci linkerManuel M T Chakravarty2009-11-111-8/+48
| | | | | - It might be worthwhile to MERGE this to 6.12, BUT somebody should validate it on PPC/Mac OS X first.
* Rollback #1185 fixSimon Marlow2009-11-061-47/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I can tell, the hack I was using in rts/Linker.c won't work on OS X. Back to the drawing board. rolling back: Tue Nov 3 16:05:47 GMT 2009 Simon Marlow <marlowsd@gmail.com> * Fix #1185 (RTS part, also needs corresponding change to libraries/base) GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if one does not exist or has died/exited. Unfortunately this exposed a problem caused by the fact that we have two base packages, and hence two IO managers, in GHCi: see NOTE [io-manager-ghci] in rts/Linker.c. The workaround can go away if/when we switch to a dynamically linked GHCi. M ./rts/Linker.c -6 +47 M ./rts/Schedule.c +4 M ./rts/package.conf.in +16 M ./rts/posix/Signals.c -1 +7 M ./rts/posix/Signals.h +2 Wed Nov 4 10:11:03 GMT 2009 Simon Marlow <marlowsd@gmail.com> * hopefully fix validate breakage on OS X and Windows M ./rts/Linker.c -1 +1 Wed Nov 4 16:27:40 GMT 2009 Simon Marlow <marlowsd@gmail.com> * fix build failure on Windows M ./rts/Linker.c -1 +1
* fix build failure on WindowsSimon Marlow2009-11-041-1/+1
|
* hopefully fix validate breakage on OS X and WindowsSimon Marlow2009-11-041-1/+1
|
* Fix #1185 (RTS part, also needs corresponding change to libraries/base)Simon Marlow2009-11-031-6/+47
| | | | | | | | | | | GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if one does not exist or has died/exited. Unfortunately this exposed a problem caused by the fact that we have two base packages, and hence two IO managers, in GHCi: see NOTE [io-manager-ghci] in rts/Linker.c. The workaround can go away if/when we switch to a dynamically linked GHCi.
* Fix a dynamic linker bug that killed ghci on Snow LeopardManuel M T Chakravarty2009-10-291-2/+4
|
* Make ghci work with libraries compiled with -tickysimonpj@microsoft.com2009-10-081-0/+114
| | | | | | | This is a follow up to the patch tha fixes Trac #3439. We had forgotten the dynamic linker, which needs to know all these ticky symbols too.
* Add a way to generate tracing events programmaticallySimon Marlow2009-09-251-0/+1
| | | | | | | | | | | | | | added: primop TraceEventOp "traceEvent#" GenPrimOp Addr# -> State# s -> State# s { Emits an event via the RTS tracing framework. The contents of the event is the zero-terminated byte string passed as the first argument. The event will be emitted either to the .eventlog file, or to stderr, depending on the runtime RTS flags. } and added the required RTS functionality to support it. Also a bit of refactoring in the RTS tracing code.
* Add erf, erfc, erfff, erfcf (#3536)Simon Marlow2009-09-231-0/+4
|
* Fix incorrectly hidden RTS symbolsSimon Marlow2009-08-291-2/+2
|
* Remove bitrotted IA64 code in Linker.cIan Lynagh2009-08-231-205/+0
| | | | It breaks the unregisterised build on IA64.
* Rename primops from foozh_fast to stg_foozhSimon Marlow2009-08-031-58/+58
| | | | For consistency with other RTS exported symbols
* Windows build fixSimon Marlow2009-08-031-2/+2
|
* x86_64 warning fixesSimon Marlow2009-08-031-2/+2
|
* RTS tidyup sweep, first phaseSimon Marlow2009-08-021-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* Add a configure test for whether or not __mingw_vfprintf existsIan Lynagh2009-06-271-1/+7
|
* Add a couple more symbols to the Linker.c tableIan Lynagh2009-06-221-0/+2
| | | | Fixes ghci loading gmp on Windows
* Remove the implementation of gmp primops from the rtsDuncan Coutts2009-06-131-49/+0
|
* Exports a few rts things we need for cmm code in external packagesDuncan Coutts2009-06-131-0/+4
| | | | | In particular we need alloc_blocks and alloc_blocks_lim for MAYBE_GC. The gmp cmm primops also use stg_ARR_WORDS_info.
* Add and export rts_unsafeGetMyCapability from rtsDuncan Coutts2009-06-121-0/+1
| | | | | | | | | | | | | | | We need this, or something equivalent, to be able to implement stgAllocForGMP outside of the rts. That's because we want to use allocateLocal which allocates from the given capability without having to take any locks. In the gmp primops we're basically in an unsafe foreign call, that is a context where we hold a current capability. So it's safe for us to use allocateLocal. We just need a way to get the current capability. The method to get the current capability varies depends on whether we're using the threaded rts or not. When stgAllocForGMP is built inside the rts that's ok because we can do it conditionally on THREADED_RTS. Outside the rts we need a single api we can call without knowing if we're talking to a threaded rts or not, hence this addition.
* Remove __encodeDouble and __encodeFloat from the rtsDuncan Coutts2009-06-111-2/+0
| | | | They now live in the integer-gmp package.
* Remove the unused remains of __decodeFloatIan Lynagh2009-06-021-1/+0
|
* Remove old GUM/GranSim codeSimon Marlow2009-06-021-5/+0
|
* Fix handling of R_SPARC_UA32 relocations in linkerBen.Lippmeier@anu.edu.au2009-05-281-3/+12
| | | | | | These refer to unaligned locations that need to be written byte-at-a-time. This fixes the SPARC ghci failures in the current head.
* export sysErrorBelchSimon Marlow2009-03-281-0/+1
|
* Windows: load msvcrt and kernel32 manuallySimon Marlow2009-05-201-0/+10
|
* OS X / amd64 fixesIan Lynagh2009-05-201-2/+4
|
* add getOrSetSignalHandlerStore, much like getOrSetTypeableStoreSimon Marlow2009-04-231-1/+2
| | | | Part of the fix for #3171
* FIX #1779 and qq005: export hs_hpc_moduleSimon Marlow2009-03-301-0/+1
|