dotnet / dotnet/perf-autofiling-issues

[Perf] Linux/arm64: 6 Improvements on 7/31/2026 7:22:11 PM +00:00

Open
#77,310 1 comment 0 reactions 0 assignees View on GitHub
ampere arch-arm64 branch-refs/heads/main compilationmode-tiered kind-micro_mono llvm-true Look Again mono-aot mono-llvm monoaot-true monointerpreter-false os-linux perf-improvement runkind-micro_mono runtime-mono untriaged
Dominant language
No language data
Stars
10
Forks
8
PR merge metrics
PR metrics pending

Description

### Run Information

Name | Value
-- | --
Architecture | arm64
OS | ubuntu 22.04
Queue | AmpereUbuntu
Baseline | [ba8afceee83540ed1d867987483f74d4ad2cfae9](https://github.com/dotnet/runtime/commit/ba8afceee83540ed1d867987483f74d4ad2cfae9)
Compare | [0eb5481340ea675857c7a7abf18f68a60b52a686](https://github.com/dotnet/runtime/commit/0eb5481340ea675857c7a7abf18f68a60b52a686)
Diff | [Diff](https://github.com/dotnet/runtime/compare/ba8afceee83540ed1d867987483f74d4ad2cfae9...0eb5481340ea675857c7a7abf18f68a60b52a686)
Configs | CompilationMode:tiered, LLVM:true, MonoAOT:true, MonoInterpreter:false, RunKind:micro_mono

### Improvements in System.Collections.Tests.Perf_BitArray

Benchmark | Baseline | Test | Test/Base | Test Quality | Edge Detector | Baseline IR | Compare IR | IR Ratio
-- | -- | -- | -- | -- | -- | -- | -- | --
|

  • [BitArrayByteArrayCtor - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 125.59 ns | 55.18 ns | 0.44 | 0.56 | False | | |
|
  • [BitArraySetLengthShrink - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 137.56 ns | 67.09 ns | 0.49 | 0.41 | False | | |
|
  • [BitArraySetLengthGrow - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 181.57 ns | 103.98 ns | 0.57 | 0.27 | False | | |
|
  • [BitArraySetLengthShrink - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 280.64 ns | 176.14 ns | 0.63 | 0.25 | False | | |
|
  • [BitArrayByteArrayCtor - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 261.63 ns | 173.94 ns | 0.66 | 0.33 | False | | |
|
  • [BitArraySetLengthGrow - Duration of single invocation]()
  • 📝 - [Benchmark Source]()
  • [ADX - Test Multi Config Graph]()
| 528.18 ns | 460.05 ns | 0.87 | 0.22 | False | | |

![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
![graph]()
[Test Report]()

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

Repro Steps

#### Prerequisites (Files either built locally (with build.(sh/cmd) or downloaded from payload above (if same system setup) (in this order))
- Libraries build extracted to `runtime/artifacts` or build instructions: [Libraries README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/libraries/README.md) args: `-subset libs+libs.tests -rc release -configuration Release -arch $RunArch -framework net8.0`
- CoreCLR product build extracted to `runtime/artifacts/bin/coreclr/$RunOS.$RunArch.Release`, build instructions: [CoreCLR README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/README.md) args: `-subset clr+libs -rc release -configuration Release -arch $RunArch -framework net8.0`
- AOT MONO build extracted to `runtime/artifacts/bin/mono/$RunOS.$RunArch.Release`, build instructions: [MONO README](https://github.com/dotnet/runtime/blob/main/docs/workflow/building/mono/README.md) args: `-arch $RunArch -os $RunOS -s mono+libs+host+packs -c Release /p:CrossBuild=false /p:MonoLLVMUseCxx11Abi=false`
- Dotnet SDK installed for dotnet commands
- Running commands from the runtime folder

Linux
```cmd
# Set $RunDir to the runtime directory
RunDir=`pwd`

# Set the OS, arch, and OSId
RunOS='linux'
RunOSId='linux'
RunArch='x64'

# Create aot directory
mkdir -p $RunDir/artifacts/bin/aot/sgen
mkdir -p $RunDir/artifacts/bin/aot/pack
cp -r $RunDir/artifacts/obj/mono/$RunOS.$RunArch.Release/mono/* $RunDir/artifacts/bin/aot/sgen
cp -r $RunDir/artifacts/bin/microsoft.netcore.app.runtime.$RunOS-$RunArch/Release/* $RunDir/artifacts/bin/aot/pack

# Create Core Root
$RunDir/src/tests/build.sh release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir/performance

# One line run:
python3 $RunDir/performance/scripts/benchmarks_ci.py --csproj $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Collections.Tests.Perf_BitArray*' --bdn-artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir/artifacts/bin/aot/sgen/mini/mono-sgen --customruntimepack $RunDir/artifacts/bin/aot/pack --aotcompilermode llvm --logBuildOutput --generateBinLog"

# Individual Commands:
# Restore
dotnet restore $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --packages $RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir/performance/artifacts/packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir/performance/src/benchmarks/micro/MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter System.Collections.Tests.Perf_BitArray* --anyCategories Libraries Runtime " --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir/artifacts/bin/aot/sgen/mini/mono-sgen --customruntimepack $RunDir/artifacts/bin/aot/pack --aotcompilermode llvm --logBuildOutput --generateBinLog " --artifacts $RunDir/artifacts/BenchmarkDotNet.Artifacts --packages $RunDir/performance/artifacts/packages --buildTimeout 1200
```

Windows
```cmd
# Set $RunDir to the runtime directory
$RunDir="FullPathHere"

# Set the OS, arch, and OSId
RunOS='windows'
RunOSId='win'
RunArch='x64'

# Create aot directory
mkdir $RunDir\artifacts\bin\aot\sgen
mkdir $RunDir\artifacts\bin\aot\pack
xcopy $RunDir\artifacts\obj\mono\$RunOS.$RunArch.Release\mono $RunDir\artifacts\bin\aot\sgen\ /e /y
xcopy $RunDir\artifacts\bin\microsoft.netcore.app.runtime.$RunOSId-$RunArch\Release $RunDir\artifacts\bin\aot\pack\ /e /y

# Create Core Root
$RunDir\src\tests\build.cmd release $RunArch generatelayoutonly /p:LibrariesConfiguration=Release

# Clone performance
git clone --branch main --depth 1 --quiet https://github.com/dotnet/performance.git $RunDir\performance

# One line run:
python3 $RunDir\performance\scripts\benchmarks_ci.py --csproj $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --incremental no --architecture $RunArch -f net8.0 --filter 'System.Collections.Tests.Perf_BitArray*' --bdn-artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --bdn-arguments="--anyCategories Libraries Runtime --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir\artifacts\bin\aot\sgen\mini\mono-sgen.exe --customruntimepack $RunDir\artifacts\bin\aot\pack --aotcompilermode llvm --logBuildOutput --generateBinLog"

# Individual Commands:
# Restore
dotnet restore $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --packages $RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Build
dotnet build $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore /p:NuGetPackageRoot=$RunDir\performance\artifacts\packages /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1

# Run
dotnet run --project $RunDir\performance\src\benchmarks\micro\MicroBenchmarks.csproj --configuration Release --framework net8.0 --no-restore --no-build -- --filter System.Collections.Tests.Perf_BitArray* --anyCategories Libraries Runtime " --category-exclusion-filter NoAOT NoWASM --runtimes monoaotllvm --aotcompilerpath $RunDir\artifacts\bin\aot\sgen\mini\mono-sgen.exe --customruntimepack $RunDir\artifacts\bin\aot\pack -aotcompilermode llvm --logBuildOutput --generateBinLog " --artifacts $RunDir\artifacts\BenchmarkDotNet.Artifacts --packages $RunDir\performance\artifacts\packages --buildTimeout 1200
```

### System.Collections.Tests.Perf_BitArray.BitArrayByteArrayCtor(Size: 4)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Collections.Tests.Perf_BitArray.BitArraySetLengthShrink(Size: 4)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Collections.Tests.Perf_BitArray.BitArraySetLengthGrow(Size: 4)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Collections.Tests.Perf_BitArray.BitArraySetLengthShrink(Size: 512)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Collections.Tests.Perf_BitArray.BitArrayByteArrayCtor(Size: 512)

#### ETL Files

#### Histogram

#### JIT Disasms

### System.Collections.Tests.Perf_BitArray.BitArraySetLengthGrow(Size: 512)

#### ETL Files

#### Histogram

#### JIT Disasms

### Docs

[Profiling workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/profiling-workflow-dotnet-runtime.md)
[Benchmarking workflow for dotnet/runtime repository](https://github.com/dotnet/performance/blob/master/docs/benchmarking-workflow-dotnet-runtime.md)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked benchmark source at src/benchmarks/micro/libraries/System.Collections/Perf.BitArray.cs, especially lines 49-50 and 120-135, then review the BitArray test report and the Linux/arm64 reproduction details. Done requires determining whether the reported measurements indicate an actionable runtime issue; the issue does not define a specific code change or acceptance criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, ubuntu
Domain
performance, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.