From b6a6af0bacac39b5c2afdc921c685f84555c1d40 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:39:58 +0000 Subject: [PATCH 1/6] Initial plan From 2f34ffedb23d6fb188c73cc2bd127ca86c08af0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:45:00 +0000 Subject: [PATCH 2/6] Filter out SPMI metric diffs smaller than +/- 0.01% Add a significance threshold to write_metricdiff_markdown_summary so that metric diffs are only reported when the percentage change is at least 0.01%. This prevents noise from expected variance when there are no actual code diffs. Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> --- src/coreclr/scripts/superpmi.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index 6c9740406ef036..b51e3a5beafd8f 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -3555,6 +3555,13 @@ def write_metricdiff_markdown_summary(write_fh, base_jit_options, diff_jit_optio def fmt_val(v): return "{:,.2f}".format(v) if isinstance(v, float) else "{:,d}".format(v) + def is_significant_metric_diff(base_val, diff_val): + if base_val == diff_val: + return False + if base_val == 0: + return diff_val != 0 + return abs(compute_pct(base_val, diff_val)) >= 0.01 + write_jit_options(base_jit_options, diff_jit_options, write_fh) # Collect the union of all metrics across all collections (preserving first-seen order) @@ -3564,7 +3571,7 @@ def fmt_val(v): metrics_with_diffs = set() for metric in all_metrics: significant_diffs = [(mch, base, diff) for (mch, _, base, diff) in metric_diffs - if metric in base and base[metric] != diff[metric]] + if metric in base and is_significant_metric_diff(base[metric], diff[metric])] if not significant_diffs: continue From 354ed5b0db6380b0f6c2ea7e8cdd57d5ff555032 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:57:17 +0000 Subject: [PATCH 3/6] Simplify: inline abs(compute_pct(...)) >= 0.01 check directly Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> --- src/coreclr/scripts/superpmi.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index b51e3a5beafd8f..eb54e479374c2b 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -3555,13 +3555,6 @@ def write_metricdiff_markdown_summary(write_fh, base_jit_options, diff_jit_optio def fmt_val(v): return "{:,.2f}".format(v) if isinstance(v, float) else "{:,d}".format(v) - def is_significant_metric_diff(base_val, diff_val): - if base_val == diff_val: - return False - if base_val == 0: - return diff_val != 0 - return abs(compute_pct(base_val, diff_val)) >= 0.01 - write_jit_options(base_jit_options, diff_jit_options, write_fh) # Collect the union of all metrics across all collections (preserving first-seen order) @@ -3571,7 +3564,7 @@ def is_significant_metric_diff(base_val, diff_val): metrics_with_diffs = set() for metric in all_metrics: significant_diffs = [(mch, base, diff) for (mch, _, base, diff) in metric_diffs - if metric in base and is_significant_metric_diff(base[metric], diff[metric])] + if metric in base and abs(compute_pct(base[metric], diff[metric])) >= 0.01] if not significant_diffs: continue From 97e1984fea6a83bda7d3d0285923107422e64e1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 22:22:51 +0000 Subject: [PATCH 4/6] Dummy JIT change to trigger SPMI pipeline Co-authored-by: EgorBo <523221+EgorBo@users.noreply.github.com> --- src/coreclr/jit/compiler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index 570dc36f1a6b0a..b0a3171ac391e0 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -1,5 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +// Dummy change to trigger SPMI pipeline. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX From fccf2986610c46fb24bf1cc5702c04a2fe38eb9c Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Wed, 18 Mar 2026 15:09:21 +0100 Subject: [PATCH 5/6] Update superpmi.py --- src/coreclr/scripts/superpmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/scripts/superpmi.py b/src/coreclr/scripts/superpmi.py index eb54e479374c2b..2a1833e4361f86 100644 --- a/src/coreclr/scripts/superpmi.py +++ b/src/coreclr/scripts/superpmi.py @@ -3564,7 +3564,7 @@ def fmt_val(v): metrics_with_diffs = set() for metric in all_metrics: significant_diffs = [(mch, base, diff) for (mch, _, base, diff) in metric_diffs - if metric in base and abs(compute_pct(base[metric], diff[metric])) >= 0.01] + if metric in base and abs(compute_pct(base[metric], diff[metric])) >= 0.001] if not significant_diffs: continue From 881270425ec4764edb698b7379d6b176841d9a70 Mon Sep 17 00:00:00 2001 From: Egor Bogatov Date: Wed, 18 Mar 2026 23:20:29 +0100 Subject: [PATCH 6/6] Update compiler.cpp --- src/coreclr/jit/compiler.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreclr/jit/compiler.cpp b/src/coreclr/jit/compiler.cpp index b0a3171ac391e0..570dc36f1a6b0a 100644 --- a/src/coreclr/jit/compiler.cpp +++ b/src/coreclr/jit/compiler.cpp @@ -1,6 +1,5 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -// Dummy change to trigger SPMI pipeline. /*XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX