This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 12 Nov, 2003 1 commit
    • sof's avatar
      [project @ 2003-11-12 17:27:00 by sof] · a814590c
      sof authored
      Tidy up a couple of unportable coding issues:
      
      - conditionally use empty structs.
      - use GNU attributes only if supported.
      - 'long long' usage
      - use of 'inline' in declarations and definitions.
      
      Upshot of these changes is that MSVC is now capable of compiling
      the non-.hc portions of the RTS.
      a814590c
  2. 05 Aug, 2003 1 commit
  3. 31 Jul, 2003 1 commit
  4. 28 Jul, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-07-28 16:05:30 by simonmar] · 387a411e
      simonmar authored
      Disable update-in-place.  In its current form, it has a serious bug:
      if the thunk being updated happens to have turned into a BLACKHOLE_BQ,
      then the mutable list will be corrupted by the update.
      
      Disabling update-in-place has some performance implications: many
      programs are not affected, but one program in nofib (nucleic2) goes
      about 20% slower.  However, I can get it to go 300% faster by adding a
      few strictness annotations and compiling with -funbox-strict-fields.
      387a411e
  5. 28 Apr, 2003 2 commits
  6. 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.
      1da232fc
  7. 11 Dec, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-12-11 15:36:20 by simonmar] · 0bffc410
      simonmar authored
      Merge the eval-apply-branch on to the HEAD
      ------------------------------------------
      
      This is a change to GHC's evaluation model in order to ultimately make
      GHC more portable and to reduce complexity in some areas.
      
      At some point we'll update the commentary to describe the new state of
      the RTS.  Pending that, the highlights of this change are:
      
        - No more Su.  The Su register is gone, update frames are one
          word smaller.
      
        - Slow-entry points and arg checks are gone.  Unknown function calls
          are handled by automatically-generated RTS entry points (AutoApply.hc,
          generated by the program in utils/genapply).
      
        - The stack layout is stricter: there are no "pending arguments" on
          the stack any more, the stack is always strictly a sequence of
          stack frames.
      
          This means that there's no need for LOOKS_LIKE_GHC_INFO() or
          LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
          how to find the boundary between the text and data segments (BIG WIN!).
      
        - A couple of nasty hacks in the mangler caused by the neet to
          identify closure ptrs vs. info tables have gone away.
      
        - Info tables are a bit more complicated.  See InfoTables.h for the
          details.
      
        - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
          in GHCi which affected primitives and unboxed tuples are now
          fixed.
      
        - Binary sizes are reduced by about 7% on x86.  Performance is roughly
          similar, some programs get faster while some get slower.  I've seen
          GHCi perform worse on some examples, but haven't investigated
          further yet (GHCi performance *should* be about the same or better
          in theory).
      
        - Internally the code generator is rather better organised.  I've moved
          info-table generation from the NCG into the main codeGen where it is
          shared with the C back-end; info tables are now emitted as arrays
          of words in both back-ends.  The NCG is one step closer to being able
          to support profiling.
      
      This has all been fairly thoroughly tested, but no doubt I've messed
      up the commit in some way.
      0bffc410
  8. 12 Oct, 2002 1 commit
  9. 16 Aug, 2002 1 commit
  10. 16 Jul, 2002 1 commit
    • simonmar's avatar
      [project @ 2002-07-16 14:56:08 by simonmar] · 9a972425
      simonmar authored
      Implement a primitive failsafe mechanism for protecting against
      linking inconsistent object files.  The idea is that if object files
      which were compiled in the wrong order (non-dependency order) or
      compiled in different ways (eg. profiled vs. non-profiled) are linked
      together, a link error will result.
      
      This is achieved by adding the module version and the way to the
      module init label.  For example, previously the init label for a
      module Foo was named
      
      	__stginit_Foo
      
      now it is named
      
      	__stginit_Foo_<version>_<way>
      
      where <version> is the module version of Foo (same as the version in
      the interface file), and <way> is the current way (or empty).
      
      We also have to have a way to refer to the old plain init label, for
      using as the argument to shutdownHaskell() in a program using foreign
      exports.  So the old label now points to a jump instruction which
      transfers control to the new init code.
      9a972425
  11. 15 Feb, 2002 1 commit
  12. 10 Dec, 2001 2 commits
  13. 23 Nov, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-11-23 11:57:59 by simonmar] · 79abe0ac
      simonmar authored
      Fix a long-standing bug in the cost attribution of cost-center stacks.
      The problem case is this:
      
      	let z = _scc_ "z" f x
      	in ... z ...
      
      previously we were attributing the cost of allocating the closure 'z'
      to the enclosing cost center stack (CCCS), when it should really be
      attributed to "z":CCCS.  The effects are particularly visible with
      retainer profiling, because the closure retaining 'f' and 'x' would
      show up with the wrong CCS attached.
      
      To fix this, we need a new form of CCS representation internally:
      'PushCC CostCentre CostCentreStack' which subsumes (and therefore
      replaces) SingletonCCS.  SingletonCCS is now represented by 'PushCC cc
      NoCCS'.
      
      The CCS argument to SET_HDR may now be an arbitrary expression, such
      as PushCostCentre(CCCS,foo_cc), as may be the argument to CCS_ALLOC().
      So we combine SET_HDR and CCS_ALLOC into a single macro, SET_HDR_, to
      avoid repeated calls to PushCostCentre().
      79abe0ac
  14. 22 Nov, 2001 1 commit
    • simonmar's avatar
      [project @ 2001-11-22 14:25:11 by simonmar] · db61851c
      simonmar authored
      Retainer Profiling / Lag-drag-void profiling.
      
      This is mostly work by Sungwoo Park, who spent a summer internship at
      MSR Cambridge this year implementing these two types of heap profiling
      in GHC.
      
      Relative to Sungwoo's original work, I've made some improvements to
      the code:
      
         - it's now possible to apply constraints to retainer and LDV profiles
           in the same way as we do for other types of heap profile (eg.
           +RTS -hc{foo,bar} -hR -RTS gives you a retainer profiling considering
           only closures with cost centres 'foo' and 'bar').
      
         - the heap-profile timer implementation is cleaned up.
      
         - heap profiling no longer has to be run in a two-space heap.
      
         - general cleanup of the code and application of the SDM C coding
           style guidelines.
      
      Profiling will be a little slower and require more space than before,
      mainly because closures have an extra header word to support either
      retainer profiling or LDV profiling (you can't do both at the same
      time).
      
      We've used the new profiling tools on GHC itself, with moderate
      success.  Fixes for some space leaks in GHC to follow...
      db61851c
  15. 08 Nov, 2001 3 commits
    • simonmar's avatar
      [project @ 2001-11-08 16:37:54 by simonmar] · 0e74df8d
      simonmar authored
      wibble
      0e74df8d
    • simonmar's avatar
      [project @ 2001-11-08 16:17:35 by simonmar] · c094c3ad
      simonmar authored
      Revert resumeThread and suspendThread to working with StgRegTable
      rather than Capability, and do the conversion in the functions
      themselves rather than in the inline code.  This means I don't have to
      fiddle with the NCG to fix the SUSPEND_THREAD/RESUME_THREAD macros.
      c094c3ad
    • simonmar's avatar
      [project @ 2001-11-08 12:46:31 by simonmar] · 0671ef05
      simonmar authored
      Fix the large block allocation bug (Yay!)
      -----------------------------------------
      
      In order to do this, I had to
      
       1. in each heap-check failure branch, return the amount of heap
          actually requested, in a known location (I added another slot
          in StgRegTable called HpAlloc for this purpose).  This is
          useful for other reasons - in particular it makes it possible
          to get accurate allocation statistics.
      
       2. In the scheduler, if a heap check fails and we wanted more than
          BLOCK_SIZE_W words, then allocate a special large block and place
          it in the nursery.  The nursery now has to be double-linked so
          we can insert the new block in the middle.
      
       3. The garbage collector has to be able to deal with multiple objects
          in a large block.  It turns out that this isn't a problem as long as
          the large blocks only occur in the nursery, because we always copy
          objects from the nursery during GC.  One small change had to be
          made: in evacuate(), we may need to follow the link field from the
          block descriptor to get to the block descriptor for the head of a
          large block.
      
       4. Various other parts of the storage manager had to be modified
          to cope with a nursery containing a mixture of block sizes.
      
      Point (3) causes a slight pessimization in the garbage collector.  I
      don't see a way to avoid this.  Point (1) causes some code bloat (a
      rough measurement is around 5%), so to offset this I made the
      following change which I'd been meaning to do for some time:
      
        - Store the values of some commonly-used absolute addresses
          (eg. stg_update_PAP) in the register table.  This lets us use
          shorter instruction forms for some absolute jumps and saves some
          code space.
      
        - The type of Capability is no longer the same as an StgRegTable.
          MainRegTable renamed to MainCapability.  See Regs.h for details.
      
      Other minor changes:
      
        - remove individual declarations for the heap-check-failure jump
          points, and declare them all in StgMiscClosures.h instead.  Remove
          HeapStackCheck.h.
      
      Updates to the native code generator to follow.
      0671ef05
  16. 24 Jul, 2001 1 commit
  17. 04 Dec, 2000 1 commit
  18. 13 Nov, 2000 1 commit
  19. 07 Nov, 2000 1 commit
  20. 15 Aug, 2000 2 commits
  21. 02 Aug, 2000 1 commit
    • rrt's avatar
      [project @ 2000-08-02 14:13:26 by rrt] · 567b2505
      rrt authored
      Many fixes to DLLisation. These were previously covered up because code was
      leaking into the import libraries for DLLs, so the fact that some symbols
      were thought of as local rather than in another DLL wasn't a problem.
      
      The main problems addressed by this commit are:
      
      1. Fixes RTS symbols working properly when DLLised. They didn't before.
      2. Uses NULL instead of stg_error_entry, because DLL entry points can't be
         used as static initialisers.
      3. PrelGHC.hi-boot changed to be in package RTS, and export of PrelNum and
         PrelErr moved to PrelBase, so that references to primops & the like
         are cross-DLL as they should be.
      4. Pass imports around as Modules rather than ModuleNames, so that
         ModuleInitLabels can be checked to see if they're in a DLL or not.
      567b2505
  22. 21 Jul, 2000 3 commits
  23. 20 Jul, 2000 1 commit
    • rrt's avatar
      [project @ 2000-07-20 17:06:41 by rrt] · ba5a490c
      rrt authored
      What's the story, Rory?
      
         My name's not Rory. Owing to circumstances not fully understood, the RTS
         used to work DLLized, even though it was largely broken. Unfortunately,
         this was recently fixed.
      
      What used to happen?
      
         The EF_ macro from StgMacros.h was used to refer to primops &c.
      
      Why was this a Bad Thing?
      
         Because you need to use EDF_ when building with DLLs.
      
      What was the result?
      
         primops such as divExactInteger were compiled as _divExactInteger, rather
         than __imp__div_Exact_Integer, so they didn't refer to the DLL routines.
      
      How on earth did it work?
      
         I'm not sure, but somehow the code for the relevant routines got linked
         into the import libraries (e.g. libHSrts_imp.a), and were thus linked
         statically into the final binary.
      
      So that explains why the import libraries (supposedly just containing stubs)
      were larger than the DLLs they were stubbing, or the static libraries, for
      that matter?
      
         Perhaps.
      
      Golly!
      
         Indeed.
      
      What caused this code leakage?
      
         That's what I don't know. Perhaps a bug in the Cygwin DLL-building tools?
         I've upgraded from B20.1 to 1.1 recently.
      
      So, what's the hack, Mac?
      
         My name's not Mac. I added a new macro, ERTSF_, which uses DLL_IMPORT_RTS
         to make sure that the Right Thing is always done (because you mustn't
         make DLL references to RTS routines when compiling the RTS).
      
      Thanks for the chat, Matt!
      
         <punch>
      ba5a490c
  24. 08 Jul, 2000 1 commit
    • panne's avatar
      [project @ 2000-07-08 19:35:42 by panne] · ec491e5f
      panne authored
      After the last fix in PprAbs.ppr_amode, we now need a cast from
      StgClosure* to P_ in UPD_FRAME_UPDATEE. I'm not sure if this is the
      nicest way to fix this, CgCon.cgReturnDataCon is another candidate. It
      looks a little bit like PrimRep distinguishes not enough between the
      different kind of pointers (there's no alternative for L_).
      ec491e5f
  25. 08 Jun, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-06-08 12:54:29 by simonmar] · c7979ff1
      simonmar authored
      Make object file splitting simpler, in preparation for conversion to
      the new driver.
      
      The "inject split markers" phase is now omitted, instead we generate
      the split markers directly.
      
      Driver: also removed now-defunct -fpedantic-bottoms flag.
      c7979ff1
  26. 08 May, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-05-08 15:05:36 by simonmar] · e164329d
      simonmar authored
      change a bunch of externs into statics.  This fixes a long-standing
      bug and should eliminate the annoying "<blah> was declared extern and
      later static" warnings from gcc.
      e164329d
  27. 17 Mar, 2000 1 commit
  28. 16 Mar, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-03-16 12:40:40 by simonmar] · 3fa88f96
      simonmar authored
      Use Sp instead of the global init_stack for the stack pointer during
      module initialisation.  This should cut down the code size for module
      initialisation blocks.
      3fa88f96
  29. 15 Mar, 2000 1 commit
  30. 08 Mar, 2000 1 commit
    • simonmar's avatar
      [project @ 2000-03-08 17:48:24 by simonmar] · de896403
      simonmar authored
      - generalise the per-module initialisation stubs so that we use it
        in normal (non-profiled) code too.  The initialisation stubs are
        now called '__init_<module>' rather than '_reg<module>'.
      
      - Register foreign exported functions as stable pointers in the
        initialisation code for the module.  This fixes the foreign export
        problems reported by several people.
      
      - remove the concept of "module groups" from the profiling subsystem.
      
      - change the profiling semantics slightly; it should be unnecessary
        to use '-caf-all' to get reasonable profiles now.
      de896403
  31. 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
  32. 22 Nov, 1999 1 commit
  33. 09 Nov, 1999 1 commit