1. 27 Oct, 2005 1 commit
  2. 26 Oct, 2005 14 commits
    • sof's avatar
      [project @ 2005-10-26 22:33:20 by sof] · b25ebcf6
      sof authored
      ASSERT_TASK_ID(): THREADED_RTS-only assert
    • simonmar's avatar
      [project @ 2005-10-26 15:36:06 by simonmar] · 9348149e
      simonmar authored
      Package up the various properties of Capabilities/Tasks that we were
      asserting all over the place, and put them in a single macro
    • simonmar's avatar
      [project @ 2005-10-26 15:22:08 by simonmar] · d3cfe894
      simonmar authored
      The prev/next link fields in struct Capability_ aren't used
    • simonmar's avatar
      [project @ 2005-10-26 15:20:59 by simonmar] · 05fa9867
      simonmar authored
      - forkProcess fix: add a forgotten rts_unlock()
      - add a couple more ASSERTs
    • simonpj's avatar
      [project @ 2005-10-26 14:53:30 by simonpj] · e8a78f0f
      simonpj authored
      awaitRequests: blocked_queue_tl was being set to NULL rather than
      END_TSO_QUEUE if the thread being removed was at the end of the queue.
      This bug has been in the code since 2003 - I have absolutely no idea
      why it hasn't manifested until today.
    • simonmar's avatar
      [project @ 2005-10-26 13:58:40 by simonmar] · 4305e52b
      simonmar authored
      forkOS_createThreadWrapper: oops, better use the result from rts_evalStableIO()
    • simonpj's avatar
      [project @ 2005-10-26 13:03:39 by simonpj] · 03aaa24e
      simonpj authored
      Improve documentation of typeclass extensions; merge to stable if it goes easily
    • simonpj's avatar
      [project @ 2005-10-26 12:35:12 by simonpj] · 07806d2b
      simonpj authored
      Simplify Provenance (the LocalDef constructor) a little
    • simonpj's avatar
      [project @ 2005-10-26 12:05:03 by simonpj] · 015aa972
      simonpj authored
      Fix two small Template Haskell bugs.
      (1) A bug in the renaming of [d| brackets |].  The problem was
      that when we renamed the bracket we messed up the name cache, because
      the module was still that of the parent module.  Now we set a fake
      module before renaming it.
      TH_spliceDecl4 is the test.
      (2) An expression splice can in principle mention *any* variable,
      so the renamer really has to assume that it does when doing depdendency
      analysis.  For example
      	f = ...
      	h = ...$(thing "f")...
      The renamer had better not put 'h' before 'f', else the type checker
      won't find a defn for 'f' in the type envt.
      TH_spliceE5 is the test
    • simonmar's avatar
      [project @ 2005-10-26 11:58:57 by simonmar] · 559295a0
      simonmar authored
      x86_64 fix: I was a bit sloppy before and assumed that the malloc()'d
      memory would be in the low 2Gb, so I could use 32-bit offset
      addressing.  It appears that this sometimes isn't the case, so do it
      properly and use 64-bit absolute addressing.
    • simonmar's avatar
      [project @ 2005-10-26 11:41:51 by simonmar] · 48d21c1f
      simonmar authored
      fix to previous change: allow workers to exit
    • 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
    • simonpj's avatar
      [project @ 2005-10-26 10:23:47 by simonpj] · 474656aa
      simonpj authored
    • simonpj's avatar
      [project @ 2005-10-26 08:41:32 by simonpj] · 7f59c72a
      simonpj authored
      Fix PUSH_ON_RUN_QUEUE bug on Win32
  3. 25 Oct, 2005 10 commits
    • sof's avatar
      [project @ 2005-10-25 17:31:38 by sof] · 16549a60
      sof authored
      FPTOOLS_CHECK_HTYPE: correctly scope the resetting of CPPFLAGS; as was,
      it got blown away if the value was cached.
      Merge to STABLE.
    • simonmar's avatar
      [project @ 2005-10-25 15:27:22 by simonmar] · 1bc861a6
      simonmar authored
      Fix bug in allocateLocal, we weren't assigning bd->step properly
    • simonmar's avatar
      [project @ 2005-10-25 15:04:58 by simonmar] · 7662a4ce
      simonmar authored
      add missing boot files
    • simonmar's avatar
      [project @ 2005-10-25 12:56:50 by simonmar] · 8bbcb410
      simonmar authored
      doc LANGUAGE pragma
    • simonmar's avatar
      [project @ 2005-10-25 12:48:35 by simonmar] · 78b72ed1
      simonmar authored
      Two changes from Krasimir Angelov, which were required for Visual
        - messaging cleanup throughout the compiler.  DynFlags has a new
          log_action :: Severity -> SrcSpan -> PprStyle -> Message -> IO ()
          this action is invoked for every message generated by the
          compiler.  This means a client of the GHC API can direct messages to
          any destination, or collect them up in an IORef for later
          This replaces previous hacks to redirect messages in the GHC API
          (hence some changes to function types in GHC.hs).
        - The JustTypecheck mode of GHC now does what it says.  It doesn't
          run any of the compiler passes beyond the typechecker for each module,
          but does generate the ModIface in order that further modules can be
      And one change from me:
        - implement the LANGUAGE pragma, finally
    • simonmar's avatar
      [project @ 2005-10-25 10:48:44 by simonmar] · 2909e581
      simonmar authored
      companion to Lexer.x rev. 1.29; columns now always count tabs as 1 in SrcLoc.
    • simonmar's avatar
      [project @ 2005-10-25 10:28:59 by simonmar] · 7d5216de
      simonmar authored
      - include the contents of ghc/HACKING verbatim, as a "quick start"
      - change the title to "Building and devleloping GHC", and make it a
        bit more GHC-centric.
    • simonmar's avatar
      [project @ 2005-10-25 10:22:48 by simonmar] · 639c825a
      simonmar authored
      add info about actually doing the build
    • simonmar's avatar
      [project @ 2005-10-25 09:35:57 by simonmar] · a832fad6
      simonmar authored
      Add a "getting started" guide to hacking on GHC.
    • wolfgang's avatar
      [project @ 2005-10-25 02:57:47 by wolfgang] · ee6e44cc
      wolfgang authored
      Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
      Remember how we deliberately misaligned the .o file in memory to compensate
      for Mach-O's lax alignment rules.
      This should have been comitted along with Linker.c 1.203 about two weeks ago.
  4. 24 Oct, 2005 4 commits
  5. 21 Oct, 2005 9 commits
    • simonmar's avatar
      [project @ 2005-10-21 15:23:59 by simonmar] · b587ed53
      simonmar authored
      more Win32 fixes
    • simonmar's avatar
      [project @ 2005-10-21 15:18:54 by simonmar] · 3fe03f82
      simonmar authored
      Fix Win32 DEBUG warnings
    • simonmar's avatar
      [project @ 2005-10-21 15:14:06 by simonmar] · 9b6f67f3
      simonmar authored
      Fix Win32 build
    • simonmar's avatar
      [project @ 2005-10-21 14:47:36 by simonmar] · 7bb59f38
      simonmar authored
      No need to import platform-specific stuff now.
    • simonmar's avatar
      [project @ 2005-10-21 14:45:59 by simonmar] · 685095d3
      simonmar authored
      Itimer.h has moved into posix/
    • simonmar's avatar
      [project @ 2005-10-21 14:42:47 by simonmar] · ce51bc83
      simonmar authored
    • simonmar's avatar
      [project @ 2005-10-21 14:41:04 by simonmar] · 0b580ba0
      simonmar authored
      oops, remove old file
    • simonmar's avatar
      [project @ 2005-10-21 14:38:18 by simonmar] · 81aad35c
      simonmar authored
    • simonmar's avatar
      [project @ 2005-10-21 14:02:17 by simonmar] · 03a9ff01
      simonmar authored
      Big re-hash of the threaded/SMP runtime
      This is a significant reworking of the threaded and SMP parts of
      the runtime.  There are two overall goals here:
        - To push down the scheduler lock, reducing contention and allowing
          more parts of the system to run without locks.  In particular,
          the scheduler does not require a lock any more in the common case.
        - To improve affinity, so that running Haskell threads stick to the
          same OS threads as much as possible.
      At this point we have the basic structure working, but there are some
      pieces missing.  I believe it's reasonably stable - the important
      parts of the testsuite pass in all the (normal,threaded,SMP) ways.
      In more detail:
        - Each capability now has a run queue, instead of one global run
          queue.  The Capability and Task APIs have been completely
          rewritten; see Capability.h and Task.h for the details.
        - Each capability has its own pool of worker Tasks.  Hence, Haskell
          threads on a Capability's run queue will run on the same worker
          Task(s).  As long as the OS is doing something reasonable, this
          should mean they usually stick to the same CPU.  Another way to
          look at this is that we're assuming each Capability is associated
          with a fixed CPU.
        - What used to be StgMainThread is now part of the Task structure.
          Every OS thread in the runtime has an associated Task, and it
          can ask for its current Task at any time with myTask().
        - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead
          (it is now defined for SMP too).
        - The RtsAPI has had to change; we must explicitly pass a Capability
          around now.  The previous interface assumed some global state.
          SchedAPI has also changed a lot.
        - The OSThreads API now supports thread-local storage, used to
          implement myTask(), although it could be done more efficiently
          using gcc's __thread extension when available.
        - I've moved some POSIX-specific stuff into the posix subdirectory,
          moving in the direction of separating out platform-specific
        - lots of lock-debugging and assertions in the runtime.  In particular,
          when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is
          also an ASSERT_LOCK_HELD() call.
      What's missing so far:
        - I have almost certainly broken the Win32 build, will fix soon.
        - any kind of thread migration or load balancing.  This is high up
          the agenda, though.
        - various performance tweaks to do
        - throwTo and forkProcess still do not work in SMP mode
  6. 20 Oct, 2005 2 commits
    • simonmar's avatar
      [project @ 2005-10-20 14:00:36 by simonmar] · 63e8af08
      simonmar authored
      Column numbers in SrcLocs are now counted as the number of characters,
      rather than columns.  i.e. a tab always counts as 1.  This was
      necessary for communication with Visual Studio interfaces which expect
      character indices, but also it seems the majority of other compilers
      also do things this way.
      From: Krasimir Angelov <kr.angelov@gmail.com>
    • simonmar's avatar
      [project @ 2005-10-20 11:45:19 by simonmar] · 4f0f4342
      simonmar authored
      changes to exitScheduler(): instead of waiting for all the tasks to
      stop, which is unreasonable, we just wait for the run queue to drain.
      This is much quicker, but not ideal (see comments).