1. 25 Mar, 2006 1 commit
  2. 22 Mar, 2006 2 commits
  3. 28 Feb, 2006 1 commit
  4. 17 Jan, 2006 1 commit
  5. 18 Nov, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-11-18 15:24:12 by simonmar] · c5cd2343
      simonmar authored
      Two improvements to the SMP runtime:
      
        - support for 'par', aka sparks.  Load balancing is very primitive
          right now, but I have seen programs that go faster using par.
      
        - support for backing off when a thread is found to be duplicating
          a computation currently underway in another thread.  This also
          fixes some instability in SMP, because it turned out that when
          an update frame points to an indirection, which can happen if
          a thunk is under evaluation in multiple threads, then after GC
          has shorted out the indirection the update will trash the value.
          Now we suspend the duplicate computation to the heap before this
          can happen.
      
      Additionally:
      
        - stack squeezing is separate from lazy blackholing, and now only
          happens if there's a reasonable amount of squeezing to be done
          in relation to the number of words of stack that have to be moved.
          This means we won't try to shift 10Mb of stack just to save 2
          words at the bottom (it probably never happened, but still).
      
        - update frames are now marked when they have been visited by lazy
          blackholing, as per the SMP paper.
      
        - cleaned up raiseAsync() a bit.
      c5cd2343
  6. 26 Oct, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-10-26 10:42:54 by simonmar] · 7c82b4a8
      simonmar authored
      - change the type of StgRun(): now we return the Capability that the
        thread currently holds.  The return status of the thread is now
        stored in cap->r.rRet (a new slot in the reg table).
      
        This was necessary because on return from StgRun(), the current
        TSO may be blocked, so it no longer belongs to us.  If it is a bound
        thread, then the Task may have been already woken up on another
        Capability, so the scheduler can't use task->cap to find the
        capability it currently owns.
      
      - when shutting down, allow a bound thread to remove its TSO from
        the run queue when exiting (eliminates an error condition in
        releaseCapability()).
      7c82b4a8
  7. 24 Oct, 2005 1 commit
  8. 11 Sep, 2005 1 commit
  9. 09 Jun, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-06-09 05:55:40 by wolfgang] · af0c406d
      wolfgang authored
      Registerised support for Darwin/x86, both NCG and mangled.
      
      *) -fPIC doesn't work yet with -fvia-C.
      *) Apple officially requires the stack to be 16-byte-aligned,
         GHC ignores this for now.
      af0c406d
  10. 30 Mar, 2005 1 commit
  11. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  12. 23 Jan, 2005 1 commit
    • wolfgang's avatar
      [project @ 2005-01-23 06:10:15 by wolfgang] · 6f985ae8
      wolfgang authored
      Add support for the dead code stripping feature of recent Apple linkers.
      If your code is compiled using the NCG, you can now specify
      -optl-W,-dead_strip on the GHC command line when linking.
      It will have basically the same effect as using split-objs to build the
      libraries.
      
      Advantages over split-objs:
          * No evil perl script involved
          * Requires no special handling when building libraries
      
      Disadvantages:
          * The current version of Apple's linker is slow when given the
            -dead_strip flag. _REALLY_ slow.
          * Mac OS X only.
      
      This works by making the NCG emit the .subsections_via_symbols directive.
      Additionally, we have to add an extra label at the top of every info table,
      and make sure that the entry code references it (otherwise the info table
      will be considered part of the preceding entry code).
      The mangler just removes the .subsections_via_symbols directive.
      6f985ae8
  13. 22 Nov, 2004 1 commit
  14. 21 Nov, 2004 1 commit
  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. 13 Aug, 2004 2 commits
  18. 10 Dec, 2003 1 commit
    • wolfgang's avatar
      [project @ 2003-12-10 11:35:24 by wolfgang] · 60ea58ab
      wolfgang authored
      PowerPC Linux support for registerised compilation and native code
      generation. (object splitting and GHCi are still unsupported).
      
      Code for other platforms is not affected, so MERGE TO STABLE.
      60ea58ab
  19. 29 Aug, 2003 1 commit
  20. 09 Jun, 2003 1 commit
  21. 31 Jan, 2003 1 commit
  22. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  23. 13 Jun, 2002 1 commit
  24. 07 Jun, 2002 1 commit
  25. 03 Jun, 2002 1 commit
    • matthewc's avatar
      [project @ 2002-06-03 13:08:37 by matthewc] · cb5ccf0a
      matthewc authored
      Initial mangling and tailcalls support for IA64.
      
      Function prologues and epilogues are deleted and we use a single register
      stack frame throughout (with a little register renaming in the mangler...)
      Dropthrough from fast to slow entry point is also implemented.
      Tailcalls are marked and converted into jumps at mangle time.
      cb5ccf0a
  26. 21 May, 2002 1 commit
  27. 18 Apr, 2002 1 commit
  28. 26 Mar, 2002 1 commit
  29. 28 Feb, 2002 1 commit
  30. 08 Feb, 2002 1 commit
    • sewardj's avatar
      [project @ 2002-02-08 14:04:29 by sewardj] · 11eaf772
      sewardj authored
      Back out rev 1.28.  In retrospect saving the pre-messed-with %esp in a
      global location is thread/reentrancy unsafe and a brain-dead thing to
      do, and we can't think of a clean way to fix this.  So am backing it out.
      11eaf772
  31. 06 Feb, 2002 1 commit
    • sewardj's avatar
      [project @ 2002-02-06 15:48:56 by sewardj] · 6e1e8a09
      sewardj authored
      x86 only: make %esp be 8-aligned before entering HC-world code.
      This avoids misalignment penalties for C doubles stored on the C
      stack.  A quick test using nofib/imaginary/rfib shows that getting
      this wrong increases run time by about 10% on our 1 GHz PIII.
      6e1e8a09
  32. 07 Jan, 2002 1 commit
    • ken's avatar
      [project @ 2002-01-07 22:35:55 by ken] · 30f68dc6
      ken authored
      On the alpha, __divq() in libc.a clobbers $s6, so StgRun() needs to save
      $s6.  While we are at it, let us save $f8 and $f9 as well.
      MERGE TO STABLE
      30f68dc6
  33. 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
  34. 07 Aug, 2001 1 commit
    • ken's avatar
      [project @ 2001-08-07 20:06:41 by ken] · 9bab7a0e
      ken authored
      Fixed (I hope, and have reason to believe) mysterious segfaulting problem
      on the Alpha.
      
      The problem (I hope, and have reason to believe) was that, during a few
      instructions, the register saving/restoring code in StgRun() places data
      below the current SP value.  (I.e., it should first reserve stack space,
      then put data in said space, rather than first put data in, then reserve
      the space.)
      
         "The SP value might be used by the hardware when raising exceptions and
          asynchronous interrupts. It must be assumed that the contents of the stack
          below the current SP value and within the stack for the current thread are
          continually and unpredictably modified, as specified in the _Alpha
          Architecture Reference Manual_, and as a result of asynchronous software
          actions."
      
         -- Compaq Computer Corporation, Houston. Tru64 UNIX Calling Standard for
            Alpha Systems, 5.1 edition, August 2000, section 3.2.1.  http://www.
            tru64unix.compaq.com/docs/base_doc/DOCUMENTATION/V51_PDF/ARH9MBTE.PDF
      9bab7a0e
  35. 24 Jul, 2001 1 commit
  36. 04 Dec, 2000 1 commit
  37. 13 Nov, 2000 2 commits