-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
PGO: redundant Tier0-instr promotions #84517
Comments
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue Detailsstatic void Main()
{
for (int i = 0; i < 100; i++)
{
Test();
var _ = Test2;
Thread.Sleep(16);
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
static int Test1()
{
int sum = 0;
for (int i = 0; i < 10; i++)
sum += i;
return sum;
}
static int Test2 { get; set; } Actual result:
Since Also, all Tier0 methods should warn VM in advance that they don't need instrumentation at all (e.g. simple auto properties like cc @AndyAyersMS
|
Even more interesting when OSR gets involved:
|
Heh indeed funny one but presumably the same issue, I'll fix it this week |
We can also see this when we have a nontrivial intrinsic R2R method; we rejit at tier1-instr but it doesn't actually instrument; then we rejit at tier1 and don't have any dynamic PGO data, so we are jitting twice and probably producing the same code each time.
|
Moving to 9.0 as the VM change was not trivial. We think that this doesn't really affect perf or startup but still nice to fix |
Actual result:
Since
Test1
has a loop we always instrument it in Tier0, but then it's promoted to Instrumented Tier0 again - it can be omitted.Also, all Tier0 methods should warn VM in advance that they don't need instrumentation at all (e.g. simple auto properties like
get_Test2
).cc @AndyAyersMS
The text was updated successfully, but these errors were encountered: