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

DOTNET_TC_AggressiveTiering doesn't work as expected #101868

Open
EgorBo opened this issue May 3, 2024 · 1 comment
Open

DOTNET_TC_AggressiveTiering doesn't work as expected #101868

EgorBo opened this issue May 3, 2024 · 1 comment

Comments

@EgorBo
Copy link
Member

EgorBo commented May 3, 2024

The default tiering strategy is quite obscure and it's not obvious how to make a small console repro to show a Tier1 codegen for a method without disabling TC completely. DOTNET_TC_AggressiveTiering=1 was desinged to help with that, but it's still not working as expected, example:

using System.Runtime.CompilerServices;

public class Prog
{
    static void Main()
    {
        for (int i = 0; i < 10000000; i++)
            Test();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void Test() { }
}

Even with DOTNET_TC_AggressiveTiering=1 we never end up requesting a recompilation for Test and it stays in Tier0. I think, with DOTNET_TC_AggressiveTiering we should install call-counting stub synchrously without a delay/timer, so even:

using System.Runtime.CompilerServices;

public class Prog
{
    static void Main()
    {
        for (int i = 0; i < 2; i++)
            Test();
    }

    [MethodImpl(MethodImplOptions.NoInlining)]
    static void Test() { }
}

should print a Tier1 version (or at least, Tier0-instrumented) of Test

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 3, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 3, 2024
@EgorBo EgorBo added area-TieredCompilation-coreclr and removed area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI labels May 3, 2024
@EgorBo EgorBo self-assigned this May 3, 2024
Copy link
Contributor

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

@EgorBo EgorBo removed the untriaged New issue has not been triaged by the area owner label May 3, 2024
@EgorBo EgorBo added this to the Future milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant