You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nativeaot may be special, not sure if moving the runtime version without the corresponding sdk might change the outcome. But at least I set the framework reference and Microsoft.DotNet.ILCompiler to the same runtime. On 9.0.0-preview.4.24208.9+a8c2a5e5bbc2 we get 398K RPS and on 9.0.0-preview.4.24208.10+404b286b2309 only 178K RPS.
I confirm the NAOT one is fixed, I had to set --application.packageReferences Microsoft.DotNet.ILCompiler=9.0.0-preview.4.24215.2 as I assume it hasn't been ingested by the installer yet. But the build times are still slow. We should check again when we know this is in installer builds.
Activity
EgorBo commentedon Apr 12, 2024
@sebastienros is there a commit range? (I don't see an ability to view it on the e.g. Single File tab)
EgorBo commentedon Apr 12, 2024
Likely, ffb2578...e6c1a49
sebastienros commentedon Apr 12, 2024
That's what I have yes, we could probably go shorter by trying builds from within the range if you don't find anything
EgorBo commentedon Apr 12, 2024
TP regressed on NativeAOT too:
sebastienros commentedon Apr 12, 2024
Haven't had time to file this one, are you saying it's related? I wouldn't think so
EgorBo commentedon Apr 12, 2024
Dates match
EgorBo commentedon Apr 12, 2024
The thing is - when something goes wrong for AOT'd code - JIT can just re-jit it, while NAOT cannot, so it explains why TP only got hurt for NAOT.
sebastienros commentedon Apr 12, 2024
Here are the commands for the AOT one:
EgorBo commentedon Apr 12, 2024
The main suspect is #99982
sebastienros commentedon Apr 12, 2024
Minimal changeset identified for the nativeaot benchmark:
a8c2a5e...404b286
EgorBo commentedon Apr 12, 2024
Oh, so #100728 then?
sebastienros commentedon Apr 12, 2024
nativeaot may be special, not sure if moving the runtime version without the corresponding sdk might change the outcome. But at least I set the framework reference and
Microsoft.DotNet.ILCompilerto the same runtime. On9.0.0-preview.4.24208.9+a8c2a5e5bbc2we get 398K RPS and on9.0.0-preview.4.24208.10+404b286b2309only 178K RPS.stephentoub commentedon Apr 12, 2024
Really??
MichalPetryka commentedon Apr 12, 2024
@SingleAccretion suspects this to be the reason since
CastCacheis a mutable struct.Feels like there should be a builtin analyzer warning on
readonlyfields andinparameters with non-readonly structs for this.stephentoub commentedon Apr 12, 2024
Ugh. I looked for each such type I wasn't sure about, and I swear I saw it was a class, but I probably incorrectly mistook
runtime/src/coreclr/vm/castcache.h
Line 48 in 7b18be5
stephentoub commentedon Apr 12, 2024
#33773
dotnet/roslyn-analyzers#2811
dotnet/roslyn-analyzers#2831
#50389
jkotas commentedon Apr 13, 2024
Fixed by #100996
EgorBo commentedon Apr 15, 2024
It doesn't look like it's solved, e.g. NAOT run from today is still slow and build time is still slow for R2R
EgorBo commentedon Apr 15, 2024
@sebastienros can you take a look if it's solved
sebastienros commentedon Apr 15, 2024
I confirm the NAOT one is fixed, I had to set
--application.packageReferences Microsoft.DotNet.ILCompiler=9.0.0-preview.4.24215.2as I assume it hasn't been ingested by the installer yet. But the build times are still slow. We should check again when we know this is in installer builds.sebastienros commentedon Apr 17, 2024
All fixed, thank you!
R2R
NAOT