-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Methods are not getting inlined #11087
Comments
Try setting the environment variable set COMPlus_JitPrintInlinedMethods=1 Should give more info? |
With
|
Guessing is with Core 2.2+; likely to be teired jitting? Try switching it off
Method needs to be called 10 times I think to recompile with inlining active with tiered Jit I believe |
@benadams with tiered jitting switched off it seems to inline correctly, however, it's not listed when using |
With teiring enabled then it should inline on the 11th iteration of public static void Run()
{
Console.WriteLine(1.2134m.Round());
Console.WriteLine(decimal.Round(1.2134m));
}
public static void Main()
{
for (var i = 0; i < 20; i++)
{
Run();
}
} |
Also make sure you are copying a check or debug built JIT into a release build of the runtime/framework. The debug build of the System.Private.CoreLib will have an attribute that inhibits all jit optimization. The checked build will still contain assertion checks. |
@Necronux Is this issue answered to your satisfaction? Can you close? |
Why
DecimalExtensions:Round
is not getting inlined? I followed instructions here https://github.com/dotnet/coreclr/blob/master/Documentation/building/viewing-jit-dumps.md to get the jit dump. I published the program in release. As you can see it still callsDecimalExtensions:Round
instead of callingDecimal:Round
directly.The dump:
The text was updated successfully, but these errors were encountered: