Skip to content

[Perf] Linux/arm64: 2 Regressions on 6/2/2026 2:34:36 PM +00:00 #128996

Closed

Description

@performanceautofiler

Run Information

Name Value
Architecture arm64
OS ubuntu 22.04
Queue AmpereUbuntu
Baseline 0dfd787f3c16e18e1641d20d8cce1789c9488b00
Compare db876108487455505360c75f5a978436a884f4d7
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Collections.ContainsTrue<Int32>

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
378.12 μs 447.24 μs 1.18 0.12 False
28.66 μs 31.13 μs 1.09 0.04 False

graph
graph
Test Report

Repro

General Docs link: https://github.com/dotnet/performance/blob/main/docs/benchmarking-workflow-dotnet-runtime.md

git clone https://github.com/dotnet/performance.git
python3 .\performance\scripts\benchmarks_ci.py -f net8.0 --filter 'System.Collections.ContainsTrue<Int32>*'
Details

System.Collections.ContainsTrue<Int32>.ImmutableList(Size: 512)

ETL Files

Histogram

JIT Disasms

System.Collections.ContainsTrue<Int32>.List(Size: 512)

ETL Files

Histogram

JIT Disasms

Docs

Profiling workflow for dotnet/runtime repository
Benchmarking workflow for dotnet/runtime repository

