1. 23 Oct, 2001 1 commit
  2. 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
  3. 30 Jul, 2001 1 commit
  4. 24 Jul, 2001 1 commit
  5. 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
  6. 04 Jun, 2001 1 commit
  7. 23 Mar, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-03-23 16:36:20 by simonmar] · 50027272
      simonmar authored
      Changes to support bootstrapping the compiler from .hc files.  It's
      not quite working yet, but it's not far off.
      
        - the biggest change is that any injected #includes are now placed in
          the .hc file at generation time, rather than compilation time.  I
          can't see any reason not to do this - it makes it clear by looking at
          the .hc file which files are being #included, it means one less
          temporary file at compilation time, and it means the .hc file is more
          standalone.
      
        - all the gruesomeness is in mk/bootstrap.mk, which handles building
          .hc files without a ghc driver.
      50027272
  8. 22 Mar, 2001 1 commit
    • hwloidl's avatar
      [project @ 2001-03-22 03:51:08 by hwloidl] · 20fc2f0c
      hwloidl authored
      -*- outline -*-
      Time-stamp: <Thu Mar 22 2001 03:50:16 Stardate: [-30]6365.79 hwloidl>
      
      This commit covers changes in GHC to get GUM (way=mp) and GUM/GdH (way=md)
      working. It is a merge of my working version of GUM, based on GHC 4.06,
      with GHC 4.11. Almost all changes are in the RTS (see below).
      
      GUM is reasonably stable, we used the 4.06 version in large-ish programs for
      recent papers. Couple of things I want to change, but nothing urgent.
      GUM/GdH has just been merged and needs more testing. Hope to do that in the
      next weeks. It works in our working build but needs tweaking to run.
      GranSim doesn't work yet (*sigh*). Most of the code should be in, but needs
      more debugging.
      
      ToDo: I still want to make the following minor modifications before the release
      - Better wrapper skript for parallel execution [ghc/compiler/main]
      - Update parallel docu: started on it but it's minimal [ghc/docs/users_guide]
      - Clean up [nofib/parallel]: it's a real mess right now (*sigh*)
      - Update visualisation tools (minor things only IIRC) [ghc/utils/parallel]
      - Add a Klingon-English glossary
      
      * RTS:
      
      Almost all changes are restricted to ghc/rts/parallel and should not
      interfere with the rest. I only comment on changes outside the parallel
      dir:
      
      - Several changes in Schedule.c (scheduling loop; createThreads etc);
        should only affect parallel code
      - Added ghc/rts/hooks/ShutdownEachPEHook.c
      - ghc/rts/Linker.[ch]: GUM doesn't know about Stable Names (ifdefs)!!
      - StgMiscClosures.h: END_TSO_QUEUE etc now defined here (from StgMiscClosures.hc)
                           END_ECAF_LIST was missing a leading stg_
      - SchedAPI.h: taskStart now defined in here; it's only a wrapper around
                    scheduleThread now, but might use some init, shutdown later
      - RtsAPI.h: I have nuked the def of rts_evalNothing
      
      * Compiler:
      
      - ghc/compiler/main/DriverState.hs
        added PVM-ish flags to the parallel way
        added new ways for parallel ticky profiling and distributed exec
      
      - ghc/compiler/main/DriverPipeline.hs
        added a fct run_phase_MoveBinary which is called with way=mp after linking;
        it moves the bin file into a PVM dir and produces a wrapper script for
        parallel execution
        maybe cleaner to add a MoveBinary phase in DriverPhases.hs but this way
        it's less intrusive and MoveBinary makes probably only sense for mp anyway
      
      * Nofib:
      
      - nofib/spectral/Makefile, nofib/real/Makefile, ghc/tests/programs/Makefile:
        modified to skip some tests if HWL_NOFIB_HACK is set; only tmp to record
        which test prgs cause problems in my working build right now
      20fc2f0c
  9. 02 Mar, 2001 2 commits
    • simonmar's avatar
      [project @ 2001-03-02 16:15:53 by simonmar] · 435b1086
      simonmar authored
      ASSERT in updateWithIndirection() that we haven't already updated this
      object with an indirection, and fix two places in the RTS where this
      could happen.
      
      The problem only occurs when we're in a black-hole-style loop, and
      there are multiple update frames on the stack pointing to the same
      object (this is possible because of lazy black-holing).  Both stack
      squeezing and asynchronous exception raising walk down the stack and
      remove update frames, updating their contents with indirections.  If
      we don't protect against multiple updates, the mutable list in the old
      generation may get into a bogus state.
      435b1086
    • simonmar's avatar
      [project @ 2001-03-02 14:25:04 by simonmar] · 2efbfc25
      simonmar authored
      A good bug: detectBlackHoles wasn't checking for ThreadRelocated,
      which is why we sometimes get "no threads to run: infinite loop or
      deadlock?" when we should get a NonTermination exception.
      
      To be merged into the 4.08 branch.
      2efbfc25
  10. 12 Feb, 2001 1 commit
  11. 11 Feb, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-02-11 17:51:07 by simonmar] · 6d35596c
      simonmar authored
      Bite the bullet and make GHCi support non-optional in the RTS.  GHC
      4.11 should be able to build GHCi without any additional tweaks now.
      
      - the Linker is split into two parts: LinkerBasic.c, containing the
        routines required by the rest of the RTS, and Linker.c, containing
        the linker proper, which is not referred to from the rest of the RTS.
        Only Linker.c requires -ldl, so programs which don't make use of the
        linker (everything except GHC, in other words) won't need -ldl.
      6d35596c
  12. 09 Feb, 2001 1 commit
  13. 31 Jan, 2001 1 commit
  14. 24 Jan, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-01-24 15:46:19 by simonmar] · 43b212f5
      simonmar authored
      Add a CAF list for GHCI.
      
      Retaining all looked-up symbols in a list in the interpreter was the
      Wrong Thing To Do, since we can't guarantee that the transitive
      closure of this list points to all the CAFs so far evaluated (the
      transitive closure gets smaller as reachable CAFs are evaluated).
      
      A Better Thing To Do is just to retain all the CAFs.  A refinement is
      to only retain all CAFs in dynamically linked code, which is what this
      patch implements.
      43b212f5
  15. 16 Jan, 2001 1 commit
  16. 19 Dec, 2000 1 commit
  17. 14 Dec, 2000 1 commit
  18. 04 Dec, 2000 1 commit
  19. 13 Nov, 2000 2 commits
  20. 07 Nov, 2000 1 commit
  21. 10 Oct, 2000 1 commit
  22. 25 Aug, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-08-25 13:12:07 by simonmar] · 5a4ec937
      simonmar authored
      Change the way threadDelay# is implemented.
      
      We now use a list of sleeping threads sorted in increasing order by
      the time at which they will wake up.  This avoids us having to
      traverse the entire queue on each context switch.
      5a4ec937
  23. 23 Aug, 2000 1 commit
  24. 15 Aug, 2000 2 commits
  25. 03 Aug, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-08-03 11:28:35 by simonmar] · 66f7a41d
      simonmar authored
      Implement +RTS -C<n>, the context switch interval flag.  This was
      previously advertised in the usage message, but there was a note in
      the Users' Guide stating that it didn't work.  Anwyay, I'm going to
      consider it a bug and backport to 4.08.1.
      66f7a41d
  26. 17 Jul, 2000 1 commit
  27. 20 Jun, 2000 1 commit
  28. 15 May, 2000 1 commit
  29. 08 May, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-05-08 15:57:01 by simonmar] · 03b0ad10
      simonmar authored
      Detect threads that are blocked on themselves (i.e. black holed), and
      raise NonTermination exceptions.  We only do this when the system is
      deadlocked, so as not to introduce unnecessary overhead in the normal
      case.
      03b0ad10
  30. 26 Apr, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-04-26 09:44:18 by simonmar] · 0938c182
      simonmar authored
      raisezh_fast now handles uncaught exceptions cleanly.  The affected
      thread is marked as Killed, and if it is a main thread then
      rts_evalIO() will return ThreadKilled as it should.
      0938c182
  31. 14 Apr, 2000 2 commits
    • panne's avatar
      [project @ 2000-04-14 16:47:43 by panne] · 0e36d5e3
      panne authored
      Reduce number of warnings and raise chances of successful compilation
      when *not* building an interpreter :-)
      0e36d5e3
    • sewardj's avatar
      [project @ 2000-04-14 15:18:05 by sewardj] · 9ff75d08
      sewardj authored
      Clean up the runtime heap before deleting modules (and, currently, after
      every evaluation) so that the combined system can safely throw away
      modules and info tables without creating dangling refs from the heap.
      9ff75d08
  32. 11 Apr, 2000 1 commit
    • sewardj's avatar
      [project @ 2000-04-11 16:36:53 by sewardj] · d5087432
      sewardj authored
      Ensure that when Hugs decides to unload a module (nukeModule()), there are
      no closures anywhere in the system which refers to infotables defined
      in that module.  That means reverting all CAFs and doing a major GC
      prior to deleting the module.  A flag is used to avoid redundant GCs.
      d5087432
  33. 07 Apr, 2000 1 commit
  34. 05 Apr, 2000 1 commit
  35. 04 Apr, 2000 1 commit
  36. 03 Apr, 2000 1 commit