Skip to content
Snippets Groups Projects
  1. May 30, 2019
    • Daniel Gröber (dxld)'s avatar
      Make downsweep return all errors per-module instead of throwing some · 18d3f01d
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      This enables API clients to handle such errors instead of immideately
      crashing in the face of some kinds of user errors, which is arguably quite
      bad UX.
      
      Fixes #10887
      18d3f01d
    • Daniel Gröber (dxld)'s avatar
      Refactor summarise{File,Module} to extract checkSummaryTimestamp · 76c86fca
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      This introduces a slight change of behaviour in the interrest of keeping
      the code simple: Previously summariseModule would not call
      addHomeModuleToFinder for summaries that are being re-used but now we do.
      
      We're forced to to do this in summariseFile because the file being
      summarised might not even be on the regular search path! So if GHC is to
      find it at all we have to pre-populate the cache with its location. For
      modules however the finder cache is really just a cache so we don't have to
      pre-populate it with the module's location.
      
      As straightforward as that seems I did almost manage to introduce a bug (or
      so I thought) because the call to addHomeModuleToFinder I copied from
      summariseFile used to use `ms_location old_summary` instead of the
      `location` argument to checkSummaryTimestamp. If this call were to
      overwrite the existing entry in the cache that would have resulted in us
      using the old location of any module even if it was, say, moved to a
      different directory between calls to 'depanal'.
      
      However it turns out the cache just ignores the location if the module is
      already in the cache. Since summariseModule has to search for the module,
      which has the side effect of populating the cache, everything would have
      been fine either way.
      
      Well I'm adding a test for this anyways: tests/depanal/OldModLocation.hs.
      76c86fca
    • Daniel Gröber (dxld)'s avatar
      Refactor summarise{File,Module} to reduce code duplication · 8e85ebf7
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      8e85ebf7
    • Daniel Gröber (dxld)'s avatar
      Refactor downsweep to allow returning multiple errors per module · 8906bd66
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      8906bd66
    • Daniel Gröber (dxld)'s avatar
      Add failing test for #10887 · a8de5c5a
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      a8de5c5a
    • Daniel Gröber (dxld)'s avatar
      Export GhcMake.downsweep · 70afa539
      Daniel Gröber (dxld) authored and Marge Bot's avatar Marge Bot committed
      This is to enable #10887 as well as to make it possible to test downsweep
      on its own in the testsuite.
      70afa539
    • Trịnh Tuấn Phương's avatar
      Apply suggestion to rts/CheckUnload.c · 8e42e98e
      Trịnh Tuấn Phương authored and Marge Bot's avatar Marge Bot committed
      8e42e98e
    • Trịnh Tuấn Phương's avatar
      Apply suggestion to rts/CheckUnload.c · 42129180
      Trịnh Tuấn Phương authored and Marge Bot's avatar Marge Bot committed
      42129180
    • Phuong Trinh's avatar
      Use binary search to speedup checkUnload · f81f3964
      Phuong Trinh authored and Marge Bot's avatar Marge Bot committed
      We are iterating through all object code for each heap objects when
      checking whether object code can be unloaded. For large projects in
      GHCi, this can be very expensive due to the large number of object code
      that needs to be loaded/unloaded. To speed it up, this arrangess all
      mapped sections of unloaded object code in a sorted array and use binary
      search to check if an address location fall on them.
      f81f3964
    • Ben Gamari's avatar
      rts: Handle zero-sized mappings in MachO linker · 4ad37a32
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      As noted in #16701, it is possible that we will find that an object has
      no segments needing to be mapped. Previously this would result in mmap
      being called for a zero-length mapping, which would fail. We now simply
      skip the mmap call in this case; the rest of the logic just works.
      4ad37a32
    • Ben Gamari's avatar
      CODEOWNERS: Use correct username for Richard Eisenberg · ade53ce2
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      In !980 Richard noted that he could not approve the MR.
      This mis-spelling was the reason.
      
      [skip ci]
      ade53ce2
    • Alp Mestanogullari's avatar
      Hadrian: always generate the libffi dynlibs manifest with globbing · 3aa71a22
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      Instead of trying to deduce which dynlibs are expected to be found (and then
      copied to the RTS's build dir) in libffi's build directory, with some OS
      specific logic, we now always just use `getDirectoryFilesIO` to look for
      those dynlibs and record their names in the manifest. The previous logic
      ended up causing problems on Windows, where we don't build dynlibs at all
      for now but the manifest file's logic didn't take that into account because
      it was only partially reproducing the criterions that determine whether or not
      we will be building shared libraries.
      
      This patch also re-enables the Hadrian/Windows CI job, which was failing to
      build GHC precisely because of libffi shared libraries and the aforementionned
      duplicated logic.
      3aa71a22
  2. May 29, 2019
  3. May 28, 2019
  4. May 27, 2019
    • Ömer Sinan Ağacan's avatar
      Add missing opening braces in Cmm dumps · db8e3275
      Ömer Sinan Ağacan authored and Marge Bot's avatar Marge Bot committed
      Previously -ddump-cmm was generating code with unbalanced curly braces:
      
           stg_atomically_entry() //  [R1]
                   { info_tbls: [(cfl,
                                  label: stg_atomically_info
                                  rep: tag:16 HeapRep 1 ptrs { Thunk }
                                  srt: Nothing)]
                     stack_info: arg_space: 8 updfr_space: Just 8
                   }
               {offset
                 cfl: // cfk
                     unwind Sp = Just Sp + 0;
                     _cfk::P64 = R1;
                     //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
                     R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
                     call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
               }
           }, <---- OPENING BRACE MISSING
      
      After this patch:
      
           stg_atomically_entry() { //  [R1] <---- MISSING OPENING BRACE HERE
                   { info_tbls: [(cfl,
                                  label: stg_atomically_info
                                  rep: tag:16 HeapRep 1 ptrs { Thunk }
                                  srt: Nothing)]
                     stack_info: arg_space: 8 updfr_space: Just 8
                   }
               {offset
                 cfl: // cfk
                     unwind Sp = Just Sp + 0;
                     _cfk::P64 = R1;
                     //tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
                     R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
                     call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
               }
           },
      db8e3275
    • John Ericson's avatar
      hadrian: Fix generation of settings · f80d3afd
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      I jumbled some lines in e529c65e,
      messing up the leading underscores and rts ways settings. This broke at
      least stage1 linking on macOS, but probably loads of other things too.
      
      Should fix #16685 and #16658.
      f80d3afd
    • Jasper Van der Jeugt's avatar
      Fix padding of entries in .prof files · 95b79173
      Jasper Van der Jeugt authored and Marge Bot's avatar Marge Bot committed
      When the number of entries of a cost centre reaches 11 digits, it takes
      up the whole space reserved for it and the prof file ends up looking
      like:
      
          ... no.        entries  %time %alloc   %time %alloc
      
              ...
          ... 120918     978250    0.0    0.0     0.0    0.0
          ... 118891          0    0.0    0.0    73.3   80.8
          ... 11890229702412351    8.9   13.5    73.3   80.8
          ... 118903  153799689    0.0    0.1     0.0    0.1
              ...
      
      This results in tooling not being able to parse the .prof file.  I
      realise we have the JSON output as well now, but still it'd be good to
      fix this little weirdness.
      
      Original bug report and full prof file can be seen here:
      <https://github.com/jaspervdj/profiteur/issues/28>.
      95b79173
    • Simon Jakobi's avatar
      base: Include (<$) in all exports of Functor · 6d188dd5
      Simon Jakobi authored and Marge Bot's avatar Marge Bot committed
      Previously the haddocks for Control.Monad and Data.Functor gave
      the impression that `fmap` was the only Functor method.
      
      Fixes #16681.
      6d188dd5
    • Sebastian Graf's avatar
      Add a pprTraceWith function · 723216e3
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      723216e3
    • Krzysztof Gogolewski's avatar
      Fix tcfail158 (#15899) · 1f51aad6
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      As described in #15899, this test was broken, but now it's back
      to normal.
      1f51aad6
    • Josh Price's avatar
      Correct the large tuples section in user's guide · 3f6e5b97
      Josh Price authored and Marge Bot's avatar Marge Bot committed
      Fixes #16644.
      3f6e5b97
    • mizunashi_mana's avatar
      Fix typo of primop format · dcd843ac
      mizunashi_mana authored and Marge Bot's avatar Marge Bot committed
      dcd843ac
    • Alp Mestanogullari's avatar
      Hadrian: Fix problem with unlit path in settings file · 01f8e390
      Alp Mestanogullari authored and Marge Bot's avatar Marge Bot committed
      e529c65e introduced a problem in the logic for generating the
      path to the unlit command in the settings file, and this patches
      fixes it.
      
      This fixes many tests, the simplest of which is:
      
      > _build/stage1/bin/ghc testsuite/tests/parser/should_fail/T8430.lhs
      
      which failed because of a wrong path for unlit, and now fails for the right
      reason, with the error message expected for this test.
      
      This addresses #16659.
      01f8e390
Loading