Skip to content
Snippets Groups Projects
  1. Jun 12, 2024
  2. Jun 05, 2024
  3. Jun 04, 2024
  4. May 31, 2024
  5. May 30, 2024
  6. May 25, 2024
  7. May 24, 2024
  8. May 20, 2024
  9. May 17, 2024
    • Teo Camarasu's avatar
      rts: Allocate non-moving segments with megablocks · b38dcf39
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      Non-moving segments are 8 blocks long and need to be aligned.
      Previously we serviced allocations by grabbing 15 blocks, finding
      an aligned 8 block group in it and returning the rest.
      This proved to lead to high levels of fragmentation as a de-allocating a segment
      caused an 8 block gap to form, and this could not be reused for allocation.
      
      This patch introduces a segment allocator based around using entire
      megablocks to service segment allocations in bulk.
      
      When there are no free segments, we grab an entire megablock and fill it
      with aligned segments. As the megablock is free, we can easily guarantee
      alignment. Any unused segments are placed on a free list.
      
      It only makes sense to free segments in bulk when all of the segments in
      a megablock are freeable. After sweeping, we grab the free list, sort it,
      and find all groups of segments where they cover the megablock and free
      them.
      This introduces a period of time when free segments are not available to
      the mutator, but the risk that this would lead to excessive allocation
      is low. Right after sweep, we should have an abundance of partially full
      segments, and this pruning step is relatively quick.
      
      In implementing this we drop the logic that kept NONMOVING_MAX_FREE
      segments on the free list.
      
      We also introduce an eventlog event to log the amount of pruned/retained
      free segments.
      
      See Note [Segment allocation strategy]
      
      Resolves #24150
      
      -------------------------
      Metric Decrease:
          T13253
          T19695
      -------------------------
      b38dcf39
  10. May 16, 2024
    • Adam Gundry's avatar
      Representation-polymorphic HasField (fixes #22156) · b84b91f5
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      This generalises the HasField class to support representation polymorphism,
      so that instead of
      
          type HasField :: forall {k} . k -> Type -> Type -> Constraint
      
      we have
      
          type HasField :: forall {k} {r_rep} {a_rep} . k -> TYPE r_rep -> TYPE a_rep -> Constraint
      b84b91f5
  11. May 15, 2024
    • Hannes Siebenhandl's avatar
      Add run-time configurability of `.hi` file compression · 36aa7cf1
      Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
      Introduce the flag `-fwrite-if-compression=<n>` which allows to
      configure the compression level of writing .hi files.
      
      The motivation is that some deduplication operations are too expensive
      for the average use case. Hence, we introduce multiple compression
      levels with variable impact on performance, but still reduce the
      memory residency and `.hi` file size on disk considerably.
      
      We introduce three compression levels:
      
      * `1`: `Normal` mode. This is the least amount of compression.
          It deduplicates only `Name` and `FastString`s, and is naturally the
          fastest compression mode.
      * `2`: `Safe` mode. It has a noticeable impact on .hi file size and is
        marginally slower than `Normal` mode. In general, it should be safe to
        always use `Safe` mode.
      * `3`: `Full` deduplication mode. Deduplicate as much as we can,
        resulting in minimal .hi files, but at the cost of additional
        compilation time.
      
      Reading .hi files doesn't need to know the initial compression level,
      and can always deserialise a `ModIface`, as we write out a byte that
      indicates the next value has been deduplicated.
      This allows users to experiment with different compression levels for
      packages, without recompilation of dependencies.
      
      Note, the deduplication also has an additional side effect of reduced
      memory consumption to implicit sharing of deduplicated elements.
      See #24540 for example where
      that matters.
      
      -------------------------
      Metric Decrease:
          MultiLayerModulesDefsGhciWithCore
          T16875
          T21839c
          T24471
          hard_hole_fits
          libdir
      -------------------------
      36aa7cf1
  12. May 12, 2024
    • Andreas Klebinger's avatar
      Tidy: Add flag to expose unfoldings if they take dictionary arguments. · 413217ba
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      Add the flag `-fexpose-overloaded-unfoldings` to be able to control this
      behaviour.
      
      For ghc's boot libraries file size grew by less than 1% when it was
      enabled. However I refrained from enabling it by default for now.
      
      I've also added a section on specialization more broadly to the users
      guide.
      
      -------------------------
      Metric Decrease:
          MultiLayerModulesTH_OneShot
      Metric Increase:
          T12425
          T13386
          hard_hole_fits
      -------------------------
      413217ba
  13. May 08, 2024
  14. May 07, 2024
    • Arsen Arsenović's avatar
      Split out the C-- preprocessor, and make it pass -g0 · 25b0b404
      Arsen Arsenović authored and Marge Bot's avatar Marge Bot committed
      Previously, C-- was processed with the C preprocessor program.  This
      means that it inherited flags passed via -optc.  A flag that is somewhat
      often passed through -optc is -g.  At certain -g levels (>=2), GCC
      starts emitting defines *after* preprocessing, for the purposes of
      debug info generation.  This is not useful for the C-- compiler, and, in
      fact, causes lexer errors.  We can suppress this effect (safely, if
      supported) via -g0.
      
      As a workaround, in older versions of GCC (<=10), GCC only emitted
      defines if a certain set of -g*3 flags was passed.  Newer versions check
      the debug level.  For the former, we filter out those -g*3 flags and,
      for the latter, we specify -g0 on top of that.
      
      As a compatible and effective solution, this change adds a C--
      preprocessor distinct from the C compiler and preprocessor, but that
      keeps its flags.  The command line produced for C-- preprocessing now
      looks like:
      
        $pgmCmmP $optCs_without_g3 $g0_if_supported $optCmmP
      
      Closes: #24474
      25b0b404
  15. May 05, 2024
  16. May 04, 2024
  17. Apr 28, 2024
  18. Apr 21, 2024
  19. Apr 20, 2024
  20. Apr 17, 2024
  21. Apr 12, 2024
    • Finley McIlwaine's avatar
      Correct default -funfolding-use-threshold in docs · a1c24df0
      Finley McIlwaine authored and Marge Bot's avatar Marge Bot committed
      a1c24df0
    • Ben Gamari's avatar
      users-guide: Clarify language extension documentation · 6e18ce2b
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Over the years the users guide's language extension documentation has
      gone through quite a few refactorings. In the process some of the
      descriptions have been rendered non-sensical. For instance, the
      description of `NoImplicitPrelude` actually describes the semantics of
      `ImplicitPrelude`.
      
      To fix this we:
      
       * ensure that all extensions are named in their "positive" sense (e.g.
         `ImplicitPrelude` rather than `NoImplicitPrelude`).
       * rework the documentation to avoid flag-oriented wording
         like "enable" and "disable"
       * ensure that the polarity of the documentation is consistent with
         reality.
      
      Fixes #23895.
      6e18ce2b
  22. Apr 03, 2024
    • Duncan Coutts's avatar
      Include the default I/O manager in the +RTS --info output · c7d3e3a3
      Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
      Document the extra +RTS --info output in the user guide
      c7d3e3a3
    • Duncan Coutts's avatar
      Add a new trace class for the iomanager · b48805b9
      Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
      It makes sense now for it to be separate from the scheduler class of
      tracers.
      
      Enabled with +RTS -Do. Document the -Do debug flag in the user guide.
      b48805b9
    • Duncan Coutts's avatar
      Change the handling of the RTS flag --io-manager= · 85b0f87a
      Duncan Coutts authored and Marge Bot's avatar Marge Bot committed
      Now instead of it being just used on Windows to select between the WinIO
      vs the MIO or Win32-legacy I/O managers, it is now used on all platforms
      for selecting the I/O manager to use.
      
      Right now it remains the case that there is only an actual choice on
      Windows, but that will change later.
      
      Document the --io-manager flag in the user guide.
      
      This change is also reflected in the RTS flags types in the base
      library. Deprecate the export of IoSubSystem from GHC.RTS.Flags with a
      message to import it from GHC.IO.Subsystem.
      
      The way the 'IoSubSystem' is detected also changes. Instead of looking
      at the RTS flag, there is now a C bool global var in the RTS which gets
      set on startup when the I/O manager is selected. This bool var says
      whether the selected I/O manager classifies as "native" on Windows,
      which in practice means the WinIO I/O manager has been selected.
      
      Similarly, the is_io_mng_native_p RTS helper function is re-implemented
      in terms of the selected I/O manager, rather than based on the RTS
      flags.
      
      We do however remove the ./configure --native-io-manager flag because
      we're bringing the WinIO/MIO/Win32-legacy choice under the new general
      scheme for selecting I/O managers, and that new scheme involves no
      ./configure time user choices, just runtime RTS flag choices.
      85b0f87a
  23. Mar 23, 2024
  24. Mar 19, 2024
    • Krzysztof Gogolewski's avatar
      Minor misc cleanups · 594bee0b
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - GHC.HsToCore.Foreign.JavaScript: remove dropRuntimeRepArgs;
        boxed tuples don't take RuntimeRep args
      - GHC.HsToCore.Foreign.Call: avoid partial pattern matching
      - GHC.Stg.Unarise: strengthen the assertion; we can assert that
        non-rubbish literals are unary rather than just non-void
      - GHC.Tc.Gen.HsType: make sure the fsLit "literal" rule fires
      - users_guide/using-warnings.rst: remove -Wforall-identifier,
        now deprecated and does nothing
      - users_guide/using.rst: fix formatting
      - andy_cherry/test.T: remove expect_broken_for(23272...), 23272 is fixed
      
      The rest are simple cleanups.
      594bee0b
  25. Mar 10, 2024
  26. Mar 09, 2024
  27. Mar 08, 2024
  28. Mar 06, 2024
Loading