1. 23 Apr, 2020 5 commits
  2. 21 Apr, 2020 7 commits
  3. 20 Apr, 2020 3 commits
  4. 19 Apr, 2020 1 commit
    • Alexis King's avatar
      Add missing addInScope call for letrec binders in OccurAnal · eaed0a32
      Alexis King authored
      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. 18 Apr, 2020 8 commits
  6. 17 Apr, 2020 5 commits
  7. 15 Apr, 2020 11 commits
    • Daniel Gröber (dxld)'s avatar
      rts: ProfHeap: Fix wrong time in last heap profile sample · ec77b2f1
      Daniel Gröber (dxld) authored
      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
      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
      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
      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
    • Daniel Gröber (dxld)'s avatar
      rts: Fix nomenclature in OVERWRITING_CLOSURE macros · e149dea9
      Daniel Gröber (dxld) authored
      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
      c3c0f662
    • Daniel Gröber (dxld)'s avatar
    • Daniel Gröber (dxld)'s avatar
      15fa9bd6
    • Daniel Gröber (dxld)'s avatar
      Zero out pinned block alignment slop when profiling · 41230e26
      Daniel Gröber (dxld) authored
      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
      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