1. 12 Jan, 2009 1 commit
  2. 23 Nov, 2008 1 commit
  3. 21 Nov, 2008 1 commit
    • Simon Marlow's avatar
      Use mutator threads to do GC, instead of having a separate pool of GC threads · 3ebcd3de
      Simon Marlow authored
      Previously, the GC had its own pool of threads to use as workers when
      doing parallel GC.  There was a "leader", which was the mutator thread
      that initiated the GC, and the other threads were taken from the pool.
      
      This was simple and worked fine for sequential programs, where we did
      most of the benchmarking for the parallel GC, but falls down for
      parallel programs.  When we have N mutator threads and N cores, at GC
      time we would have to stop N-1 mutator threads and start up N-1 GC
      threads, and hope that the OS schedules them all onto separate cores.
      It practice it doesn't, as you might expect.
      
      Now we use the mutator threads to do GC.  This works quite nicely,
      particularly for parallel programs, where each mutator thread scans
      its own spark pool, which is probably in its cache anyway.
      
      There are some flag changes:
      
        -g<n> is removed (-g1 is still accepted for backwards compat).
        There's no way to have a different number of GC threads than mutator
        threads now.
      
        -q1       Use one OS thread for GC (turns off parallel GC)
        -qg<n>    Use parallel GC for generations >= <n> (default: 1)
      
      Using parallel GC only for generations >=1 works well for sequential
      programs.  Compiling an ordinary sequential program with -threaded and
      running it with -N2 or more should help if you do a lot of GC.  I've
      found that adding -qg0 (do parallel GC for generation 0 too) speeds up
      some parallel programs, but slows down some sequential programs.
      Being conservative, I left the threshold at 1.
      
      ToDo: document the new options.
      3ebcd3de
  4. 17 Nov, 2008 1 commit
    • Simon Marlow's avatar
      Attempt to fix #2512 and #2063; add +RTS -xm<address> -RTS option · 11f6f411
      Simon Marlow authored
      On x86_64, the RTS needs to allocate memory in the low 2Gb of the
      address space.  On Linux we can do this with MAP_32BIT, but sometimes
      this doesn't work (#2512) and other OSs don't support it at all
      (#2063).  So to work around this:
      
        - Try MAP_32BIT first, if available.
      
        - Otherwise, try allocating memory from a fixed address (by default
          1Gb)
      
        - We now provide an option to configure the address to allocate
          from.  This allows a workaround on machines where the default
          breaks, and also provides a way for people to test workarounds
          that we can incorporate in future releases.
      11f6f411
  5. 11 Aug, 2008 1 commit
  6. 19 Jun, 2008 1 commit
    • Simon Marlow's avatar
      +RTS -S -RTS now sends output to stderr (also -s) · 34e8e513
      Simon Marlow authored
      Previously +RTS -Sstderr -RTS was required to send output to stderr,
      but this is the most common usage and I got tired of typing "stderr".
      The old default behaviour of sending output to <prog>.stat is now gone
      (I don't think we use it anywhere).  
      
      Temporarily we allowed +RTS -S- -RTS to mean stderr; there were
      objections to this, so it is now also gone.
      34e8e513
  7. 09 Jun, 2008 1 commit
  8. 03 Jun, 2008 2 commits
  9. 16 Apr, 2008 1 commit
  10. 31 Jan, 2008 1 commit
  11. 20 Nov, 2007 1 commit
    • simonmar@microsoft.com's avatar
      improvements to PAPI support · 8db56c86
      simonmar@microsoft.com authored
      - major (multithreaded) GC is measured separately from minor GC
      - events to measure can now be specified on the command line, e.g
           prog +RTS -a+PAPI_TOT_CYC
      8db56c86
  12. 31 Oct, 2007 1 commit
    • Simon Marlow's avatar
      Refactoring of the GC in preparation for parallel GC · d5bd3e82
      Simon Marlow authored
        
      This patch localises the state of the GC into a gc_thread structure,
      and reorganises the inner loop of the GC to scavenge one block at a
      time from global work lists in each "step".  The gc_thread structure
      has a "workspace" for each step, in which it collects evacuated
      objects until it has a full block to push out to the step's global
      list.  Details of the algorithm will be on the wiki in due course.
      
      At the moment, THREADED_RTS does not compile, but the single-threaded
      GC works (and is 10-20% slower than before).
      d5bd3e82
  13. 28 Feb, 2008 1 commit
    • Simon Marlow's avatar
      Enable -prof -threaded (#886) · 50c4d039
      Simon Marlow authored
      It turns out that -prof -threaded works (modulo some small changes),
      because all the data structures used in profiling are only accessed by
      one thread at a time, at long as we don't use +RTS -N2 or higher.  So
      this patch enables the use of -prof -threaded, but an error is given
      if you ask for more than one CPU with +RTS -N.
      50c4d039
  14. 23 Nov, 2007 1 commit
  15. 16 Aug, 2007 1 commit
  16. 23 Jul, 2007 1 commit
  17. 22 Jul, 2007 1 commit
  18. 18 Jul, 2007 1 commit
  19. 17 Jul, 2007 1 commit
  20. 08 Jul, 2007 1 commit
  21. 27 Jun, 2007 2 commits
  22. 27 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Basic heap profile support without -prof · cbeb99ef
      Simon Marlow authored
      Now that constructor info tables contain the name of the constructor,
      we can generate useful heap profiles without requiring the whole
      program and libraries to be compiled with -prof.  So now, "+RTS -hT"
      generates a heap profile for any program, dividing the profile by
      constructor.  It wouldn't be hard to add support for grouping
      constructors by module, or to restrict the profile to certain
      constructors/modules/packages.
      
      This means that for the first time we can get heap profiles for GHCi,
      which was previously impossible because the byte-code
      interpreter and linker don't work with -prof.
      cbeb99ef
  23. 04 Apr, 2007 1 commit
  24. 22 Mar, 2007 1 commit
  25. 13 Feb, 2007 1 commit
  26. 21 Dec, 2006 1 commit
  27. 09 Nov, 2006 1 commit
  28. 20 Nov, 2006 1 commit
  29. 09 Nov, 2006 1 commit
  30. 29 Sep, 2006 1 commit
    • ravi@bluespec.com's avatar
      rts_ccs_length · 16871485
      ravi@bluespec.com authored
      Add the -L RTS flag to control the length of the cost-centre stacks reported in 
      a heap profile.
      
      Please include this change in the 6.6 branch as well as HEAD
       
      16871485
  31. 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
  32. 07 Sep, 2006 1 commit
  33. 05 Sep, 2006 1 commit
    • Ian Lynagh's avatar
      new RTS flag: -V to modify the resolution of the RTS timer · 93db1991
      Ian Lynagh authored
      Fixed version of an old patch by Simon Marlow. His description read:
       Also, now an arbitrarily short context switch interval may now be
       specified, as we increase the RTS ticker's resolution to match the
       requested context switch interval.  This also applies to +RTS -i (heap
       profiling) and +RTS -I (the idle GC timer).  +RTS -V is actually only
       required for increasing the resolution of the profile timer.
      93db1991
  34. 25 Aug, 2006 1 commit
  35. 08 Jun, 2006 1 commit
    • Simon Marlow's avatar
      Add new RTS flags for tracing: · d2847b05
      Simon Marlow authored
        -vs       Trace scheduler events (see also -Ds with -debug)
        -vt       Time-stamp trace messages
      
      the intention is that we will pipe the -vs output into a
      profile-generating tool.  This commit includes the flags only,
      functionality to follow.
      d2847b05
  36. 07 Jun, 2006 2 commits
  37. 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