- May 25, 2011
-
-
Simon Marlow authored
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).
-
Simon Marlow authored
in the future.
-
- May 22, 2011
-
-
Duncan Coutts authored
This reverts commit 58532eb4. 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.
-
- May 19, 2011
-
-
- May 18, 2011
-
-
- May 15, 2011
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@mit.edu>
-
- May 14, 2011
-
-
batterseapower authored
-
- Apr 30, 2011
-
-
Ian Lynagh authored
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.
-
- Apr 12, 2011
-
-
Simon Marlow authored
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.
-
Simon Marlow authored
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.
-
- Apr 11, 2011
-
-
Simon Marlow authored
-
- Mar 30, 2011
-
-
Simon Marlow authored
-
- Mar 16, 2011
-
-
Ian Lynagh authored
This isn't important, but it stops us getting [...]/./[...] in the paths in bindists.
-
- Mar 01, 2011
-
-
Simon Marlow authored
-
- Jan 12, 2011
-
-
kgardas authored
-
- Feb 10, 2011
-
-
Simon Marlow authored
-
- Feb 02, 2011
-
-
Simon Marlow authored
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.
-
Simon Marlow authored
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.
-
Simon Marlow authored
-
Simon Marlow authored
-
Simon Marlow authored
Now that we use the per-capability mutable lists exclusively.
-
- Feb 01, 2011
-
-
Simon Marlow authored
It is still (silently) accepted for backwards compatibility.
-
- Jan 27, 2011
-
-
Simon Marlow authored
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.
-
- Jan 23, 2011
-
-
Ian Lynagh authored
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.
-
- Jan 11, 2011
-
-
Ian Lynagh authored
-
- Jan 09, 2011
-
-
Ian Lynagh authored
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).
-
- Jan 06, 2011
-
-
Ian Lynagh authored
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
-
- Dec 21, 2010
-
-
Simon Marlow authored
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.
-
- Dec 16, 2010
-
-
Simon Marlow authored
-
- Dec 15, 2010
-
-
Simon Marlow authored
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.
-
- Dec 10, 2010
-
-
Simon Marlow authored
-
- Dec 09, 2010
-
-
Simon Marlow authored
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.
-
- Dec 08, 2010
-
-
adept authored
-
- Dec 06, 2010
-
-
Ian Lynagh authored
-
- Nov 25, 2010
-
-
Simon Marlow authored
-
- Nov 23, 2010
-
-
Ian Lynagh authored
They are no longer right, as we have Haskell' generating new Haskell standards.
-
Ian Lynagh authored
-
- Sep 19, 2010
-
-
Edward Z. Yang authored
This is patch that adds support for interruptible FFI calls in the form of a new foreign import keyword 'interruptible', which can be used instead of 'safe' or 'unsafe'. Interruptible FFI calls act like safe FFI calls, except that the worker thread they run on may be interrupted. Internally, it replaces BlockedOnCCall_NoUnblockEx with BlockedOnCCall_Interruptible, and changes the behavior of the RTS to not modify the TSO_ flags on the event of an FFI call from a thread that was interruptible. It also modifies the bytecode format for foreign call, adding an extra Word16 to indicate interruptibility. The semantics of interruption vary from platform to platform, but the intent is that any blocking system calls are aborted with an error code. This is most useful for making function calls to system library functions that support interrupting. There is no support for pre-Vista Windows. There is a partner testsuite patch which adds several tests for this functionality.
-
- Sep 20, 2010
-
-
Ian Lynagh authored
-