Skip to content
Snippets Groups Projects
  1. Feb 13, 2024
    • Cheng Shao's avatar
      testsuite: add opts.target_wrapper · c47ba1c3
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This commit adds opts.target_wrapper which allows overriding the
      target wrapper on a per test case basis when testing a cross target.
      This is used when testing the wasm backend's JSFFI functionality; the
      rest of the cases are tested using wasmtime, though the jsffi cases
      are tested using the node.js based test runner.
      c47ba1c3
  2. Feb 12, 2024
  3. Feb 07, 2024
    • jeffrey young's avatar
      ts: add wasm_arch, heapprof002 wasm extension · 75a31379
      jeffrey young authored and Marge Bot's avatar Marge Bot committed
      75a31379
    • jeffrey young's avatar
      ts: add compile_artifact, ignore_extension flag · 569b4c10
      jeffrey young authored and Marge Bot's avatar Marge Bot committed
      In b5213542 the testsuite gained the
      capability to collect generic metrics. But this assumed that the test
      was not linking and producing artifacts and we only wanted to track
      object files, interface files, or build artifacts from the compiler
      build. However, some backends, such as the JS backend, produce artifacts when
      compiling, such as the jsexe directory which we want to track.
      
      This patch:
      
      - tweaks the testsuite to collect generic metrics on any build artifact
      in the test directory.
      
      - expands the exe_extension function to consider windows and adds the
      ignore_extension flag.
      
      - Modifies certain tests to add the ignore_extension flag. Tests such as
      heaprof002 expect a .ps file, but on windows without ignore_extensions
      the testsuite will look for foo.exe.ps. Hence the flag.
      
      - adds the size_hello_artifact test
      569b4c10
  4. Jan 20, 2024
  5. Jan 10, 2024
  6. Dec 14, 2023
  7. Dec 03, 2023
  8. Nov 28, 2023
  9. Nov 27, 2023
    • Matthew Pickering's avatar
      testsuite: Add mechanism to collect generic metrics · b5213542
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      * Generalise the metric logic by adding an additional field which
        allows you to specify how to query for the actual value. Previously
        the method of querying the baseline value was abstracted (but always
        set to the same thing).
      
      * This requires rejigging how the stat collection works slightly but now
        it's more uniform and hopefully simpler.
      
      * Introduce some new "generic" helper functions for writing generic
        stats tests.
      
        - collect_size ( deviation, path )
          Record the size of the file as a metric
      
        - stat_from_file ( metric, deviation, path )
          Read a value from the given path, and store that as a metric
      
        - collect_generic_stat ( metric, deviation, get_stat)
          Provide your own `get_stat` function, `lambda way: <Int>`, which
          can be used to establish the current value of the metric.
      
        - collect_generic_stats ( metric_info ):
          Like collect_generic_stat but provide the whole dictionary of metric
          definitions.
      
          { metric: {
              deviation: <Int>
              current: lambda way: <Int>
              } }
      
      * Introduce two new "size" metrics for keeping track of build products.
          - `size_hello_obj` - The size of `hello.o` from compiling hello.hs
          - `libdir` - The total size of the `libdir` folder.
      
      * Track the number of modules in the AST tests
         - CountDepsAst
         - CountDepsParser
      
      This lays the infrastructure for #24191 #22256 #17129
      b5213542
  10. Aug 30, 2023
  11. Aug 22, 2023
    • Krzysztof Gogolewski's avatar
      Testsuite cleanup · 52a6d868
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - Remove misleading help text in perf_notes, ways are not metrics
      - Remove no_print_summary - this was used for Phabricator
      - In linters tests, run 'git ls-files' just once.
        Previously, it was called on each has_ls_files()
      - Add ghc-prim.cabal to gitignore, noticed in #23726
      - Remove ghc-prim.cabal, it was accidentally committed in 524c60c8
      52a6d868
  12. Aug 04, 2023
  13. Jul 14, 2023
  14. Jul 08, 2023
    • Oleg Grenrus's avatar
      Add warn_and_run test kind · a9bc20cb
      Oleg Grenrus authored and Marge Bot's avatar Marge Bot committed
      This is a compile_and_run variant which also captures the GHC's
      stderr. The warn_and_run name is best I can come up with,
      as compile_and_run is taken.
      
      This is useful specifically for testing warnings.  We want to test that
      when warning triggers, and it's not a false positive, i.e. that the
      runtime behaviour is indeed "incorrect".
      
      As an example a single test is altered to use warn_and_run
      a9bc20cb
  15. Jul 07, 2023
    • Ben Gamari's avatar
      testsuite: Allow preservation of unexpected output · 9955eead
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Here we introduce a new flag to the testsuite driver,
      --unexpected-output-dir=<dir>, which allows the user to ask
      the driver to preserve unexpected output from tests. The intent is for
      this to be used in CI to allow users to more easily fix unexpected
      platform-dependent output.
      9955eead
  16. Jul 05, 2023
  17. Jun 21, 2023
  18. Jun 14, 2023
  19. Jun 13, 2023
  20. Jun 02, 2023
  21. Jun 01, 2023
    • Krzysztof Gogolewski's avatar
      Fix testsuite skipping Lint · 2c38551e
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      setTestOpts() is used to modify the test options for an entire .T file,
      rather than a single test.
      If there was a test using collect_compiler_stats, all of the tests
      in the same file had lint disabled.
      
      Fixes #21247
      2c38551e
  22. May 30, 2023
    • Matthew Pickering's avatar
      testsuite: Pass -kb16k -kc128k for performance tests · b4816919
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Setting a larger stack chunk size gives a greater protection
      from stack thrashing (where the repeated overflow/underflow allocates a lot of
      stack chunks which sigificantly impact allocations). This
      stabilises some tests against differences cause by more things being
      pushed onto the stack.
      
      The performance tests are generally testing work done by the compiler,
      using allocation as a proxy, so removing/stabilising the allocations due
      to the stack gives us more stable tests which are also more sensitive
      to actual changes in compiler performance.
      
      The tests which increase are ones where we compile a lot of modules, and
      for each module we spawn a thread to compile the module in. Therefore
      increasing these numbers has a multiplying effect on these tests because
      there are many more stacks which we can increase in size.
      
      The most significant improvements though are cases such as T8095 which
      reduce significantly in allocations (30%). This isn't a performance
      improvement really but just helps stabilise the test against this
      threshold set by the defaults.
      
      Fixes #23439
      
      -------------------------
      Metric Decrease:
          InstanceMatching
          T14683
          T8095
          T9872b_defer
          T9872d
          T9961
          hie002
          T19695
          T3064
      Metric Increase:
          MultiLayerModules
          T13701
          T14697
      -------------------------
      b4816919
  23. May 25, 2023
  24. May 12, 2023
  25. May 11, 2023
    • sheaf's avatar
      Add fused multiply-add instructions · 87eebf98
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch adds eight new primops that fuse a multiplication and an
      addition or subtraction:
      
        - `{fmadd,fmsub,fnmadd,fnmsub}{Float,Double}#`
      
      fmadd x y z is x * y + z, computed with a single rounding step.
      
      This patch implements code generation for these primops in the following
      backends:
      
        - X86, AArch64 and PowerPC NCG,
        - LLVM
        - C
      
      WASM uses the C implementation. The primops are unsupported in the
      JavaScript backend.
      
      The following constant folding rules are also provided:
      
        - compute a * b + c when a, b, c are all literals,
        - x * y + 0 ==> x * y,
        - ±1 * y + z ==> z ± y and x * ±1 + z ==> z ± x.
      
      NB: the constant folding rules incorrectly handle signed zero.
      This is a known limitation with GHC's floating-point constant folding
      rules (#21227), which we hope to resolve in the future.
      87eebf98
  26. May 04, 2023
    • Rodrigo Mesquita's avatar
      Add hashes to unit-ids created by hadrian · db4be339
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      This commit adds support for computing an inputs hash for packages
      compiled by hadrian. The result is that ABI incompatible packages should
      be given different hashes and therefore be distinct in a cabal store.
      
      Hashing is enabled by the `--flag`, and is off by default as the hash
      contains a hash of the source files. We enable it when we produce
      release builds so that the artifacts we distribute have the right unit
      ids.
      db4be339
  27. Apr 27, 2023
  28. Apr 11, 2023
  29. Mar 30, 2023
    • Cheng Shao's avatar
      testsuite: asyncify the testsuite driver · ea853ff0
      Cheng Shao authored
      This patch refactors the testsuite driver, gets rid of multi-threading
      logic for running test cases concurrently, and uses asyncio &
      coroutines instead. This is not yak shaving for its own sake; the
      previous multi-threading logic is prone to livelock/deadlock
      conditions for some reason, even if the total number of threads is
      bounded to a thread pool's capacity.
      
      The asyncify change is an internal implementation detail of the
      testsuite driver and does not impact most GHC maintainers out there.
      The patch does not touch the .T files, test cases can be
      added/modified the exact same way as before.
      ea853ff0
    • Cheng Shao's avatar
      testsuite: use context variable instead of thread-local variable · 0149f32f
      Cheng Shao authored
      This patch changes a thread-local variable to context variable
      instead, which works as intended when the testsuite transitions to use
      asyncio & coroutines instead of multi-threading to concurrently run
      test cases. Note that this also raises the minimum Python version to
      3.7.
      0149f32f
Loading