1. 04 Jun, 2008 1 commit
  2. 27 Jul, 2007 1 commit
    • Simon Marlow's avatar
      Pointer Tagging · 6015a94f
      Simon Marlow authored
        
      This patch implements pointer tagging as per our ICFP'07 paper "Faster
      laziness using dynamic pointer tagging".  It improves performance by
      10-15% for most workloads, including GHC itself.
      
      The original patches were by Alexey Rodriguez Yakushev
      <mrchebas@gmail.com>, with additions and improvements by me.  I've
      re-recorded the development as a single patch.
      
      The basic idea is this: we use the low 2 bits of a pointer to a heap
      object (3 bits on a 64-bit architecture) to encode some information
      about the object pointed to.  For a constructor, we encode the "tag"
      of the constructor (e.g. True vs. False), for a function closure its
      arity.  This enables some decisions to be made without dereferencing
      the pointer, which speeds up some common operations.  In particular it
      enables us to avoid costly indirect jumps in many cases.
      
      More information in the commentary:
      
      http://hackage.haskell.org/trac/ghc/wiki/Commentary/Rts/HaskellExecution/PointerTagging
      6015a94f
  3. 24 Oct, 2006 1 commit
    • Simon Marlow's avatar
      Split GC.c, and move storage manager into sm/ directory · ab0e778c
      Simon Marlow authored
      In preparation for parallel GC, split up the monolithic GC.c file into
      smaller parts.  Also in this patch (and difficult to separate,
      unfortunatley):
        
        - Don't include Stable.h in Rts.h, instead just include it where
          necessary.
        
        - consistently use STATIC_INLINE in source files, and INLINE_HEADER
          in header files.  STATIC_INLINE is now turned off when DEBUG is on,
          to make debugging easier.
        
        - The GC no longer takes the get_roots function as an argument.
          We weren't making use of this generalisation.
      ab0e778c
  4. 23 Aug, 2006 1 commit
  5. 10 Aug, 2006 1 commit
  6. 08 Aug, 2006 1 commit
  7. 08 Jun, 2006 1 commit
    • Simon Marlow's avatar
      New tracing interface · 5a2769f0
      Simon Marlow authored
      A simple interface for generating trace messages with timestamps and
      thread IDs attached to them.  Most debugging output goes through this
      interface now, so it is straightforward to get timestamped debugging
      traces with +RTS -vt.  Also, we plan to use this to generate
      parallelism profiles from the trace output.
      5a2769f0
  8. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  9. 22 Feb, 2006 1 commit
  10. 25 Nov, 2005 1 commit
  11. 24 Nov, 2005 2 commits
  12. 21 May, 2005 1 commit
  13. 15 Apr, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-04-15 05:29:48 by wolfgang] · eab7055a
      wolfgang authored
      Initialise foreign exports from GNU C __attribute__((constructor)) functions
      in the stub C file, rather than from __stginit_ functions.
      For non-profiling ways, leave out __stginit_ alltogether.
      eab7055a
  14. 05 Apr, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-04-05 12:19:54 by simonmar] · 16214216
      simonmar authored
      Some multi-processor hackery, including
      
        - Don't hang blocked threads off BLACKHOLEs any more, instead keep
          them all on a separate queue which is checked periodically for
          threads to wake up.
      
          This is good because (a) we don't have to worry about locking the
          closure in SMP mode when we want to block on it, and (b) it means
          the standard update code doesn't need to wake up any threads or
          check for a BLACKHOLE_BQ, simplifying the update code.
      
          The downside is that if there are lots of threads blocked on
          BLACKHOLEs, we might have to do a lot of repeated list traversal.
          We don't expect this to be common, though.  conc023 goes slower
          with this change, but we expect most programs to benefit from the
          shorter update code.
      
        - Fixing up the Capability code to handle multiple capabilities (SMP
          mode), and related changes to get the SMP mode at least building.
      16214216
    • simonmar's avatar
      [project @ 2005-04-05 09:38:00 by simonmar] · 3f4fd743
      simonmar authored
      Main x86_64 hacking: we have a problem on this arch where binutils
      can't generate 64-bit relative relocations (R_X86_64_PC64), which many
      of our info-table fields are.  So far we've been hacking around it by
      putting everything in the text section, but I've decided to adopt
      another approach: we'll use explicit 32-bit offset fields on this
      platform instead.  This is safe in the default "small" memory model
      where all symbols are guaranteed to be in the lower 2Gb of the address
      space.
      
      NCG changes coming; mangler changes are probably required too.
      3f4fd743
  15. 12 Sep, 2004 1 commit
  16. 03 Sep, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-09-03 15:28:18 by simonmar] · 95ca6bff
      simonmar authored
      Cleanup: all (well, most) messages from the RTS now go through the
      functions in RtsUtils: barf(), debugBelch() and errorBelch().  The
      latter two were previously called belch() and prog_belch()
      respectively.  See the comments for the right usage of these message
      functions.
      
      One reason for doing this is so that we can avoid spurious uses of
      stdout/stderr by Haskell apps on platforms where we shouldn't be using
      them (eg. non-console apps on Windows).
      95ca6bff
  17. 22 Aug, 2004 1 commit
    • panne's avatar
      [project @ 2004-08-22 15:50:39 by panne] · 47ff0630
      panne authored
      Removed a few "use of cast expressions as lvalues is deprecated"
      warnings. Note that gcc is really pedantic nowadays, so we have to go
      via a temporary to avoid "cast does not match function type" warnings.
      47ff0630
  18. 13 Aug, 2004 1 commit
  19. 12 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-12 17:49:05 by sof] · 20593d1d
      sof authored
      Tweaks to have RTS (C) sources compile with MSVC. Apart from wibbles
      related to the handling of 'inline', changed Schedule.h:POP_RUN_QUEUE()
      not to use expression-level statement blocks.
      20593d1d
  20. 24 Jun, 2003 1 commit
  21. 31 Mar, 2003 1 commit
    • sof's avatar
      [project @ 2003-03-31 19:19:34 by sof] · f74458a7
      sof authored
      - Stable.c:enlargeStablePtrTable(): plug a mem leak,
        the (re-)allocation is in bytes, not words.
      - nuke RtsUtils.c:stgMallocWords(),
             RtsUtils.c:stgReallocWords()
      f74458a7
  22. 28 Jan, 2003 1 commit
  23. 19 Dec, 2002 1 commit
  24. 16 Aug, 2002 1 commit
  25. 24 Apr, 2002 1 commit
  26. 09 Apr, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-04-09 12:56:36 by simonmar] · 32c9a025
      simonmar authored
      If we free a StablePtr which has no StableName attached, then just
      add its entry to the free list immediately, rather than waiting for
      the garbage collector to free it.
      32c9a025
  27. 20 Dec, 2001 1 commit
  28. 21 Nov, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-11-21 10:09:15 by simonmar] · 560bf0f6
      simonmar authored
      Turn the weighted reference count in a StablePtr into a simple counter
      in the stable ptr table.  We never made use of the weighted count, and
      it caused problems when making many StablePtrs to the same object.
      
      In the future we could remove the reference counting altogether and
      just make a new StablePtr each time, rather than attempting to use an
      existing one.  This would save on the hash table lookup at creation
      time.
      560bf0f6
  29. 14 Aug, 2001 1 commit
    • sewardj's avatar
      [project @ 2001-08-14 13:40:07 by sewardj] · bc5c8021
      sewardj authored
      Change the story about POSIX headers in C compilation.
      
      Until now, all C code in the RTS and library cbits has by default been
      compiled with settings for POSIXness enabled, that is:
         #define _POSIX_SOURCE   1
         #define _POSIX_C_SOURCE 199309L
         #define _ISOC9X_SOURCE
      If you wanted to negate this, you'd have to define NON_POSIX_SOURCE
      before including headers.
      
      This scheme has some bad effects:
      
      * It means that ccall-unfoldings exported via interfaces from a
        module compiled with -DNON_POSIX_SOURCE may not compile when
        imported into a module which does not -DNON_POSIX_SOURCE.
      
      * It overlaps with the feature tests we do with autoconf.
      
      * It seems to have caused borkage in the Solaris builds for some
        considerable period of time.
      
      The New Way is:
      
      * The default changes to not-being-in-Posix mode.
      
      * If you want to force a C file into Posix mode, #include as
        the **first** include the new file ghc/includes/PosixSource.h.
        Most of the RTS C sources have this include now.
      
      * NON_POSIX_SOURCE is almost totally expunged.  Unfortunately
        we have to retain some vestiges of it in ghc/compiler so that
        modules compiled via C on Solaris using older compilers don't
        break.
      bc5c8021
  30. 08 Aug, 2001 1 commit
  31. 23 Jul, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-07-23 17:23:19 by simonmar] · dfd7d6d0
      simonmar authored
      Add a compacting garbage collector.
      
      It isn't enabled by default, as there are still a couple of problems:
      there's a fallback case I haven't implemented yet which means it will
      occasionally bomb out, and speed-wise it's quite a bit slower than the
      copying collector (about 1.8x slower).
      
      Until I can make it go faster, it'll only be useful when you're
      actually running low on real memory.
      
      '+RTS -c' to enable it.
      
      Oh, and I cleaned up a few things in the RTS while I was there, and
      fixed one or two possibly real bugs in the existing GC.
      dfd7d6d0
  32. 13 Jul, 2001 1 commit
  33. 04 Sep, 2000 2 commits
  34. 24 Apr, 2000 1 commit
    • panne's avatar
      [project @ 2000-04-24 22:05:08 by panne] · 6d6424ae
      panne authored
      Use get_itbl instead of direct access to info field in
      removeIndirections. This "worked" only because the probability of
      hitting an indirection-like closure by chance is 5:65531 on 32bit
      platforms. :-) But HOpenGL once again managed to expose this bug...
      6d6424ae
  35. 29 Feb, 2000 1 commit
    • sof's avatar
      [project @ 2000-02-29 19:59:38 by sof] · e19ffca9
      sof authored
      Added removeIndirections() and make use of it in lookupStableName() -- increases
      the possibilities of StableName sharing.
      e19ffca9
  36. 26 Oct, 1999 1 commit
    • sewardj's avatar
      [project @ 1999-10-26 17:15:39 by sewardj] · 37cb07db
      sewardj authored
      markStablePtrTable: correctly handle case when one stable ptr refers
      to an indirection to an item referred to directly by a second
      stable ptr (I think!).
      37cb07db
  37. 15 Sep, 1999 1 commit