Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #84791

Closed
wants to merge 14 commits into from

Commits on Apr 10, 2021

  1. Allow setting target_family to multiple values

    This enables us to set more generic labels shared between targets. For
    example `target_family="wasm"` across all targets that are conceptually
    "wasm".
    
    See rust-lang/reference#1006
    nagisa committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    4afea69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dfe3c3c View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2021

  1. Configuration menu
    Copy the full SHA
    b9a1e69 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2021

  1. unignore a couple of tests

    mark-i-m committed Apr 28, 2021
    Configuration menu
    Copy the full SHA
    cf46fb1 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2021

  1. fix test

    mark-i-m committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    6697b0d View commit details
    Browse the repository at this point in the history
  2. [Arm64] use isb instruction instead of yield in spin loops

    On arm64 we have seen on several databases that ISB (instruction synchronization
    barrier) is better to use than yield in a spin loop.  The yield instruction is a
    nop.  The isb instruction puts the processor to sleep for some short time.  isb
    is a good equivalent to the pause instruction on x86.
    
    Below is an experiment that shows the effects of yield and isb on Arm64 and the
    time of a pause instruction on x86 Intel processors.  The micro-benchmarks use
    https://github.com/google/benchmark.git
    
    $ cat a.cc
    static void BM_scalar_increment(benchmark::State& state) {
      int i = 0;
      for (auto _ : state)
        benchmark::DoNotOptimize(i++);
    }
    BENCHMARK(BM_scalar_increment);
    static void BM_yield(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("yield"::);
    }
    BENCHMARK(BM_yield);
    static void BM_isb(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("isb"::);
    }
    BENCHMARK(BM_isb);
    BENCHMARK_MAIN();
    
    $ g++ -o run a.cc -O2 -lbenchmark -lpthread
    $ ./run
    
    --------------------------------------------------------------
    Benchmark                    Time             CPU   Iterations
    --------------------------------------------------------------
    
    AWS Graviton2 (Neoverse-N1) processor:
    BM_scalar_increment      0.485 ns        0.485 ns   1000000000
    BM_yield                 0.400 ns        0.400 ns   1000000000
    BM_isb                    13.2 ns         13.2 ns     52993304
    
    AWS Graviton (A-72) processor:
    BM_scalar_increment      0.897 ns        0.874 ns    801558633
    BM_yield                 0.877 ns        0.875 ns    800002377
    BM_isb                    13.0 ns         12.7 ns     55169412
    
    Apple Arm64 M1 processor:
    BM_scalar_increment      0.315 ns        0.315 ns   1000000000
    BM_yield                 0.313 ns        0.313 ns   1000000000
    BM_isb                    9.06 ns         9.06 ns     77259282
    
    static void BM_pause(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("pause"::);
    }
    BENCHMARK(BM_pause);
    
    Intel Skylake processor:
    BM_scalar_increment      0.295 ns        0.295 ns   1000000000
    BM_pause                  41.7 ns         41.7 ns     16780553
    
    Tested on Graviton2 aarch64-linux with `./x.py test`.
    Sebastian Pop committed Apr 29, 2021
    Configuration menu
    Copy the full SHA
    c064b65 View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2021

  1. Update compiler-builtins to 0.1.41 to get fix for outlined atomics

    This should fix linking of other C code (and soon Rust-generated code)
    on aarch64 musl.
    joshtriplett committed Apr 30, 2021
    Configuration menu
    Copy the full SHA
    49e67c3 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2021

  1. test: *sneezes*

    BoxyUwU committed May 1, 2021
    Configuration menu
    Copy the full SHA
    3905433 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#84072 - nagisa:target-family-two-the-movie,…

    … r=petrochenkov
    
    Allow setting `target_family` to multiple values, and implement `target_family="wasm"`
    
    As per the conclusion in [this thread](https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Are.20we.20comfortable.20with.20adding.20an.20insta-stable.20cfg.28wasm.29.3F/near/233158441), this implements an ability to specify any number of `target_family` values, allowing for more flexible generic groups, or "families", to be created than just the OS-based unix/windows dichotomy.
    
    cc rust-lang/reference#1006
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    12de684 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#84392 - dario23:fmt-assert-args-pub, r=vark…

    …or,RalfJung
    
    Make AssertKind::fmt_assert_args public
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    18371c8 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#84410 - BoxyUwU:blue, r=varkor

    Fix generic arg mismatch errors being ignored with explicit late bound lifetimes
    
    Fixes rust-lang#83466
    
    r? `@varkor`
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    637b1e9 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#84638 - mark-i-m:unignore-tests, r=Mark-Sim…

    …ulacrum
    
    Unignore a couple of tests
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    7d32933 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#84725 - sebpop:arm64-isb, r=joshtriplett

    [Arm64] use isb instruction instead of yield in spin loops
    
    On arm64 we have seen on several databases that ISB (instruction synchronization
    barrier) is better to use than yield in a spin loop.  The yield instruction is a
    nop.  The isb instruction puts the processor to sleep for some short time.  isb
    is a good equivalent to the pause instruction on x86.
    
    Below is an experiment that shows the effects of yield and isb on Arm64 and the
    time of a pause instruction on x86 Intel processors.  The micro-benchmarks use
    https://github.com/google/benchmark.git
    
    ```
    $ cat a.cc
    static void BM_scalar_increment(benchmark::State& state) {
      int i = 0;
      for (auto _ : state)
        benchmark::DoNotOptimize(i++);
    }
    BENCHMARK(BM_scalar_increment);
    static void BM_yield(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("yield"::);
    }
    BENCHMARK(BM_yield);
    static void BM_isb(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("isb"::);
    }
    BENCHMARK(BM_isb);
    BENCHMARK_MAIN();
    
    $ g++ -o run a.cc -O2 -lbenchmark -lpthread
    $ ./run
    
    --------------------------------------------------------------
    Benchmark                    Time             CPU   Iterations
    --------------------------------------------------------------
    
    AWS Graviton2 (Neoverse-N1) processor:
    BM_scalar_increment      0.485 ns        0.485 ns   1000000000
    BM_yield                 0.400 ns        0.400 ns   1000000000
    BM_isb                    13.2 ns         13.2 ns     52993304
    
    AWS Graviton (A-72) processor:
    BM_scalar_increment      0.897 ns        0.874 ns    801558633
    BM_yield                 0.877 ns        0.875 ns    800002377
    BM_isb                    13.0 ns         12.7 ns     55169412
    
    Apple Arm64 M1 processor:
    BM_scalar_increment      0.315 ns        0.315 ns   1000000000
    BM_yield                 0.313 ns        0.313 ns   1000000000
    BM_isb                    9.06 ns         9.06 ns     77259282
    ```
    
    ```
    static void BM_pause(benchmark::State& state) {
      for (auto _ : state)
        asm volatile("pause"::);
    }
    BENCHMARK(BM_pause);
    
    Intel Skylake processor:
    BM_scalar_increment      0.295 ns        0.295 ns   1000000000
    BM_pause                  41.7 ns         41.7 ns     16780553
    ```
    
    Tested on Graviton2 aarch64-linux with `./x.py test`.
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    5067c28 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#84764 - joshtriplett:update-compiler-builti…

    …ns, r=Amanieu
    
    Update compiler-builtins to 0.1.41 to get fix for outlined atomics
    
    This should fix linking of other C code (and soon Rust-generated code)
    on aarch64 musl.
    Dylan-DPC authored May 1, 2021
    Configuration menu
    Copy the full SHA
    9d9b26b View commit details
    Browse the repository at this point in the history