Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d599e4b
Add 'memorydiff' SPMI command to measure JIT memory allocation diffs
Feb 27, 2026
797d16b
add memorydiff
Feb 27, 2026
fe11520
Merge branch 'main' into memorydiff-spmi
EgorBo Feb 28, 2026
17251d8
Update compiler.cpp
EgorBo Feb 28, 2026
ea26b05
Update jitmetadata.cpp
EgorBo Feb 28, 2026
5aa8b3f
Update fginline.cpp
EgorBo Feb 28, 2026
9281d3a
Apply suggestions from code review
EgorBo Feb 28, 2026
356f43d
Merge branch 'main' into memorydiff-spmi
EgorBo Feb 28, 2026
adc97bc
Update src/coreclr/scripts/superpmi_diffs_summarize.py
EgorBo Feb 28, 2026
ff24265
Address PR feedback: rename memorydiff to metricdiff, fix robustness …
Feb 28, 2026
7342f1d
Fix Metrics.report() not called in Release builds
Feb 28, 2026
c399188
fix metrics
Feb 28, 2026
672c394
Generalize metricdiff to track multiple JIT metrics
Feb 28, 2026
e1002e4
Always include details table in long metricdiff summary
Feb 28, 2026
7fbd6b3
Group metricdiff details by metric (one table per metric)
Feb 28, 2026
6dcfb39
Skip duplicate metric sections in metricdiff details
Feb 28, 2026
491f8de
Discover and report all JIT metrics from CSV automatically
Feb 28, 2026
e962dd9
Fix compile stats tracked per-side and rename memory->metric
Feb 28, 2026
a8ce089
clang format
Feb 28, 2026
cb71c96
Disable JitReportMetrics for tpdiff/asmdiffs, show +infinity for 0->N…
Feb 28, 2026
b7f03a3
Apply suggestions from code review
EgorBo Feb 28, 2026
b382c07
cleanup
Mar 2, 2026
b25be21
Merge branch 'main' of https://github.com/dotnet/runtime into memoryd…
Mar 2, 2026
c0e446c
fix issues
Mar 2, 2026
c502ddc
a few fixes
Mar 2, 2026
819f452
fix rendering
Mar 2, 2026
ac278b9
feedback
Mar 2, 2026
b76508c
feedback
Mar 3, 2026
8dc19a4
remove the hashset
Mar 3, 2026
ed22710
remove fmt_pct
Mar 3, 2026
7739d01
Fix duplicate metrics in metricdiff markdown summary
Mar 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions eng/pipelines/coreclr/superpmi-diffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,19 @@ extends:
diffType: tpdiff
baseJitOptions: ${{ parameters.spmi_jitoptions_base }}
diffJitOptions: ${{ parameters.spmi_jitoptions_diff }}

- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/coreclr/templates/superpmi-diffs-job.yml
buildConfig: checked
platforms:
- windows_x64
- windows_x86
- linux_x64
helixQueueGroup: superpmi-diffs
helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml
jobParameters:
condition: not(eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_jiteeversionguid.containsChange'], true))
diffType: metricdiff
baseJitOptions: ${{ parameters.spmi_jitoptions_base }}
diffJitOptions: ${{ parameters.spmi_jitoptions_diff }}
5 changes: 4 additions & 1 deletion eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:
enableTelemetry: false # optional -- enable for telemetry
liveLibrariesBuildConfig: '' # optional -- live-live libraries configuration to use for the run
helixQueues: '' # required -- Helix queues
diffType: 'asmdiffs' # required -- 'asmdiffs', 'tpdiff', or 'all'
diffType: 'asmdiffs' # required -- 'asmdiffs', 'tpdiff', 'metricdiff', or 'all'
baseJitOptions: '' # e.g. JitStressModeNames=STRESS_PHYSICAL_PROMOTION;JitFullyInt=1
diffJitOptions: ''

Expand Down Expand Up @@ -84,6 +84,9 @@ jobs:
- ${{ if eq(parameters.diffType, 'tpdiff') }}:
- name: SetupScriptDirs
value: '-release_directory $(releaseProductRootFolderPath)'
- ${{ if eq(parameters.diffType, 'metricdiff') }}:
- name: SetupScriptDirs
value: '-release_directory $(releaseProductRootFolderPath)'
- ${{ if eq(parameters.diffType, 'all') }}:
- name: SetupScriptDirs
value: '-checked_directory $(buildProductRootFolderPath) -release_directory $(releaseProductRootFolderPath)'
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/coreclr/templates/superpmi-diffs-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
variables: {}
helixQueues: ''
runJobTemplate: '/eng/pipelines/coreclr/templates/run-superpmi-diffs-job.yml'
diffType: 'asmdiffs' # required -- 'asmdiffs', 'tpdiff', or 'all'
diffType: 'asmdiffs' # required -- 'asmdiffs', 'tpdiff', 'metricdiff', or 'all'
baseJitOptions: '' # e.g. JitStressModeNames=STRESS_PHYSICAL_PROMOTION;JitFullyInt=1
diffJitOptions: ''

Expand All @@ -32,14 +32,14 @@ jobs:
dependsOn:
- ${{ if in(parameters.diffType, 'asmdiffs', 'all') }}:
- 'build_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_checked_'
- ${{ if in(parameters.diffType, 'tpdiff', 'all') }}:
- ${{ if in(parameters.diffType, 'tpdiff', 'metricdiff', 'all') }}:
- 'build_${{ parameters.osGroup }}${{ parameters.osSubgroup }}_${{ parameters.archType }}_release_'

variables:
- ${{ each variable in parameters.variables }}:
- ${{insert}}: ${{ variable }}

- ${{ if in(parameters.diffType, 'tpdiff', 'all') }}:
- ${{ if in(parameters.diffType, 'tpdiff', 'metricdiff', 'all') }}:
- ${{ if eq(parameters.osGroup, 'windows') }}:
- name: releaseProductRootFolderPath
value: '$(Build.SourcesDirectory)\artifacts\bin\coreclr\$(osGroup).$(archType).Release'
Expand All @@ -59,7 +59,7 @@ jobs:
displayName: 'JIT checked build'
cleanUnpackFolder: false

- ${{ if in(parameters.diffType, 'tpdiff', 'all') }}:
- ${{ if in(parameters.diffType, 'tpdiff', 'metricdiff', 'all') }}:
# Download jit release builds
- template: /eng/pipelines/common/download-artifact-step.yml
parameters:
Expand Down
7 changes: 6 additions & 1 deletion src/coreclr/jit/compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6590,7 +6590,12 @@ void Compiler::compCompileFinish()
#endif
}
}
#endif // DEBUG
#else // DEBUG
if (JitConfig.JitReportMetrics())
{
Metrics.report(this);
}
#endif // !DEBUG
}

#ifdef PSEUDORANDOM_NOP_INSERTION
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/scripts/superpmi-diffs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults Condition=" '$(SuperPmiDiffType)'=='asmdiffs' ">superpmi_download_%(Identity).log;superpmi_asmdiffs_%(Identity).log;superpmi_asmdiffs_summary_%(Identity).json;Asmdiffs_%(Identity).zip</DownloadFilesFromResults>
<DownloadFilesFromResults Condition=" '$(SuperPmiDiffType)'=='tpdiff' " >superpmi_download_%(Identity).log;superpmi_tpdiff_%(Identity).log;superpmi_tpdiff_summary_%(Identity).json</DownloadFilesFromResults>
<DownloadFilesFromResults Condition=" '$(SuperPmiDiffType)'=='all' " >superpmi_download_%(Identity).log;superpmi_asmdiffs_%(Identity).log;superpmi_asmdiffs_summary_%(Identity).json;Asmdiffs_%(Identity).zip;superpmi_tpdiff_%(Identity).log;superpmi_tpdiff_summary_%(Identity).json</DownloadFilesFromResults>
<DownloadFilesFromResults Condition=" '$(SuperPmiDiffType)'=='metricdiff' ">superpmi_download_%(Identity).log;superpmi_metricdiff_%(Identity).log;superpmi_metricdiff_summary_%(Identity).json</DownloadFilesFromResults>
<DownloadFilesFromResults Condition=" '$(SuperPmiDiffType)'=='all' " >superpmi_download_%(Identity).log;superpmi_asmdiffs_%(Identity).log;superpmi_asmdiffs_summary_%(Identity).json;Asmdiffs_%(Identity).zip;superpmi_tpdiff_%(Identity).log;superpmi_tpdiff_summary_%(Identity).json;superpmi_metricdiff_%(Identity).log;superpmi_metricdiff_summary_%(Identity).json</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>
</Project>
Loading
Loading