1. 16 May, 2003 2 commits
  2. 14 May, 2003 3 commits
    • simonmar's avatar
      [project @ 2003-05-14 09:13:52 by simonmar] · 7a236a56
      simonmar authored
      Change the way SRTs are represented:
      Previously, the SRT associated with a function or thunk would be a
      sub-list of the enclosing top-level function's SRT.  But this approach
      can lead to lots of duplication: if a CAF is referenced in several
      different thunks, then it may appear several times in the SRT.
      Let-no-escapes compound the problem, because the occurrence of a
      let-no-escape-bound variable would expand to all the CAFs referred to
      by the let-no-escape.
      The new way is to describe the SRT associated with a function or thunk
      as a (pointer+offset,bitmap) pair, where the pointer+offset points
      into some SRT table (the enclosing function's SRT), and the bitmap
      indicates which entries in this table are "live" for this closure.
      The bitmap is stored in the 16 bits previously used for the length
      field, but this rarely overflows.  When it does overflow, we store the
      bitmap externally in a new "SRT descriptor".
      Now the enclosing SRT can be a set, hence eliminating the duplicates.
      Also, we now have one SRT per top-level function in a recursive group,
      where previously we used to have one SRT for the whole group.  This
      helps keep the size of SRTs down.
      Bottom line: very little difference most of the time.  GHC itself got
      slightly smaller.  One bad case of a module in GHC which had a huge
      SRT has gone away.
      While I was in the area:
        - Several parts of the back-end require bitmaps.  Functions for
          creating bitmaps are now centralised in the Bitmap module.
        - We were trying to be independent of word-size in a couple of
          places in the back end, but we've now abandoned that strategy so I
          simplified things a bit.
    • simonmar's avatar
      [project @ 2003-05-14 09:11:49 by simonmar] · efbac413
      simonmar authored
      Comments only
    • simonmar's avatar
      [project @ 2003-05-14 09:11:06 by simonmar] · c7268677
      simonmar authored
      Calling mmap() with a size > 3Gig results in EINVAL on Linux.  Catch
      this case and report it as an out of memory condition instead of a
  3. 29 Apr, 2003 1 commit
  4. 23 Apr, 2003 1 commit
  5. 22 Apr, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-04-22 16:25:08 by simonmar] · 1da232fc
      simonmar authored
      Fix an obscure bug: the most general kind of heap check,
      HEAP_CHECK_GEN(), is supposed to save the contents of *every* register
      known to the STG machine (used in cases where we either can't figure
      out which ones are live, or doing so would be too much hassle).  The
      problem is that it wasn't saving the L1 register.
      A slight complication arose in that saving the L1 register pushed the
      size of the frame over the 16 words allowed for the size of the bitmap
      stored in the frame, so I changed the layout of the frame a bit.
      Describing all the registers using a single bitmap is overkill when
      only 8 of them can actually be pointers, so now the bitmap is only 8
      bits long and we always skip over a fixed number of non-ptr words to
      account for all the non-ptr regs.  This is all described in StgMacros.h.
  6. 21 Apr, 2003 1 commit
  7. 18 Apr, 2003 1 commit
  8. 15 Apr, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-04-15 14:37:12 by simonmar] · 91af47d4
      simonmar authored
      Fix bug in forkProcess: it should be using RET_N rather than returing
      directly.  Makes a difference for unregisterised only.
      Remove dead code in atomicModifyMVarzh_fast.
  9. 08 Apr, 2003 2 commits
  10. 02 Apr, 2003 1 commit
  11. 01 Apr, 2003 3 commits
  12. 31 Mar, 2003 3 commits
    • 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(),
    • simonmar's avatar
      [project @ 2003-03-31 14:02:32 by simonmar] · 9d431e08
      simonmar authored
      On 32-bit platforms, add a bunch of symbols from libgcc.a used to
      support 64-bit arithmetic.
      It looks like these symbols are defined in libc on some platforms but
      not others, but it shouldn't do any harm to include them in the list
      of symbols that the linker knows about even if they're also in libc.
      They were already included for some platforms (cygwin, mingw, and
      darwin), this commit just includes then whenever we're compiling with
      gcc on a 32-bit platform.
    • simonmar's avatar
      [project @ 2003-03-31 12:35:21 by simonmar] · 1f927e8f
      simonmar authored
      Include NetBSD support
      Submitted by: Urban Boquist <boquist@crt.se>
  13. 29 Mar, 2003 2 commits
  14. 28 Mar, 2003 2 commits
    • sof's avatar
      [project @ 2003-03-28 23:46:39 by sof] · f1e346a7
      sof authored
      block_vtalrm_signal() and unblock_vtalrm_signal(): unused, disable.
    • sof's avatar
      [project @ 2003-03-28 01:59:05 by sof] · a5687b3b
      sof authored
      Off-by-one tidyup.
      ALLOC_AP, ALLOC_PAP and MKAP were all being constructed
      with size arguments equal to (1+number of args/FVs) in
      ByteCodeGen.schemeE, only for Interpreter.c to subtract 1
      when fishing out the payloads. This commit drops the
      Simplification spotted by Andy Moran
  15. 27 Mar, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-03-27 13:54:31 by simonmar] · bf8b921f
      simonmar authored
      Two performance tweaks:
        - Use specialised indirections, which perform the right kind of
          return without needing to enter the object they point to.  This
          saves a small percentages of memory reads.
        - Tweak the update code to generate better code with gcc.  This
          saves a few instructions per update.
  16. 26 Mar, 2003 7 commits
  17. 25 Mar, 2003 7 commits
  18. 24 Mar, 2003 1 commit