summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* propagate the result of atomically properly (fixes #3049)Simon Marlow2009-06-242-0/+2
|
* remove unused cruftSimon Marlow2009-06-031-1/+0
|
* Stop building the rts against gmpDuncan Coutts2009-06-133-19/+0
| | | | Nothing from gmp is used in the rts anymore.
* Remove the implementation of gmp primops from the rtsDuncan Coutts2009-06-132-7/+0
|
* Add and export rts_unsafeGetMyCapability from rtsDuncan Coutts2009-06-121-0/+9
| | | | | | | | | | | | | | | 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 the various mp registers from the StgRegTableDuncan Coutts2009-06-102-20/+0
| | | | No longer need them as temp vars in the cmm primop implementations.
* Define _BSD_SOURCE in Stg.hIan Lynagh2009-06-091-0/+4
| | | | | This means that, on Linux, we get functions like gamma defined when we #include math.h
* Lock the StablePtr table during GCSimon Marlow2009-06-041-0/+3
| | | | Allows hs_free_fun_ptr() to be called by a separate thread
* fix $(TOP)Simon Marlow2009-06-041-1/+1
|
* remove a prototype that shouldn't be hereSimon Marlow2009-06-041-2/+0
|
* Remove the unused remains of __decodeFloatIan Lynagh2009-06-022-2/+0
|
* Remove old GUM/GranSim codeSimon Marlow2009-06-0216-495/+5
|
* Quote commands that we run, so they work if there are space in their pathsIan Lynagh2009-05-301-1/+1
| | | | | I've also added some missing $s to some makefiles. These aren't technically necessary, but it's nice to be consistent.
* don't shrink the stack smaller than the value set by +RTS -k<size>Simon Marlow2009-05-291-0/+9
|
* Split Reg into vreg/hreg and add register pairsBen.Lippmeier@anu.edu.au2009-05-181-0/+7
| | | | | | | | | | | | | * The old Reg type is now split into VirtualReg and RealReg. * For the graph coloring allocator, the type of the register graph is now (Graph VirtualReg RegClass RealReg), which shows that it colors in nodes representing virtual regs with colors representing real regs. (as was intended) * RealReg contains two contructors, RealRegSingle and RealRegPair, where RealRegPair is used to represent a SPARC double reg constructed from two single precision FP regs. * On SPARC we can now allocate double regs into an arbitrary register pair, instead of reserving some reg ranges to only hold float/double values.
* Use the more portable %lu rather than %zuIan Lynagh2009-05-241-8/+8
| | | | | We now also need to cast the values to (unsigned long), as on some platforms sizeof returns (unsigned int).
* Fix warnings in mkDerivedConstantsIan Lynagh2009-05-231-10/+10
|
* fix a dependency: Makefile -> includes/MakefileSimon Marlow2009-05-191-1/+1
|
* use StgWord for the lock (fixes valgrind complaint on 64-bit machines)Simon Marlow2009-05-141-1/+1
|
* multi-slurp protectionSimon Marlow2009-05-081-0/+5
|
* Add a header to all build system files:Simon Marlow2009-04-282-0/+24
| | | | | | | | | | | | | | # ----------------------------------------------------------------------------- # # (c) 2009 The University of Glasgow # # This file is part of the GHC build system. # # To understand how the build system works and how to modify it, see # http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture # http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying # # -----------------------------------------------------------------------------
* GHC new build system megapatchIan Lynagh2009-04-264-204/+184
|
* add missing files (part of #3171 fix)Simon Marlow2009-04-241-0/+21
|
* Add EVENT_CREATE_SPARK_THREAD to replace EVENT_SPARK_TO_THREADSimon Marlow2009-04-231-19/+20
| | | | Also some tidyups and renaming
* add getOrSetSignalHandlerStore, much like getOrSetTypeableStoreSimon Marlow2009-04-231-17/+0
| | | | Part of the fix for #3171
* Added new EventLog event: Spark to Thread.donnie@darthik.com2009-04-131-15/+16
|
* Fixed ThreadID to be defined as StgThreadID, not StgWord64. Changed ↵donnie@darthik.com2009-04-131-2/+2
| | | | | | | | | | CapabilityNum to CapNo. Added helper functions postCapNo() and postThreadID(). ThreadID was StgWord64, but should have been StgThreadID, which is currently StgWord32. Changed name from CapabilityNum to CapNo to better reflect naming in Capability struct where "no" is the capability number. Modified EventLog.c to use the helper functions postCapNo() and postThreadID () for CapNo and ThreadID.
* Eventlog support for new event type: create spark.donnie@darthik.com2009-04-031-1/+2
|
* SPARC NCG: HpLim is now always stored on the stack, not in a registerBen.Lippmeier@anu.edu.au2009-03-311-1/+5
| | | | | | | | | | | | This fixes the out of memory errors we were getting on sparc after the following patch: Fri Mar 13 03:45:16 PDT 2009 Simon Marlow <marlowsd@gmail.com> * Instead of a separate context-switch flag, set HpLim to zero Ignore-this: 6c5bbe1ce2c5ef551efe98f288483b0 This reduces the latency between a context-switch being triggered and the thread returning to the scheduler, which in turn should reduce the cost of the GC barrier when there are many cores.
* Set thread affinity with +RTS -qa (only on Linux so far)Simon Marlow2009-03-182-2/+3
|
* add missing case in ENTER() (fixes readwrite002(profasm) crash)Simon Marlow2009-03-191-0/+1
|
* Add fast event loggingSimon Marlow2009-03-172-7/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | Generate binary log files from the RTS containing a log of runtime events with timestamps. The log file can be visualised in various ways, for investigating runtime behaviour and debugging performance problems. See for example the forthcoming ThreadScope viewer. New GHC option: -eventlog (link-time option) Enables event logging. +RTS -l (runtime option) Generates <prog>.eventlog with the binary event information. This replaces some of the tracing machinery we already had in the RTS: e.g. +RTS -vg for GC tracing (we should do this using the new event logging instead). Event logging has almost no runtime cost when it isn't enabled, though in the future we might add more fine-grained events and this might change; hence having a link-time option and compiling a separate version of the RTS for event logging. There's a small runtime cost for enabling event-logging, for most programs it shouldn't make much difference. (Todo: docs)
* FIX biographical profiling (#3039, probably #2297)Simon Marlow2009-03-171-4/+26
| | | | | | | | | Since we introduced pointer tagging, we no longer always enter a closure to evaluate it. However, the biographical profiler relies on closures being entered in order to mark them as "used", so we were getting spurious amounts of data attributed to VOID. It turns out there are various places that need to be fixed, and I think at least one of them was also wrong before pointer tagging (CgCon.cgReturnDataCon).
* Add getNumberOfProcessors(), FIX MacOS X build problem (hopefully)Simon Marlow2009-03-171-0/+3
| | | | | Somebody needs to implement getNumberOfProcessors() for MacOS X, currently it will return 1.
* Use work-stealing for load-balancing in the GCSimon Marlow2009-03-132-5/+1
| | | | | | | | | | | | | | | | | New flag: "+RTS -qb" disables load-balancing in the parallel GC (though this is subject to change, I think we will probably want to do something more automatic before releasing this). To get the "PARGC3" configuration described in the "Runtime support for Multicore Haskell" paper, use "+RTS -qg0 -qb -RTS". The main advantage of this is that it allows us to easily disable load-balancing altogether, which turns out to be important in parallel programs. Maintaining locality is sometimes more important that spreading the work out in parallel GC. There is a side benefit in that the parallel GC should have improved locality even when load-balancing, because each processor prefers to take work from its own queue before stealing from others.
* Instead of a separate context-switch flag, set HpLim to zeroSimon Marlow2009-03-132-30/+10
| | | | | | | | | | | | This reduces the latency between a context-switch being triggered and the thread returning to the scheduler, which in turn should reduce the cost of the GC barrier when there are many cores. We still retain the old context_switch flag which is checked at the end of each block of allocation. The idea is that setting HpLim may fail if the the target thread is modifying HpLim at the same time; the context_switch flag is a fallback. It also allows us to "context switch soon" without forcing an immediate switch, which can be costly.
* Partial fix for #2917Simon Marlow2009-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | - add newAlignedPinnedByteArray# for allocating pinned BAs with arbitrary alignment - the old newPinnedByteArray# now aligns to 16 bytes Foreign.alloca will use newAlignedPinnedByteArray#, and so might end up wasting less space than before (we used to align to 8 by default). Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte aligned memory, which is enough to avoid problems with SSE instructions on x86, for example. There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes, but would have failed if the header was not a multiple of 8 (fortunately it always was, even with profiling). Also we occasionally wasted some space unnecessarily due to alignment in allocatePinned(). I haven't done anything about Foreign.malloc/mallocBytes, which will give you the same alignment guarantees as malloc() (8 bytes on Linux/x86 here).
* Rewrite of signal-handling (ghc patch; see also base and unix patches)Simon Marlow2009-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The API is the same (for now). The new implementation has the capability to define signal handlers that have access to the siginfo of the signal (#592), but this functionality is not exposed in this patch. #2451 is the ticket for the new API. The main purpose of bringing this in now is to fix race conditions in the old signal handling code (#2858). Later we can enable the new API in the HEAD. Implementation differences: - More of the signal-handling is moved into Haskell. We store the table of signal handlers in an MVar, rather than having a table of StablePtrs in the RTS. - In the threaded RTS, the siginfo of the signal is passed down the pipe to the IO manager thread, which manages the business of starting up new signal handler threads. In the non-threaded RTS, the siginfo of caught signals is stored in the RTS, and the scheduler starts new signal handler threads.
* update Sparc store/load barrier (#3019), and fix commentsSimon Marlow2009-02-121-3/+2
|
* comment wibblesSimon Marlow2009-02-111-2/+2
|
* NCG: Use sync instead of msync for a memory barrier for powerpcBen.Lippmeier@anu.edu.au2009-02-131-1/+1
| | | | | Darwin 9.6.0 + GCC 4.0.1 doesn't understand "msync". I think "sync" means the same thing.
* one more bugfix: a load/load memory barrier is required in stealWSDeque_()Simon Marlow2009-02-111-16/+37
|
* build fix: add -I../rts/parallelSimon Marlow2009-02-061-1/+1
|
* add a single-threaded version of cas()Simon Marlow2009-02-061-0/+11
|
* add a store/load memory barrierSimon Marlow2009-02-061-0/+25
|
* SPARC NCG: Give regs o0-o5 back to the allocatorBen.Lippmeier@anu.edu.au2009-02-031-11/+45
|
* Implement #2191 (traceCcs# -- prints CCS of a value when available -- take 3)Samuel Bronson2009-01-271-0/+2
| | | | | | In this version, I untag R1 before using it, and even enter R2 at the end rather than simply returning it (which didn't work right when R2 was a thunk).
* add comment for ASSERT_LOCK_HELD()Simon Marlow2009-01-261-0/+5
|
* Reinstate: Always check the result of pthread_mutex_lock() and ↵Ian Lynagh2009-01-171-30/+10
| | | | | | | | | | | | | | | pthread_mutex_unlock(). Sun Jan 4 19:24:43 GMT 2009 Matthias Kilian <kili@outback.escape.de> Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG is defined. The return values of those functions are well defined and should be supported on all operation systems with pthreads. The checks are cheap enough to do them even in the default build (without -DDEBUG). While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let the debugBelch part enabled with -DLOCK_DEBUG work independently of -DDEBUG.
* UNDO: Always check the result of pthread_mutex_lock() and ↵Simon Marlow2009-01-161-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | pthread_mutex_unlock(). This patch caused problems on Mac OS X, undoing until we can do it better. rolling back: Sun Jan 4 19:24:43 GMT 2009 Matthias Kilian <kili@outback.escape.de> * Always check the result of pthread_mutex_lock() and pthread_mutex_unlock(). Don't check pthread_mutex_*lock() only on Linux and/or only if DEBUG is defined. The return values of those functions are well defined and should be supported on all operation systems with pthreads. The checks are cheap enough to do them even in the default build (without -DDEBUG). While here, recycle an unused macro ASSERT_LOCK_NOTHELD, and let the debugBelch part enabled with -DLOCK_DEBUG work independently of -DDEBUG. M ./includes/OSThreads.h -30 +10