dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.46k stars 4.76k forks source link

[Perf] Linux/x64: 2 Regressions on 8/29/2024 5:45:13 PM #107305

Open performanceautofiler[bot] opened 2 months ago

performanceautofiler[bot] commented 2 months ago

Run Information

Name Value
Architecture x64
OS ubuntu 22.04
Queue TigerUbuntu
Baseline d48751b92d5989f8b052ba4a5c20a385f3d4a983
Compare 2a552ab9d4bf82a93aef97b4750fd1d7c88007fa
Diff Diff
Configs CompilationMode:tiered, RunKind:micro

Regressions in System.Tests.Perf_Uri

Benchmark Baseline Test Test/Base Test Quality Edge Detector Baseline IR Compare IR IR Ratio
111.22 ns 128.66 ns 1.16 0.16 False
114.87 ns 131.64 ns 1.15 0.09 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.Tests.Perf_Uri*'
### System.Tests.Perf_Uri.Ctor(input: "http://xn--hst-sna.with.xn--nicode-2ya") #### ETL Files #### Histogram #### JIT Disasms ### System.Tests.Perf_Uri.Ctor(input: "https://a.much.longer.domain.name") #### 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)
LoopedBard3 commented 2 months ago

Seems to be https://github.com/dotnet/runtime/pull/106988 @EgorBo

dotnet-policy-service[bot] commented 2 months ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.

EgorBo commented 2 months ago

@EgorBot -intel -commit e1851a5 vs previous --envvars DOTNET_JitDisasm:CtorBench

using System;
using BenchmarkDotNet.Attributes;
using System.Collections.Generic;
public class Perf_Uri
{
    public static IEnumerable<object[]> Ctor_MemberData()
    {
        yield return ["https://a.much.longer.domain.name"];
    }

    [Benchmark]
    [ArgumentsSource(nameof(Ctor_MemberData))]
    public Uri CtorBench(string input) => new Uri(input);
}
EgorBo commented 2 months ago

@EgorBot -intel -commit 89839049b486bf48239dd6faa722defd3de320cb vs 9c9f6ada7ffd0cba60b75ca3e85f1052b9ab6404 --envvars DOTNET_JitDisasm:CtorBench

using System;
using BenchmarkDotNet.Attributes;
using System.Collections.Generic;
public class Perf_Uri
{
    public static IEnumerable<object[]> Ctor_MemberData()
    {
        yield return ["https://a.much.longer.domain.name"];
    }

    [Benchmark]
    [ArgumentsSource(nameof(Ctor_MemberData))]
    public Uri CtorBench(string input) => new Uri(input);
}
EgorBo commented 2 months ago

Not my change as it seems, let me inspect others.

EgorBo commented 2 months ago

@EgorBot -intel -commit 80187a31d8ff9d6d2dc270bbf502a3fb6b12268b vs previous --envvars DOTNET_JitDisasm:CtorBench

using System;
using BenchmarkDotNet.Attributes;
using System.Collections.Generic;
public class Perf_Uri
{
    public static IEnumerable<object[]> Ctor_MemberData()
    {
        yield return ["https://a.much.longer.domain.name"];
    }

    [Benchmark]
    [ArgumentsSource(nameof(Ctor_MemberData))]
    public Uri CtorBench(string input) => new Uri(input);
}
EgorBo commented 2 months ago

@EgorBot -intel -commit 8b34fb0656c2514b542321107f34c0bae659ff32 vs previous --envvars DOTNET_JitDisasm:CtorBench

using System;
using BenchmarkDotNet.Attributes;
using System.Collections.Generic;
public class Perf_Uri
{
    public static IEnumerable<object[]> Ctor_MemberData()
    {
        yield return ["https://a.much.longer.domain.name"];
    }

    [Benchmark]
    [ArgumentsSource(nameof(Ctor_MemberData))]
    public Uri CtorBench(string input) => new Uri(input);
}
EgorBo commented 2 months ago

So only Tiger regressed judging by ADX page, looks like the method itself is no longer 32b aligned: https://www.diffchecker.com/0qUcqaWc marking as 10.0.0

EgorBo commented 2 months ago

@EgorBot -intel -commit 9c9f6ada7ffd0cba60b75ca3e85f1052b9ab6404 vs previous --envvars DOTNET_JitDisasm:CtorBench

using System;
using BenchmarkDotNet.Attributes;
using System.Collections.Generic;
public class Perf_Uri
{
    public static IEnumerable<object[]> Ctor_MemberData()
    {
        yield return ["https://a.much.longer.domain.name"];
    }

    [Benchmark]
    [ArgumentsSource(nameof(Ctor_MemberData))]
    public Uri CtorBench(string input) => new Uri(input);
}