1. 20 Jul, 2010 1 commit
  2. 08 Jul, 2010 1 commit
    • Simon Marlow's avatar
      New asynchronous exception control API (ghc parts) · ad3b79d2
      Simon Marlow authored
      As discussed on the libraries/haskell-cafe mailing lists
      This is a replacement for block/unblock in the asychronous exceptions
      API to fix a problem whereby a function could unblock asynchronous
      exceptions even if called within a blocked context.
      The new terminology is "mask" rather than "block" (to avoid confusion
      due to overloaded meanings of the latter).
      In GHC, we changed the names of some primops:
        blockAsyncExceptions#   -> maskAsyncExceptions#
        unblockAsyncExceptions# -> unmaskAsyncExceptions#
        asyncExceptionsBlocked# -> getMaskingState#
      and added one new primop:
      See the accompanying patch to libraries/base for the API changes.
  3. 25 Jun, 2010 1 commit
  4. 20 Jun, 2010 1 commit
  5. 19 Jan, 2010 1 commit
  6. 25 Sep, 2009 1 commit
    • Simon Marlow's avatar
      Add a way to generate tracing events programmatically · 5407ad8e
      Simon Marlow authored
       primop  TraceEventOp "traceEvent#" GenPrimOp
         Addr# -> State# s -> State# s
         { Emits an event via the RTS tracing framework.  The contents
           of the event is the zero-terminated byte string passed as the first
           argument.  The event will be emitted either to the .eventlog file,
           or to stderr, depending on the runtime RTS flags. }
      and added the required RTS functionality to support it.  Also a bit of
      refactoring in the RTS tracing code.
  7. 13 Jun, 2009 1 commit
  8. 02 Jun, 2009 1 commit
  9. 15 May, 2009 1 commit
  10. 06 Mar, 2009 1 commit
    • Simon Marlow's avatar
      Partial fix for #2917 · 1b62aece
      Simon Marlow authored
       - add newAlignedPinnedByteArray# for allocating pinned BAs with
         arbitrary alignment
       - the old newPinnedByteArray# now aligns to 16 bytes
      Foreign.alloca will use newAlignedPinnedByteArray#, and so might end
      up wasting less space than before (we used to align to 8 by default).
      Foreign.allocaBytes and Foreign.mallocForeignPtrBytes will get 16-byte
      aligned memory, which is enough to avoid problems with SSE
      instructions on x86, for example.
      There was a bug in the old newPinnedByteArray#: it aligned to 8 bytes,
      but would have failed if the header was not a multiple of 8
      (fortunately it always was, even with profiling).  Also we
      occasionally wasted some space unnecessarily due to alignment in
      I haven't done anything about Foreign.malloc/mallocBytes, which will
      give you the same alignment guarantees as malloc() (8 bytes on
      Linux/x86 here).
  11. 27 Jan, 2009 1 commit
  12. 10 Dec, 2008 1 commit
  13. 06 Nov, 2008 1 commit
  14. 10 Oct, 2008 1 commit
  15. 10 Jul, 2008 1 commit
  16. 09 Jul, 2008 1 commit
  17. 23 Jun, 2008 1 commit
  18. 14 Jun, 2008 1 commit
  19. 27 May, 2008 1 commit
  20. 21 Apr, 2008 1 commit
  21. 17 Apr, 2008 1 commit
  22. 29 Mar, 2008 1 commit
  23. 25 Sep, 2007 1 commit
  24. 01 Sep, 2007 1 commit
  25. 30 Aug, 2007 1 commit
  26. 14 May, 2007 1 commit
  27. 10 May, 2007 1 commit
  28. 03 May, 2007 1 commit
  29. 17 Apr, 2007 1 commit
    • Simon Marlow's avatar
      Re-working of the breakpoint support · cdce6477
      Simon Marlow authored
      This is the result of Bernie Pope's internship work at MSR Cambridge,
      with some subsequent improvements by me.  The main plan was to
       (a) Reduce the overhead for breakpoints, so we could enable 
           the feature by default without incurrent a significant penalty
       (b) Scatter more breakpoint sites throughout the code
      Currently we can set a breakpoint on almost any subexpression, and the
      overhead is around 1.5x slower than normal GHCi.  I hope to be able to
      get this down further and/or allow breakpoints to be turned off.
      This patch also fixes up :print following the recent changes to
      constructor info tables.  (most of the :print tests now pass)
      We now support single-stepping, which just enables all breakpoints.
        :step <expr>     executes <expr> with single-stepping turned on
        :step            single-steps from the current breakpoint
      The mechanism is quite different to the previous implementation.  We
      share code with the HPC (haskell program coverage) implementation now.
      The coverage pass annotates source code with "tick" locations which
      are tracked by the coverage tool.  In GHCi, each "tick" becomes a
      potential breakpoint location.
      Previously breakpoints were compiled into code that magically invoked
      a nested instance of GHCi.  Now, a breakpoint causes the current
      thread to block and control is returned to GHCi.
      See the wiki page for more details and the current ToDo list:
  30. 17 Mar, 2007 1 commit
  31. 14 Mar, 2007 2 commits
  32. 06 Mar, 2007 1 commit
    • Simon Marlow's avatar
      add noDuplicate# · 78c491b1
      Simon Marlow authored
      This primop ensures that the current computation is not being
      duplicated, by calling threadPaused().  The idea is to use it inside
      unsafePerformIO/unsafeInterleaveIO (see #986).
  33. 01 Mar, 2007 1 commit
  34. 28 Feb, 2007 1 commit
  35. 27 Feb, 2007 1 commit
  36. 09 Dec, 2006 1 commit
  37. 07 Oct, 2006 1 commit
  38. 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.
  39. 27 Mar, 2006 1 commit
    • Simon Marlow's avatar
      Add a new primitive forkOn#, for forking a thread on a specific Capability · c520a3a2
      Simon Marlow authored
      This gives some control over affinity, while we figure out the best
      way to automatically schedule threads to make best use of the
      available parallelism.
      In addition to the primitive, there is also:
        GHC.Conc.forkOnIO :: Int -> IO () -> IO ThreadId
      where 'forkOnIO i m' creates a thread on Capability (i `rem` N), where
      N is the number of available Capabilities set by +RTS -N.
      Threads forked by forkOnIO do not automatically migrate when there are
      free Capabilities, like normal threads do.  Still, if you're using
      forkOnIO exclusively, it's a good idea to do +RTS -qm to disable work
      pushing anyway (work pushing takes too much time when the run queues
      are large, this is something we need to fix).