Skip to content
Snippets Groups Projects
  1. Apr 22, 2020
  2. Apr 21, 2020
  3. Apr 20, 2020
  4. Apr 19, 2020
    • Alexis King's avatar
      Add missing addInScope call for letrec binders in OccurAnal · eaed0a32
      Alexis King authored and Marge Bot's avatar Marge Bot committed
      This fixes #18044, where a shadowed variable was incorrectly substituted
      by the binder swap on the RHS of a floated-in letrec. This can only
      happen when the uniques line up *just* right, so writing a regression
      test would be very difficult, but at least the fix is small and
      straightforward.
      eaed0a32
  5. Apr 18, 2020
  6. Apr 17, 2020
  7. Apr 15, 2020
    • Daniel Gröber (dxld)'s avatar
      rts: ProfHeap: Fix wrong time in last heap profile sample · ec77b2f1
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      We've had this longstanding issue in the heap profiler, where the time of
      the last sample in the profile is sometimes way off causing the rendered
      graph to be quite useless for long runs.
      
      It seems to me the problem is that we use mut_user_time() for the last
      sample as opposed to getRTSStats(), which we use when calling heapProfile()
      in GC.c.
      
      The former is equivalent to getProcessCPUTime() but the latter does
      some additional stuff:
      
          getProcessCPUTime() - end_init_cpu - stats.gc_cpu_ns -
          stats.nonmoving_gc_cpu_ns
      
      So to fix this just use getRTSStats() in both places.
      ec77b2f1
    • Ryan Scott's avatar
      Fix #18052 by using pprPrefixOcc in more places · 22cc8e51
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      This fixes several small oversights in the choice of pretty-printing
      function to use. Fixes #18052.
      22cc8e51
    • Ryan Scott's avatar
      Bump template-haskell version to 2.17.0.0 · 0b934e30
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      This requires bumping the `exceptions` and `text` submodules to bring
      in commits that bump their respective upper version bounds on
      `template-haskell`.
      
      Fixes #17645. Fixes #17696.
      
      Note that the new `text` commit includes a fair number of additions
      to the Haddocks in that library. As a result, Haddock has to do more
      work during the `haddock.Cabal` test case, increasing the number of
      allocations it requires. Therefore,
      
      -------------------------
      Metric Increase:
          haddock.Cabal
      -------------------------
      0b934e30
    • Daniel Gröber (dxld)'s avatar
      rts: Assert LDV_recordDead is not called for inherently used closures · 19de2fb0
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      The comments make it clear LDV_recordDead should not be called for
      inhererently used closures, so add an assertion to codify this fact.
      19de2fb0
    • Daniel Gröber (dxld)'s avatar
      Remove call to LDV_RECORD_CREATE for array resizing · 1dd3d18c
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      1dd3d18c
    • Daniel Gröber (dxld)'s avatar
      rts: Fix nomenclature in OVERWRITING_CLOSURE macros · e149dea9
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      The additional commentary introduced by commit 8916e64e ("Implement
      shrinkSmallMutableArray# and resizeSmallMutableArray#.") unfortunately got
      this wrong. We set 'prim' to true in overwritingClosureOfs because we
      _don't_ want to call LDV_recordDead().
      
      The reason is because of this "inherently used" distinction made in the LDV
      profiler so I rename the variable to be more appropriate.
      e149dea9
    • Daniel Gröber (dxld)'s avatar
      rts: Underline some Notes as is conventional · c3c0f662
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      c3c0f662
    • Daniel Gröber (dxld)'s avatar
      rts: allocatePinned: Fix confusion about word/byte units · caf3f444
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      caf3f444
    • Daniel Gröber (dxld)'s avatar
      rts: Expand and add more notes regarding slop · 15fa9bd6
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      15fa9bd6
    • Daniel Gröber (dxld)'s avatar
      Zero out pinned block alignment slop when profiling · 41230e26
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      The heap profiler currently cannot traverse pinned blocks because of
      alignment slop. This used to just be a minor annoyance as the whole block
      is accounted into a special cost center rather than the respective object's
      CCS, cf. #7275. However for the new root profiler we would like to be able
      to visit _every_ closure on the heap. We need to do this so we can get rid
      of the current 'flip' bit hack in the heap traversal code.
      
      Since info pointers are always non-zero we can in principle skip all the
      slop in the profiler if we can rely on it being zeroed. This assumption
      caused problems in the past though, commit a586b33f ("rts: Correct
      handling of LARGE ARR_WORDS in LDV profiler"), part of !1118, tried to use
      the same trick for BF_LARGE objects but neglected to take into account that
      shrink*Array# functions don't ensure that slop is zeroed when not
      compiling with profiling.
      
      Later, commit 0c114c65 ("Handle large ARR_WORDS in heap census (fix
      as we will only be assuming slop is zeroed when profiling is on.
      
      This commit also reduces the ammount of slop we introduce in the first
      place by calculating the needed alignment before doing the allocation for
      small objects where we know the next available address. For large objects
      we don't know how much alignment we'll have to do yet since those details
      are hidden behind the allocateMightFail function so there we continue to
      allocate the maximum additional words we'll need to do the alignment.
      
      So we don't have to duplicate all this logic in the cmm code we pull it
      into the RTS allocatePinned function instead.
      
      Metric Decrease:
          T7257
          haddock.Cabal
          haddock.base
      41230e26
    • Matthew Pickering's avatar
      Hadrian: Make -i paths absolute · 7b41f21b
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The primary reason for this change is that ghcide does not work with
      relative paths. It also matches what cabal and stack do, they always
      pass absolute paths.
      7b41f21b
    • Ben Gamari's avatar
      base: Enable large file support for OFD locking impl. · 9853fc5e
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Not only is this a good idea in general but this should also avoid
      issue #17950 by ensuring that off_t is 64-bits.
      9853fc5e
    • Ben Gamari's avatar
      rts: Don't mark evacuate_large as inline · 27cc2e7b
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This function has two callsites and is quite large. GCC consequently
      decides not to inline and warns instead. Given the situation, I can't
      blame it. Let's just remove the inline specifier.
      27cc2e7b
    • Ben Gamari's avatar
      StgCRun: Enable unwinding only on Linux · 5b08e0c0
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      It's broken on macOS due and SmartOS due to assembler differences
      (#15207) so let's be conservative in enabling it. Also, refactor things
      to make the intent clearer.
      5b08e0c0
  8. Apr 14, 2020
Loading