1. 03 May, 2014 1 commit
    • Sergei Trofimovich's avatar
      fix rts exported symbols base_GHCziIOziException_allocationLimitExceeded_closure · 54b31f74
      Sergei Trofimovich authored
      Commit  b0534f78
       added new exported rts symbols,
      but slightly misspelled them.
      Observer on first compiled program:
      > Linking dist/build/haskell-updater/haskell-updater ...
      > /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(Schedule.o): In function `scheduleWaitThread':
      > (.text+0xc4c): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
      > /usr/lib64/ghc-7.9.20140503/rts-1.0/libHSrts.a(RtsStartup.o): In function `hs_init_ghc':
      > (.text+0x2fa): undefined reference to `base_GHCziIOziException_allocationLimitExceeded_closure'
      > collect2: error: ld returned 1 exit status
      CC: Simon Marlow <marlowsd@gmail.com>
      Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
  2. 27 Oct, 2013 2 commits
  3. 25 Oct, 2013 1 commit
  4. 17 Feb, 2013 2 commits
  5. 16 Feb, 2013 2 commits
  6. 07 Feb, 2013 1 commit
  7. 06 Feb, 2013 1 commit
    • Ian Lynagh's avatar
      Fix threadDelay on Windows; fixes ThreadDelay001 failures · 8c8e959f
      Ian Lynagh authored
      MSDN says of Sleep:
          If dwMilliseconds is greater than one tick but less than two, the
          wait can be anywhere between one and two ticks, and so on.
      so we need to add (milliseconds-per-tick - 1) to the amount of time we
      sleep for.
  8. 05 Feb, 2013 1 commit
  9. 14 Sep, 2012 1 commit
  10. 07 Sep, 2012 1 commit
    • Simon Marlow's avatar
      Deprecate lnat, and use StgWord instead · 41737f12
      Simon Marlow authored
      lnat was originally "long unsigned int" but we were using it when we
      wanted a 64-bit type on a 64-bit machine.  This broke on Windows x64,
      where long == int == 32 bits.  Using types of unspecified size is bad,
      but what we really wanted was a type with N bits on an N-bit machine.
      StgWord is exactly that.
      lnat was mentioned in some APIs that clients might be using
      (e.g. StackOverflowHook()), so we leave it defined but with a comment
      to say that it's deprecated.
  11. 06 Jul, 2012 1 commit
    • Duncan Coutts's avatar
      New functions to get kernel thread Id + serialisable task Id · 647ae1cf
      Duncan Coutts authored
      On most platforms the userspace thread type (e.g. pthread_t) and kernel
      thread id are different. Normally we don't care about kernel thread Ids,
      but some system tools for tracing/profiling etc report kernel ids.
      For example Solaris and OSX's DTrace and Linux's perf tool report kernel
      thread ids. To be able to match these up with RTS's OSThread we need a
      way to get at the kernel thread, so we add a new function for to do just
      that (the implementation is system-dependent).
      Additionally, strictly speaking the OSThreadId type, used as task ids,
      is not a serialisable representation. On unix OSThreadId is a typedef for
      pthread_t, but pthread_t is not guaranteed to be a numeric type.
      Indeed on some systems pthread_t is a pointer and in principle it
      could be a structure type. So we add another new function to get a
      serialisable representation of an OSThreadId. This is only for use
      in log files. We use the function to serialise an id of a task,
      with the extra feature that it works in non-threaded builds
      by always returning 1.
  12. 01 Jun, 2012 1 commit
  13. 21 May, 2012 1 commit
  14. 08 May, 2012 1 commit
  15. 06 May, 2012 2 commits
  16. 05 May, 2012 1 commit
  17. 26 Apr, 2012 1 commit
    • Ian Lynagh's avatar
      Fix warnings on Win64 · 1dbe6d59
      Ian Lynagh authored
      Mostly this meant getting pointer<->int conversions to use the right
      sizes. lnat is now size_t, rather than unsigned long, as that seems a
      better match for how it's used.
  18. 20 Mar, 2012 1 commit
  19. 18 Mar, 2012 1 commit
  20. 16 Mar, 2012 2 commits
  21. 09 Dec, 2011 2 commits
  22. 07 Dec, 2011 1 commit
  23. 25 Nov, 2011 1 commit
    • Simon Marlow's avatar
      Time handling overhaul · 6b109851
      Simon Marlow authored
      Terminology cleanup: the type "Ticks" has been renamed "Time", which
      is an StgWord64 in units of TIME_RESOLUTION (currently nanoseconds).
      The terminology "tick" is now used consistently to mean the interval
      between timer signals.
      The ticker now always ticks in realtime (actually CLOCK_MONOTONIC if
      we have it).  Before it used CPU time in the non-threaded RTS and
      realtime in the threaded RTS, but I've discovered that the CPU timer
      has terrible resolution (at least on Linux) and isn't much use for
      profiling.  So now we always use realtime.  This should also fix
      The default tick interval is now 10ms, except when profiling where we
      drop it to 1ms.  This gives more accurate profiles without affecting
      runtime too much (<1%).
      Lots of cleanups - the resolution of Time is now in one place
      only (Rts.h) rather than having calculations that depend on the
      resolution scattered all over the RTS.  I hope I found them all.
  24. 11 Nov, 2011 1 commit
  25. 09 Nov, 2011 2 commits
  26. 26 Oct, 2011 2 commits
  27. 18 Jun, 2011 2 commits
  28. 05 Jun, 2011 1 commit
  29. 26 May, 2011 1 commit
  30. 21 Dec, 2010 1 commit
  31. 15 Dec, 2010 1 commit
    • Simon Marlow's avatar
      Implement stack chunks and separate TSO/STACK objects · f30d5273
      Simon Marlow authored
      This patch makes two changes to the way stacks are managed:
      1. The stack is now stored in a separate object from the TSO.
      This means that it is easier to replace the stack object for a thread
      when the stack overflows or underflows; we don't have to leave behind
      the old TSO as an indirection any more.  Consequently, we can remove
      ThreadRelocated and deRefTSO(), which were a pain.
      This is obviously the right thing, but the last time I tried to do it
      it made performance worse.  This time I seem to have cracked it.
      2. Stacks are now represented as a chain of chunks, rather than
         a single monolithic object.
      The big advantage here is that individual chunks are marked clean or
      dirty according to whether they contain pointers to the young
      generation, and the GC can avoid traversing clean stack chunks during
      a young-generation collection.  This means that programs with deep
      stacks will see a big saving in GC overhead when using the default GC
      A secondary advantage is that there is much less copying involved as
      the stack grows.  Programs that quickly grow a deep stack will see big
      In some ways the implementation is simpler, as nothing special needs
      to be done to reclaim stack as the stack shrinks (the GC just recovers
      the dead stack chunks).  On the other hand, we have to manage stack
      underflow between chunks, so there's a new stack frame
      (UNDERFLOW_FRAME), and we now have separate TSO and STACK objects.
      The total amount of code is probably about the same as before.
      There are new RTS flags:
         -ki<size> Sets the initial thread stack size (default 1k)  Egs: -ki4k -ki2m
         -kc<size> Sets the stack chunk size (default 32k)
         -kb<size> Sets the stack chunk buffer size (default 1k)
      -ki was previously called just -k, and the old name is still accepted
      for backwards compatibility.  These new options are documented.