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

EgorBot for AaronRobinsonMSFT in #109996 #166

Open
EgorBot opened this issue Nov 20, 2024 · 3 comments
Open

EgorBot for AaronRobinsonMSFT in #109996 #166

EgorBot opened this issue Nov 20, 2024 · 3 comments

Comments

@EgorBot
Copy link
Owner

EgorBot commented Nov 20, 2024

Processing dotnet/runtime#109996 (comment) command:

Command

-x64 -arm64 -profiler

using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;

public class Bench
{
    struct S;

    [Benchmark]
    public Type RefElementType() => typeof(Bench[]).GetElementType();

    [Benchmark]
    public Type ValueElementType() => typeof(S[]).GetElementType();
}

(EgorBot will reply in this issue)

@EgorBot
Copy link
Owner Author

EgorBot commented Nov 20, 2024

Benchmark results on linux_icelake

BenchmarkDotNet v0.14.0, Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Intel Xeon Platinum 8370C CPU 2.80GHz, 1 CPU, 8 logical and 4 physical cores
  Job-VAVINC : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
  Job-XDXIJQ : .NET 10.0.0 (42.42.42.42424), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
Method Toolchain Mean Error Ratio
RefElementType Main 2.892 ns 0.0062 ns 1.00
RefElementType PR 4.606 ns 0.0010 ns 1.59
ValueElementType Main 3.175 ns 0.0043 ns 1.00
ValueElementType PR 2.852 ns 0.0010 ns 0.90

BDN_Artifacts.zip

Profile for Bench_ValueElementType:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_RefElementType:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR


cc @AaronRobinsonMSFT (agent_logs.txt)

@EgorBo
Copy link

EgorBo commented Nov 20, 2024

Hm.. interesting, arm64 job failed while it was building the runtime (during prejitting the corelib):

  Generating native image of System.Private.CoreLib for linux.arm64.Release. Logging to
  /home/egorbot/runtime/dotnet.sh /home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/arm64/crossgen2/crossgen2.dll -o:/home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/System.Private.CoreLib.dll -r:/home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/IL/*.dll --targetarch:arm64 --targetos:linux -m:/home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/StandardOptimizationData.mibc --embed-pgo-data -O /home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/IL/System.Private.CoreLib.dll --perfmap-format-version:1 --perfmap --perfmap-path:/home/egorbot/runtime/artifacts/bin/coreclr/linux.arm64.Release/
EXEC : error : Value cannot be null. (Parameter 'array') [/home/egorbot/runtime/src/coreclr/crossgen-corelib.proj]
  System.ArgumentNullException: Value cannot be null. (Parameter 'array')
     at System.Array.Clear(Array array, Int32 index, Int32 length)
     at Internal.JitInterface.CorInfoImpl.CompileMethodCleanup() in /home/egorbot/runtime/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs:line 700
     at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodWithGCInfo methodCodeNodeNeedingCode, Logger logger) in /home/egorbot/runtime/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs:line 826

@EgorBot
Copy link
Owner Author

EgorBot commented Nov 20, 2024

Benchmark results on linux_arm64

BenchmarkDotNet v0.14.0, Ubuntu 24.04 LTS (Noble Numbat)
arm64
  Job-MZJMEU : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
  Job-WMZSCV : .NET 10.0.0 (42.42.42.42424), Arm64 RyuJIT AdvSIMD
Method Toolchain Mean Error Ratio
RefElementType Main 3.632 ns 0.0023 ns 1.00
RefElementType PR 2.887 ns 0.0008 ns 0.79
ValueElementType Main 3.699 ns 0.0005 ns 1.00
ValueElementType PR 2.886 ns 0.0005 ns 0.78

BDN_Artifacts.zip

Profile for Bench_ValueElementType:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR

Profile for Bench_RefElementType:

Flame graphs: Main vs PR 🔥
Speedscope: Main vs PR
Hot asm: Main vs PR
Hot functions: Main vs PR
Counters: Main vs PR


cc @EgorBo (agent_logs.txt)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants