1. 17 Jun, 2010 1 commit
  2. 21 Apr, 2010 1 commit
    • Ian Lynagh's avatar
      Use StgWord64 instead of ullong · 81c95f7d
      Ian Lynagh authored
      This patch also fixes ullong_format_string (renamed to showStgWord64)
      so that it works with values outside the 32bit range (trac #3979), and
      simplifies the without-commas case.
      81c95f7d
  3. 09 Sep, 2009 1 commit
  4. 29 Aug, 2009 1 commit
  5. 05 Aug, 2009 1 commit
  6. 03 Aug, 2009 1 commit
  7. 02 Aug, 2009 1 commit
    • Simon Marlow's avatar
      RTS tidyup sweep, first phase · a2a67cd5
      Simon Marlow authored
      The first phase of this tidyup is focussed on the header files, and in
      particular making sure we are exposinng publicly exactly what we need
      to, and no more.
      
       - Rts.h now includes everything that the RTS exposes publicly,
         rather than a random subset of it.
      
       - Most of the public header files have moved into subdirectories, and
         many of them have been renamed.  But clients should not need to
         include any of the other headers directly, just #include the main
         public headers: Rts.h, HsFFI.h, RtsAPI.h.
      
       - All the headers needed for via-C compilation have moved into the
         stg subdirectory, which is self-contained.  Most of the headers for
         the rest of the RTS APIs have moved into the rts subdirectory.
      
       - I left MachDeps.h where it is, because it is so widely used in
         Haskell code.
       
       - I left a deprecated stub for RtsFlags.h in place.  The flag
         structures are now exposed by Rts.h.
      
       - Various internal APIs are no longer exposed by public header files.
      
       - Various bits of dead code and declarations have been removed
      
       - More gcc warnings are turned on, and the RTS code is more
         warning-clean.
      
       - More source files #include "PosixSource.h", and hence only use
         standard POSIX (1003.1c-1995) interfaces.
      
      There is a lot more tidying up still to do, this is just the first
      pass.  I also intend to standardise the names for external RTS APIs
      (e.g use the rts_ prefix consistently), and declare the internal APIs
      as hidden for shared libraries.
      a2a67cd5
  8. 01 Jul, 2009 1 commit
  9. 02 Jun, 2009 1 commit
  10. 16 Aug, 2007 1 commit
  11. 11 Dec, 2006 1 commit
    • Ian Lynagh's avatar
      When debugging, have the allocator help us a bit · d5265047
      Ian Lynagh authored
      We now check for freeing memory that isn't allocated, and overwrite memory
      we are about to free with 0xaa.
      It might be nice to also have a flag to control whether the memory
      actually gets free'd.
      d5265047
  12. 30 May, 2006 1 commit
    • Simon Marlow's avatar
      replace stgMallocBytesRWX() with our own allocator · e3c55aeb
      Simon Marlow authored
      See bug #738
      
      Allocating executable memory is getting more difficult these days.  In
      particular, the default SELinux policy on Fedora Core 5 disallows
      making the heap (i.e. malloc()'d memory) executable, although it does
      apparently allow mmap()'ing anonymous executable memory by default.
      
      Previously, stgMallocBytesRWX() used malloc() underneath, and then
      tried to make the page holding the memory executable.  This was rather
      hacky and fails with Fedora Core 5.  
      
      This patch adds a mini-allocator for executable memory, based on the
      block allocator.  We grab page-sized blocks and make them executable,
      then allocate small objects from the page.  There's a simple free
      function, that will free whole pages back to the system when they are
      empty.
      e3c55aeb
  13. 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
  14. 21 Oct, 2005 1 commit
    • 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
          implementations.
      
        - 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
      03a9ff01
  15. 12 Jul, 2005 1 commit
  16. 27 Mar, 2005 1 commit
    • panne's avatar
      [project @ 2005-03-27 13:41:13 by panne] · 03dc2dd3
      panne authored
      * Some preprocessors don't like the C99/C++ '//' comments after a
        directive, so use '/* */' instead. For consistency, a lot of '//' in
        the include files were converted, too.
      
      * UnDOSified libraries/base/cbits/runProcess.c.
      
      * My favourite sport: Killed $Id$s.
      03dc2dd3
  17. 16 Feb, 2005 1 commit
  18. 04 Oct, 2004 1 commit
  19. 03 Oct, 2004 1 commit
  20. 02 Oct, 2004 1 commit
    • dons's avatar
      [project @ 2004-10-02 07:32:25 by dons] · 20d697a1
      dons authored
      When linking against libpthreads, raise(3) can behave strangely on
      some platforms (OpenBSD at least, maybe other BSDs, not Linux). So use
      pthread_kill() to generate signals when running the threaded rts,
      instead of raise(), when System.Posix.Signals.raiseSignal is called.
      
      raiseSignal will call genericRaise, in the rts, which knows which
      function to use.
      20d697a1
  21. 06 Sep, 2004 1 commit
  22. 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
  23. 13 Aug, 2004 1 commit
  24. 23 Mar, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-03-23 10:04:18 by simonmar] · 6a79e068
      simonmar authored
      Give the malloc functiosn the __malloc__ attribute, if available.
      Helps with aliasing optimisations, apparently.
      
      Submitted by: Duncan Coutts <duncan.coutts@worcester.oxford.ac.uk>
      6a79e068
  25. 26 Feb, 2004 1 commit
  26. 12 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-12 17:49:05 by sof] · 20593d1d
      sof authored
      Tweaks to have RTS (C) sources compile with MSVC. Apart from wibbles
      related to the handling of 'inline', changed Schedule.h:POP_RUN_QUEUE()
      not to use expression-level statement blocks.
      20593d1d
  27. 26 Sep, 2003 1 commit
  28. 09 Jun, 2003 1 commit
  29. 31 Mar, 2003 1 commit
    • sof's avatar
      [project @ 2003-03-31 19:19:34 by sof] · f74458a7
      sof authored
      - Stable.c:enlargeStablePtrTable(): plug a mem leak,
        the (re-)allocation is in bytes, not words.
      - nuke RtsUtils.c:stgMallocWords(),
             RtsUtils.c:stgReallocWords()
      f74458a7
  30. 25 Mar, 2003 2 commits
  31. 19 Mar, 2003 1 commit
  32. 31 Oct, 2001 1 commit
  33. 29 Aug, 2001 1 commit
  34. 18 May, 2000 1 commit
  35. 14 Apr, 2000 1 commit
  36. 16 Mar, 2000 1 commit
  37. 13 Jan, 2000 1 commit
    • hwloidl's avatar
      [project @ 2000-01-13 14:33:57 by hwloidl] · 1b28d4e1
      hwloidl authored
      Merged GUM-4-04 branch into the main trunk. In particular merged GUM and
      SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.
      1b28d4e1
  38. 12 Jan, 2000 1 commit
  39. 09 Nov, 1999 1 commit