Activity

  1. added
    os-linux
    runtime-coreclr
    untriaged
    on Jun 4, 2026
  2. LoopedBard3 commented on Jun 4, 2026

    @LoopedBard3
    Member

    🔍 Automated Triage Analysis

    Summary: Verified regression in ImmutableList(Size: 512) — caused by commit a2ec76b ("JIT: add profitability heuristic for loop cloning (#128870)"). ⚠️ Note: Historical data shows bimodal behavior — bisection result may be unreliable.

    Finding Confidence: 3/5 (analysis accuracy)
    Regression Confidence: 3/5 (likelihood of true regression)

    Likely Cause: a2ec76b0691e5911908b7617f9c42d3654ef6988

    🤖 Proposed Next Actions: Uncertain — flag for re-triage — 2 proposed (rule R5_look_again — see Full Analysis for the table).

    📊 Full Analysis (click to expand)

    Summary: Clear regression in System.Collections.ContainsTrue.ImmutableList (+18.3%, z=3.41) attributed to commit a2ec76b which adds a loop cloning profitability heuristic that may reject previously-cloned loops. Finding confidence 4/5 (298 historical runs, strong statistical baseline), regression confidence 4/5 (exact timestamp match, step change, direct JIT loop optimization path). The List test shows pre-existing drift rather than a new regression from this commit range.

    Issue Overview

    • Issue: [Perf] Linux/arm64: 2 Regressions on 6/2/2026 2:34:36 PM +00:00 #128996 - [Perf] Linux/arm64: 2 Regressions on 6/2/2026 2:34:36 PM +00:00
    • Date: 2026-06-02 | Queue: Ubuntu.2204.Arm64.Perf | OS/Arch: linux/arm64
    • Commits: 0dfd787f3c16 → db876108487 (33 commits)
    • Labels: untriaged, perf-regression, arch-arm64, os-linux, runtime-coreclr, ampere, kind-micro, compilationmode-tiered, runkind-micro
    • Runtime Stack: Desktop + CoreCLR (implicit)
    • Historical Data: Available (298 prior runs, 6 after runs)

    Test Analysis

    Test Name Baseline Compare Δ% μ σ n z Thresh% Noise? Assessment
    ImmutableList(Size: 512) 378.12 μs 447.24 μs +18.28% 383.74 μs 18.61 μs 298 3.41 9.7% N Step change, clear regression
    List(Size: 512) 28.66 μs 31.13 μs +8.61% 29.18 μs 0.83 μs 298 2.34 5.71% N Drift pattern, pre-existing elevation

    Legend: μ=mean, σ=stddev, n=runs, z=z-score, Thresh%=adaptive threshold

    Finding Confidence: 4/5 - Excellent historical data (298 runs), sufficient after-runs (6) with tight clustering, strong statistical baselines for both tests.

    Candidate Stack Relevance

    Commit Touched Paths (summary) Relevance Notes
    a2ec76b0691e src/coreclr/jit/loopcloning.cpp, src/coreclr/jit/compiler.h, src/coreclr/jit/jitconfigvalues.h Relevant JIT loop cloning heuristic; directly affects CoreCLR codegen on arm64
    a4461ef220fe src/coreclr/vm/arm64/asmhelpers.S, src/coreclr/vm/stackwalk.cpp, unwinder Relevant ARM64 PAC-RET support; but feature disabled by default
    f2f70d9375fa src/coreclr/jit/morph.cpp Relevant JIT relational comparison optimization
    41a0abd2e427 src/coreclr/vm/virtualcallstub.cpp Relevant VSD dispatch cache locking; unlikely perf impact in steady state
    92296631121c src/coreclr/jit/fginline.cpp, src/coreclr/jit/compiler.cpp Relevant JIT post-inline cleanup for no-return calls

    Confirmed Regressions

    System.Collections.ContainsTrue.ImmutableList(Size: 512) (+18.28%)

    • Delta: 378.12 μs → 447.24 μs (+18.28%)
    • Historical Context: μ=383.74 μs (σ=18.61 μs, n=298); z-score=3.41; adaptive threshold=9.7%
    • Assessment: Step change. All 6 after-values cluster tightly at 447–451 μs vs recent before-values near 376 μs. Note: historical before-values are bimodal (~375k and ~443k ns clusters) but recent tail was stable at the lower cluster.
    • Finding Confidence: 4/5 - Strong historical data, clear step change, tight after-cluster
    • Regression Confidence: 4/5 - Exact timestamp match with commit, z=3.41 (well above 2.0 threshold), direct JIT optimization path affecting loop-heavy code
    • Likely Cause: a2ec76b0691e - "JIT: add profitability heuristic for loop cloning"
      • Affected Areas: JIT / Loop Optimization / Collections traversal
      • Stack Relevance: Relevant
      • Rationale: This commit adds a profitability gate (optCloningHeuristic) that can reject loop cloning candidates with insufficient per-call benefit ratio. ImmutableList.Contains traverses an AVL tree using an iterative enumerator pattern with loops. If the loop body was previously cloned (e.g., to eliminate type/bounds checks in the iteration) and is now rejected by the new heuristic (body nodes exceed benefit threshold), the resulting unoptimized loop would be significantly slower. The commit timestamp (2026-06-02T14:34:36) is an exact match to the regression date. The +18% regression magnitude is consistent with losing loop cloning optimization on a tight iteration loop.
      • Candidates Considered:
        • a2ec76b0691e - JIT loop cloning heuristic, exact timestamp match, directly suppresses optimizations
        • a4461ef220fe - ARM64 PAC-RET support, but explicitly disabled by default
        • f2f70d9375fa - JIT relational comparison optimization (EQ/NE), unlikely to regress Contains
        • 92296631121c - JIT post-inline no-return cleanup, unlikely to affect hot loop
    • Verification Status: Not verified

    System.Collections.ContainsTrue.List(Size: 512) (+8.61%)

    • Delta: 28.66 μs → 31.13 μs (+8.61%)
    • Historical Context: μ=29.18 μs (σ=0.83 μs, n=298); z-score=2.34; adaptive threshold=5.71%
    • Assessment: Drift pattern. Historical analysis shows the before-series was already elevated (earlyBeforeMean ~28.88 μs vs recentBeforeMean ~30.86 μs). The compare value (31.13 μs) is only ~0.9% above the recent before mean, indicating most of the regression occurred within the before window and predates the compare commit.
    • Finding Confidence: 4/5 - Strong historical data clearly shows pre-existing drift
    • Regression Confidence: 2/5 - While statistically above threshold, the drift predates this commit range. The compare value merely continues an already-elevated plateau.
    • Likely Cause: Pre-existing drift; root cause likely predates baseline commit
      • Affected Areas: JIT / Collections / List iteration
      • Stack Relevance: Unknown (cause predates this range)
      • Rationale: The drift began in the before-series (values jumped from ~28.6 μs to ~30.8 μs around indices 73–87 in historical data). The compare run continues this elevated plateau rather than introducing a new step. The root cause is outside the current commit range.
      • Candidates Considered: None within this range are strong candidates given the drift pattern.
    • Verification Status: Not verified

    Open Questions

    • Historical Data: Bimodal distribution in ImmutableList before-values (~375k and ~443k ns clusters) inflates variance; recent values were stable at lower cluster before stepping to higher level
    • Confidence Limitations: Loop cloning attribution is based on mechanism analysis (not yet verified via RunWithBuildAtHash); the new heuristic's rejection of specific loops needs confirmation
    • Verification Needed: Run ImmutableList benchmark at baseline and compare commits to confirm regression reproduces; optionally set JitCloneLoopsMinPerCallRatio=0 to disable heuristic and verify it restores performance
    • Bisection Status: Not performed (single high-confidence candidate identified via exact timestamp match)

    Recommended Actions

    1. Verify regression: Run RunWithBuildAtHash on commits 0dfd787f3c16 and a2ec76b0691e with System.Collections.ContainsTrue<Int32>.ImmutableList(Size: 512) to confirm the loop cloning heuristic commit is the cause
    2. JIT dump analysis: Collect JIT dumps with JitCloneLoopsMinPerCallRatio=0 vs default to confirm loop cloning is being rejected for the ImmutableList iteration loop
    3. Heuristic tuning: If confirmed, consider adjusting JitCloneLoopsMinPerCallRatio threshold or adding an exception for tree-traversal patterns in ImmutableList
    4. List drift: Investigate separately; the List regression predates this commit range and requires looking at earlier commits (around 73–87 runs before regression date)

    Bisection Results

    Test Status Culprit Commit Relevance Reported Diff (issue) Bisected Diff (at culprit) Duration
    ImmutableList(Size: 512) ✅ Success a2ec76b0691e ✅ RELATED 378.1→447.2 μs (+18%) 378.3→447.2 μs (+18%) 1138s
    List(Size: 512) ❌ failed - - 28.7→31.1 ns (+9%) — (not measured) 1280s

    Total bisection time: 2418s
    Success rate: 1/2 tests

    System.Collections.ContainsTrue.ImmutableList(Size: 512)

    • Culprit: a2ec76b0691e
    • Commit Message: JIT: add profitability heuristic for loop cloning (JIT: add profitability heuristic for loop cloning #128870)
    • Relevance: RELATED
    • Explanation: This commit adds a new JIT loop cloning profitability heuristic that can reject loop cloning candidates. The ImmutableList.Contains benchmark iterates through a list, and if the new heuristic rejects a previously-cloned loop, bounds-check elimination is lost, directly causing the ~18% regression in iteration performance.

    Helix jobs

    Job ID Submitted by bisection Last status
    9045667a-8546-42e5-a68e-1fd3d82a7257 ✅ submitted
    6486ad99-6108-46fa-b4e5-c358dcdb79df ✅ submitted
    1ccd7f05-73a5-4c4c-97eb-fa0db74a1a4b ✅ submitted

    Per-commit measurements

    Commit Position Measurements
    1feea2b91515 index 8 375.268 μs
    07fc3e76e84c index 16 374.883 μs
    7dc7499c8e5c index 17 377.446 μs
    4832002fd287 index 18 378.277 μs
    a2ec76b0691e index 19 447.181 μs
    b836f4b9a125 index 21 421.924 μs
    0701fbf3ec5b index 23 449.781 μs
    a4461ef220fe index 24 446.950 μs
    Bisection details

    …[earlier output omitted]

    1908b7617f9c42d3654ef6988`. Let me examine this commit.

    ● get_single_commit_summary (MCP: PerfTriageMcp) · owner: "dotnet", repo: "runtime", sha: "a2ec76b0…
    └ {"index":null,"sha":"a2ec76b0691e5911908b7617f9c42d3654ef6988","abbrevSh...

    The culprit is clearly identified. This is a JIT loop cloning heuristic change that could reject loop cloning opportunities previously beneficial for the ImmutableList iteration.

    BISECTION RESULT:
    - Culprit Commit: a2ec76b0691e5911908b7617f9c42d3654ef6988
    - Commit Message: JIT: add profitability heuristic for loop cloning (#128870)
    - Commits Tested: 8
    - Confidence: 4
    - Commit Relevance: RELATED
    - Relevance Explanation: This commit adds a new JIT loop cloning profitability heuristic that can reject loop cloning candidates. The ImmutableList.Contains benchmark iterates through a list, and if the new heuristic rejects a previously-cloned loop, bounds-check elimination is lost, directly causing the ~18% regression in iteration performance.
    - Baseline Value: 378277.03 ns
    - Culprit Value: 447180.77 ns
    - Summary: Bisected 33 commits in 3 Helix jobs. The regression appeared cleanly at commit a2ec76b0 (index 19), with the immediately preceding commit (4832002f) measuring at baseline. The step change is sharp and consistent across multiple regressed commits.
    
    HELIX JOBS:
    - 9045667a-8546-42e5-a68e-1fd3d82a7257
    - 6486ad99-6108-46fa-b4e5-c358dcdb79df
    - 1ccd7f05-73a5-4c4c-97eb-fa0db74a1a4b
    
    MEASUREMENTS:
    - 1feea2b915150fb6a8e20373897fa83e1b945d64 (index 8): 375268.28 ns
    - 07fc3e76e84c80c49b1c75ec5e2d8e05b2c24113 (index 16): 374883.22 ns
    - 7dc7499c8e5c223e38dfaea754b26eaa45afc3b3 (index 17): 377446.14 ns
    - 4832002fd28748322015287b8fb3b8126334865f (index 18): 378277.03 ns
    - a2ec76b0691e5911908b7617f9c42d3654ef6988 (index 19): 447180.77 ns
    - b836f4b9a12587928ee19487f793510f575ab347 (index 21): 421924.14 ns
    - 0701fbf3ec5bf3853727fe5da48b5032acac9c26 (index 23): 449781.20 ns
    - a4461ef220fee765e5b632178b8f935625f7077e (index 24): 446949.64 ns
    

    System.Collections.ContainsTrue.List(Size: 512)

    • Status: failed

    Helix jobs

    Job ID Submitted by bisection Last status
    ce3d7348-ef66-4a25-bea2-b1ff525f01db ✅ submitted
    06f72c0a-8a7c-4fac-ad86-fb96b5f4aed5 ✅ submitted
    7436ee74-6e76-40a9-9b0b-6411d4c026e9 ✅ submitted
    6f6c1e0b-e774-45a0-89e1-3078db3276d7 ✅ submitted

    Per-commit measurements

    Commit Position Measurements
    0dfd787f3c16 baseline 31.065 μs
    1dffd7eb11f1 commit 1 (run 1, 2) 30.774, 31.012 μs
    f2f70d9375fa commit 2 30.749 μs
    e9e3c8dbc927 commit 3 30.671 μs
    aef0e2b2a06c commit 5 30.607 μs
    41a0abd2e427 commit 7 30.754 μs
    1feea2b91515 commit 9 30.959 μs
    07fc3e76e84c commit 17 30.772 μs
    a4461ef220fe commit 25 30.636 μs
    Bisection details

    …[earlier output omitted]

    All measurements collected:

    No step change is visible — the baseline itself measures at the same level as all "regressed" commits. The reported 8.6% regression is not reproducible with the default tiered-JIT configuration on this queue.

    BISECTION FAILED:
    - Reason: No observable step change across the entire commit range; baseline commit measures at the same level as all subsequent commits
    - Helix Errors: None — all jobs completed successfully
    - What was attempted: Tested 10 commits across 4 Helix jobs (ce3d7348-ef66-4a25-bea2-b1ff525f01db, 06f72c0a-8a7c-4fac-ad86-fb96b5f4aed5, 7436ee74-6e76-40a9-9b0b-6411d4c026e9, 6f6c1e0b-e774-45a0-89e1-3078db3276d7). All measurements fall within 30,607–31,065 ns (~1.5% spread), with no discernible regression step. The baseline commit (0dfd787f3c16) itself measures 31,064.61, indistinguishable from the "regressed" commits.
    - What is needed: The regression may only manifest under a specific run configuration not reproducible by the bisection harness, or the autofile's reported values are from a different measurement methodology. Manual investigation or re-running with the exact autofile configuration is needed.
    
    HELIX JOBS:
    - ce3d7348-ef66-4a25-bea2-b1ff525f01db
    - 06f72c0a-8a7c-4fac-ad86-fb96b5f4aed5
    - 7436ee74-6e76-40a9-9b0b-6411d4c026e9
    - 6f6c1e0b-e774-45a0-89e1-3078db3276d7
    
    MEASUREMENTS:
    - 0dfd787f3c16 (baseline): 31064.61 ns
    - 1dffd7eb11f1 (commit 1, run 1): 30774.42 ns
    - 1dffd7eb11f1 (commit 1, run 2): 31012.48 ns
    - f2f70d9375fa (commit 2): 30748.60 ns
    - e9e3c8dbc927 (commit 3): 30671.26 ns
    - aef0e2b2a06c (commit 5): 30606.97 ns
    - 41a0abd2e427 (commit 7): 30754.12 ns
    - 1feea2b91515 (commit 9): 30958.85 ns
    - 07fc3e76e84c (commit 17): 30771.61 ns
    - a4461ef220fe (commit 25): 30636.00 ns
    

    🤖 Proposed Next Actions

    Rule: R5_look_again — Uncertain — flag for re-triage.

    Bimodal benchmark history — bisection results would be unreliable, so the cause is not auto-classified as known. Revisit once more historical data is available.

    # Action Status Details
    1 Add label 🕒 Planned look-again
    2 Remove label 🕒 Planned untriaged

    Generated by PerfTriageAgent on 2026-06-04 09:34 UTC

  3. DrewScoggins commented on Jun 4, 2026

    @DrewScoggins
    Member

    Seems related to #128870. Was found with bisection, but only found the regression for the ImmutableList case.

  4. added
    tenet-performance
    tenet-performance-benchmarks
    on Jun 4, 2026
  5. dotnet-policy-service commented on Jun 4, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-collections
    See info in area-owners.md if you want to be subscribed.

  6. AndyAyersMS commented on Jun 4, 2026

    @AndyAyersMS
    Member

    System.Collections.ContainsTrue<Int32>.List(Size: 512) seems to be windows ampere only, so possibly noise. It regressed on linux ampere back on 5/28.

    System.Collections.ContainsTrue<Int32>.ImmutableList(Size: 512) looks like it may repro more broadly, eg green is windows-x64-amd...

    Image
  7. removed
    untriaged
    on Jun 5, 2026
  8. added this to the 11.0.0 milestone on Jun 5, 2026
  9. added a commit that references this issue on Jun 10, 2026
    6e0b2d2
  10. locked and limited conversation to collaborators on Jul 11, 2026
  11. added a commit that references this issue on Jul 15, 2026
    25a24e7
  12. added a commit that references this issue on Jul 22, 2026
    52faddb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-arm64area-System.Collectionsos-linuxruntime-coreclrtenet-performancetenet-performance-benchmarks

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions