summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
...
* implement ARMv7 specific memory barriersKarel Gardas2011-08-101-1/+11
| | | | | | This patch provides implementation of ARMv7 specific memory barriers. It uses dmb sy isn (or shortly dmb) for store/load and load/load barriers and dmb st isn for store/store barrier.
* add support for STG floating-point regs using VFPv3Karel Gardas2011-08-101-2/+44
| | | | | | | This patch adds mapping for STG floating point registers using ARM VFPv3. Since I'm using just d8-d11 also processors with just VFPv3-D16 implemented should work (e.g. NVidia Tegra2, Marvell Dove)
* make StgReturn and cas functions Thumb friendlyKarel Gardas2011-08-101-0/+2
|
* implement ARMv6/7 specific xchg functionKarel Gardas2011-08-101-2/+18
|
* Stephen Blackheath's GHC/ARM registerised portKarel Gardas2011-08-102-0/+64
| | | | | | This is the Stephen Blackheath's GHC/ARM registerised port which is using modified version of LLVM and which provides basic registerised build functionality
* Also include basic time statistics in GCStats.Edward Z. Yang2011-08-061-0/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Implement public interface for GC statistics.Edward Z. Yang2011-07-301-0/+44
| | | | | | | | | | | We add a new RTS flag -T for collecting statistics but not giving any new inputs. There is one new struct in rts/storage/GC.h: GCStats. We add two new global counters current_residency and current_slop, which are useful for in-program GC statistics. See GHC.Stats in base for a Haskell interface to this functionality. Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Update some files for new testsuite tests locationDavid Terei2011-07-201-1/+1
|
* comment updatesSimon Marlow2011-07-201-2/+2
|
* Sync EventLogFormat.h with ghc-eventsDuncan Coutts2011-07-181-2/+5
|
* Add new fully-accurate per-spark trace/eventlog eventsDuncan Coutts2011-07-182-5/+15
| | | | | | | | | | | | | | Replaces the existing EVENT_RUN/STEAL_SPARK events with 7 new events covering all stages of the spark lifcycle: create, dud, overflow, run, steal, fizzle, gc The sampled spark events are still available. There are now two event classes for sparks, the sampled and the fully accurate. They can be enabled/disabled independently. By default +RTS -l includes the sampled but not full detail spark events. Use +RTS -lf-p to enable the detailed 'f' and disable the sampled 'p' spark. Includes work by Mikolaj <mikolaj.konarski@gmail.com>
* Move GC tracing into a separate trace classDuncan Coutts2011-07-181-0/+1
| | | | | | | Previously GC was included in the scheduler trace class. It can be enabled specifically with +RTS -vg or -lg, though note that both -v and -l on their own now default to a sensible set of trace classes, currently: scheduler, gc and sparks.
* add a new trace class for spark eventsDuncan Coutts2011-07-181-1/+1
|
* Add spark counter tracingDuncan Coutts2011-07-181-1/+2
| | | | | | | A new eventlog event containing 7 spark counters/statistics: sparks created, dud, overflowed, converted, GC'd, fizzled and remaining. These are maintained and logged separately for each capability. We log them at startup, on each GC (minor and major) and on shutdown.
* remove getOrSetTypeableStore. This is no longer used after the switchSimon Marlow2011-07-121-1/+0
| | | | to using MD5 hashes to identify TypeReps in the Typeable library.
* Emit various bits of OS process info into the eventlogDuncan Coutts2011-05-261-1/+39
| | | | | The process ID, parent process ID, rts name and version The program arguments and environment.
* prog_argv and rts_argv now contain *copies* of the args passed toSimon Marlow2011-05-252-5/+2
| | | | | | setupRtsFlags(), rather than sharing the memory. Previously if the caller of hs_init() passed in dynamically-allocated memory and then freed it, random crashes could happen later (#5177).
* fix an integer overflow (#5086), and pre-emptively avoid more of theseSimon Marlow2011-05-251-9/+17
| | | | in the future.
* Revert "Add capability sets to the event system. Contains code from Duncan ↵Duncan Coutts2011-05-231-38/+1
| | | | | | | | Coutts." This reverts commit 58532eb46041aec8d4cbb48b054cb5b001edb43c. Turns out it didn't work on Windows and it'll need some non-trivial changes to make it work on Windows. We'll get it in later once that's sorted out.
* Make array copy primops inlineJohan Tibell2011-05-191-6/+0
|
* Add array copy/clone primopsDaniel Peebles2011-05-192-2/+10
|
* Add capability sets to the event system. Contains code from Duncan Coutts.Spencer Janssen2011-05-181-1/+38
|
* Work around lack of saving volatile registers from unsafe foreign calls.Edward Z. Yang2011-05-151-0/+5
| | | | Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
* Unicode fixes, taking into account PEP383 supportMax Bolingbroke2011-05-141-0/+6
|
* Don't expose the cas definition to .hc filesIan Lynagh2011-04-301-0/+2
| | | | | This is more pleasant than having the C generator check whether the function it's calling is cas, and not generate a prototype if so.
* Change the way module initialisation is done (#3252, #4417)Simon Marlow2011-04-121-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the code generator generated small code fragments labelled with __stginit_M for each module M, and these performed whatever initialisation was necessary for that module and recursively invoked the initialisation functions for imported modules. This appraoch had drawbacks: - FFI users had to call hs_add_root() to ensure the correct initialisation routines were called. This is a non-standard, and ugly, API. - unless we were using -split-objs, the __stginit dependencies would entail linking the whole transitive closure of modules imported, whether they were actually used or not. In an extreme case (#4387, #4417), a module from GHC might be imported for use in Template Haskell or an annotation, and that would force the whole of GHC to be needlessly linked into the final executable. So now instead we do our initialisation with C functions marked with __attribute__((constructor)), which are automatically invoked at program startup time (or DSO load-time). The C initialisers are emitted into the stub.c file. This means that every time we compile with -prof or -hpc, we now get a stub file, but thanks to #3687 that is now invisible to the user. There are some refactorings in the RTS (particularly for HPC) to handle the fact that initialisers now get run earlier than they did before. The __stginit symbols are still generated, and the hs_add_root() function still exists (but does nothing), for backwards compatibility.
* Cleanup sweep and fix a bug in RTS flag processing.Simon Marlow2011-04-123-14/+6
| | | | | | | | | | | | | This code has accumulated a great deal of cruft over the years, this pass cleans up a lot of the surrounding cruft but leaves the actual argument processing alone - so there's still more that could be done. Bug fixed: - ghc_rts_opts should not be subject to the --rtsopts setting. If the programmer explicitly declares options with ghc_rts_opts, they shouldn't also have to accept command-line RTS options to make them work.
* add casMutVar#Simon Marlow2011-04-112-1/+3
|
* Windows build fix: ignore pthread.h if it exists (#4989)Simon Marlow2011-03-301-1/+1
|
* Make include file paths a little prettierIan Lynagh2011-03-161-0/+2
| | | | | This isn't important, but it stops us getting [...]/./[...] in the paths in bindists.
* GHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKEDSimon Marlow2011-03-011-0/+1
|
* replace C++ comments with C comments (Solaris' DTrace fails on C++ comments)Karel Gardas2011-01-121-3/+3
|
* fix TRY_ACQUIRE_LOCK on Windows.Simon Marlow2011-02-101-1/+1
|
* GC refactoring and cleanupSimon Marlow2011-02-021-4/+1
| | | | | | | | | Now we keep any partially-full blocks in the gc_thread[] structs after each GC, rather than moving them to the generation. This should give us slightly better locality (though I wasn't able to measure any difference). Also in this patch: better sanity checking with THREADED.
* A small GC optimisationSimon Marlow2011-02-022-15/+34
| | | | | | Store the *number* of the destination generation in the Bdescr struct, so that in evacuate() we don't have to deref gen to get it. This is another improvement ported over from my GC branch.
* add a constSimon Marlow2011-02-021-1/+1
|
* add TRY_ACQUIRE_LOCK()Simon Marlow2011-02-021-2/+11
|
* Remove the per-generation mutable listsSimon Marlow2011-02-022-4/+0
| | | | Now that we use the per-capability mutable lists exclusively.
* +RTS -qw hasn't done anything since 7.0.1; remove the implementation & docsSimon Marlow2011-02-011-2/+1
| | | | It is still (silently) accepted for backwards compatibility.
* Annotate thread stop events with the owner of the black holeSimon Marlow2011-01-271-1/+12
| | | | | | | | | So we can now get these in ThreadScope: 19487000: cap 1: stopping thread 6 (blocked on black hole owned by thread 4) Note: needs an update to ghc-events. Older ThreadScopes will just ignore the new information.
* Tweak some deps to avoid multiple $(wildcard ...)sIan Lynagh2011-01-231-2/+2
| | | | | | | Note that some things depending on the rts/includes header files now depend on more files: They used to include depend on includes/*.h, but now they also depend on header files in subdirectories. As far as I can see this was a bug.
* Fix installation on cygwinIan Lynagh2011-01-111-4/+4
|
* Rejig the includes/ installation rulesIan Lynagh2011-01-091-8/+12
| | | | | | They're a little nicer now, and a regression in the cygwin build is fixed (the $i in the destination wasn't surviving being passed through cygpath).
* On Cygwin, use a Cygwin-style path for /bin/install's destinationIan Lynagh2011-01-061-3/+3
| | | | | | | | | | | | | | | | | cygwin's /bin/install doesn't set file modes correctly if the destination path is a C: style path: $ /bin/install -c -m 644 foo /cygdrive/c/cygwin/home/ian/foo2 $ /bin/install -c -m 644 foo c:/cygwin/home/ian/foo3 $ ls -l foo* -rw-r--r-- 1 ian None 0 2011-01-06 18:28 foo -rw-r--r-- 1 ian None 0 2011-01-06 18:29 foo2 -rwxrwxrwx 1 ian None 0 2011-01-06 18:29 foo3 This causes problems for bindisttest/checkBinaries.sh which then thinks that e.g. the userguide HTML files are binaries. We therefore use a /cygdrive path if we are on cygwin
* Count allocations more accuratelySimon Marlow2010-12-214-5/+6
| | | | | | | | | | | The allocation stats (+RTS -s etc.) used to count the slop at the end of each nursery block (except the last) as allocated space, now we count the allocated words accurately. This should make allocation figures more predictable, too. This has the side effect of reducing the apparent allocations by a small amount (~1%), so remember to take this into account when looking at nofib results.
* use EXTERN_INLINE instead of STATIC_INLINE to avoid some gcc warningsSimon Marlow2010-12-161-27/+40
|
* Implement stack chunks and separate TSO/STACK objectsSimon Marlow2010-12-1511-89/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes two changes to the way stacks are managed: 1. The stack is now stored in a separate object from the TSO. This means that it is easier to replace the stack object for a thread when the stack overflows or underflows; we don't have to leave behind the old TSO as an indirection any more. Consequently, we can remove ThreadRelocated and deRefTSO(), which were a pain. This is obviously the right thing, but the last time I tried to do it it made performance worse. This time I seem to have cracked it. 2. Stacks are now represented as a chain of chunks, rather than a single monolithic object. The big advantage here is that individual chunks are marked clean or dirty according to whether they contain pointers to the young generation, and the GC can avoid traversing clean stack chunks during a young-generation collection. This means that programs with deep stacks will see a big saving in GC overhead when using the default GC settings. A secondary advantage is that there is much less copying involved as the stack grows. Programs that quickly grow a deep stack will see big improvements. In some ways the implementation is simpler, as nothing special needs to be done to reclaim stack as the stack shrinks (the GC just recovers the dead stack chunks). On the other hand, we have to manage stack underflow between chunks, so there's a new stack frame (UNDERFLOW_FRAME), and we now have separate TSO and STACK objects. The total amount of code is probably about the same as before. There are new RTS flags: -ki<size> Sets the initial thread stack size (default 1k) Egs: -ki4k -ki2m -kc<size> Sets the stack chunk size (default 32k) -kb<size> Sets the stack chunk buffer size (default 1k) -ki was previously called just -k, and the old name is still accepted for backwards compatibility. These new options are documented.
* warning fix: don't redefine BLOCKS_PER_MBLOCKSimon Marlow2010-12-101-0/+2
|
* Catch too-large allocations and emit an error message (#4505)Simon Marlow2010-12-092-0/+7
| | | | | | | | | | | | | | | | This is a temporary measure until we fix the bug properly (which is somewhat tricky, and we think might be easier in the new code generator). For now we get: ghc-stage2: sorry! (unimplemented feature or known bug) (GHC version 7.1 for i386-unknown-linux): Trying to allocate more than 1040384 bytes. See: http://hackage.haskell.org/trac/ghc/ticket/4550 Suggestion: read data from a file instead of having large static data structures in the code.
* Export the value of the signal used by scheduler (#4504)Dmitry Astapov2010-12-081-0/+1
|