1. 27 Feb, 2006 1 commit
  2. 23 Feb, 2006 4 commits
  3. 22 Feb, 2006 2 commits
  4. 21 Feb, 2006 2 commits
    • Simon Marlow's avatar
      fix a deadlock in atomicModifyMutVar# · 25cc1d1f
      Simon Marlow authored
      atomicModifyMutVar# was re-using the storage manager mutex (sm_mutex)
      to get its atomicity guarantee in SMP mode. But recently the addition
      of a call to dirty_MUT_VAR() to implement the read barrier lead to a
      rare deadlock case, because dirty_MUT_VAR() very occasionally needs to
      allocate a new block to chain on the mutable list, which requires
      sm_mutex.
      25cc1d1f
    • Simon Marlow's avatar
      warning fix · 5d9f7faf
      Simon Marlow authored
      5d9f7faf
  5. 12 Feb, 2006 1 commit
  6. 10 Feb, 2006 4 commits
  7. 09 Feb, 2006 5 commits
    • Simon Marlow's avatar
      improvement to the deadlock detection · 6ff10661
      Simon Marlow authored
      When the RTS is idle, as detected by the timer signal, instead of
      prodding capabilities from the signal handler (which is not guaranteed
      to work - pthread_cond_signal() can't be called from signal handlers),
      create a new thread to do it.
      6ff10661
    • Simon Marlow's avatar
      Merge the smp and threaded RTS ways · eba7b660
      Simon Marlow authored
      Now, the threaded RTS also includes SMP support.  The -smp flag is a
      synonym for -threaded.  The performance implications of this are small
      to negligible, and it results in a code cleanup and reduces the number
      of combinations we have to test.
      eba7b660
    • Simon Marlow's avatar
      change dirty_MUT_VAR() to use recordMutableCap() · 608bc3f3
      Simon Marlow authored
      rather than recordMutableGen(), the former works better in SMP
      608bc3f3
    • Simon Marlow's avatar
      improvement to the deadlock detection · 7b2ff4cc
      Simon Marlow authored
      When the RTS is idle, as detected by the timer signal, instead of
      prodding capabilities from the signal handler (which is not guaranteed
      to work - pthread_cond_signal() can't be called from signal handlers),
      create a new thread to do it.
      7b2ff4cc
    • Simon Marlow's avatar
      fix for the unregisterised way · 7a605453
      Simon Marlow authored
      We always assign to BaseReg on return from resumeThread(), but in
      cases where BaseReg is not an lvalue (eg. unreg) we need to disable
      this assigment.  See comments for more details.
      7a605453
  8. 08 Feb, 2006 2 commits
    • Simon Marlow's avatar
    • Simon Marlow's avatar
      make the smp way RTS-only, normal libraries now work with -smp · beb5737b
      Simon Marlow authored
      We had to bite the bullet here and add an extra word to every thunk,
      to enable running ordinary libraries on SMP.  Otherwise, we would have
      needed to ship an extra set of libraries with GHC 6.6 in addition to
      the two sets we already ship (normal + profiled), and all Cabal
      packages would have to be compiled for SMP too.  We decided it best
      just to take the hit now, making SMP easily accessible to everyone in
      GHC 6.6.
      
      Incedentally, although this increases allocation by around 12% on
      average, the performance hit is around 5%, and much less if your inner
      loop doesn't use any laziness.
      beb5737b
  9. 07 Feb, 2006 1 commit
  10. 30 Jan, 2006 1 commit
    • Simon Marlow's avatar
      fix bug #664 in printSample() · a0f8de19
      Simon Marlow authored
      printSample() was attempting to round the fractional part of the time,
      but not propagated to the non-fractional part.  It's probably better not
      to attempt to round the time at all.
      a0f8de19
  11. 23 Jan, 2006 2 commits
    • Simon Marlow's avatar
      implement clean/dirty TSOs · 9d909b3b
      Simon Marlow authored
      Along the lines of the clean/dirty arrays and IORefs implemented
      recently, now threads are marked clean or dirty depending on whether
      they need to be scanned during a minor GC or not.  This should speed
      up GC when there are lots of threads, especially if most of them are
      idle.
      9d909b3b
    • David Himmelstrup's avatar
      Fix for feature request #655 (Loading the GHC library from GHCi.) · 65691f95
      David Himmelstrup authored
      Moved the utility functions out of hschooks, avoided
      linking the GHC library with hschooks.o and
      added a couple of symbols to the linkers export list.
      65691f95
  12. 19 Jan, 2006 1 commit
  13. 18 Jan, 2006 3 commits
  14. 17 Jan, 2006 5 commits
    • simonmar's avatar
      [project @ 2006-01-17 16:13:18 by simonmar] · 91b07216
      simonmar authored
      Improve the GC behaviour of IORefs (see Ticket #650).
      
      This is a small change to the way IORefs interact with the GC, which
      should improve GC performance for programs with plenty of IORefs.
      
      Previously we had a single closure type for mutable variables,
      MUT_VAR.  Mutable variables were *always* on the mutable list in older
      generations, and always traversed on every GC.
      
      Now, we have two closure types: MUT_VAR_CLEAN and MUT_VAR_DIRTY.  The
      latter is on the mutable list, but the former is not.  (NB. this
      differs from MUT_ARR_PTRS_CLEAN and MUT_ARR_PTRS_DIRTY, both of which
      are on the mutable list).  writeMutVar# now implements a write
      barrier, by calling dirty_MUT_VAR() in the runtime, that does the
      necessary modification of MUT_VAR_CLEAN into MUT_VAR_DIRY, and adding
      to the mutable list if necessary.
      
      This results in some pretty dramatic speedups for GHC itself.  I've
      just measureed a 30% overall speedup compiling a 31-module program
      (anna) with the default heap settings :-D
      91b07216
    • simonmar's avatar
      [project @ 2006-01-17 16:03:47 by simonmar] · da69fa9c
      simonmar authored
      Improve the GC behaviour of IOArrays/STArrays
      
      See Ticket #650
      
      This is a small change to the way mutable arrays interact with the GC,
      that can have a dramatic effect on performance, and make tricks with
      unsafeThaw/unsafeFreeze redundant.  Data.HashTable should be faster
      now (I haven't measured it yet).
      
      We now have two mutable array closure types, MUT_ARR_PTRS_CLEAN and
      MUT_ARR_PTRS_DIRTY.  Both are on the mutable list if the array is in
      an old generation.  writeArray# sets the type to MUT_ARR_PTRS_DIRTY.
      The garbage collector can set the type to MUT_ARR_PTRS_CLEAN if it
      finds that no element of the array points into a younger generation
      (discovering this required a small addition to evacuate(), but rough
      tests indicate that it doesn't measurably affect performance).
      
      NOTE: none of this affects unboxed arrays (IOUArray/STUArray), only
      boxed arrays (IOArray/STArray).
      
      We could go further and extend the DIRTY bit to be per-block rather
      than for the whole array, but for now this is an easy improvement.
      da69fa9c
    • simonmar's avatar
      [project @ 2006-01-17 13:50:06 by simonmar] · ba416232
      simonmar authored
      statDescribeGens: count large blocks in the "live" figure
      ba416232
    • simonmar's avatar
      [project @ 2006-01-17 13:28:01 by simonmar] · 14ba76f4
      simonmar authored
      take into account unscavenged copied words in +RTS -t stats.
      14ba76f4
    • wolfgang's avatar
      [project @ 2006-01-17 01:51:56 by wolfgang] · bfb04182
      wolfgang authored
      Darwin/PPC:
      Make StgRunIsImplementedInAssembler non-static; gcc has recently acquired
      a habit of dead-stripping it.
      
      MERGE TO STABLE
      bfb04182
  15. 16 Jan, 2006 1 commit
  16. 12 Jan, 2006 3 commits
  17. 09 Jan, 2006 2 commits