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
{{ message }}
Repository navigation
[Perf] Linux/x64: Benchstone.BenchF.SqMtx Regression on 2/9/2025 2:06:49 AM +00:00 #112429
102: JIT compiled Benchstone.BenchF.SqMtx:.ctor():this [Tier0, IL size=7, code size=31, hash=0x785c3d60]
827: JIT compiled Benchstone.BenchF.SqMtx:Test():ubyte:this [Instrumented Tier0, IL size=100, code size=491, hash=0x8629e617]
828: JIT compiled Benchstone.BenchF.SqMtx:AllocArray[double](int,int):double[][] [Instrumented Tier0, IL size=30, code size=212, hash=0x825045bc]
829: JIT compiled Benchstone.BenchF.SqMtx:Inner(double[][],double[][],int) [Instrumented Tier0, IL size=73, code size=574, hash=0x6cacb5f5]
830: JIT compiled Benchstone.BenchF.SqMtx:Inner(double[][],double[][],int) [Tier1-OSR @0x34 with Dynamic PGO, IL size=73, code size=331, hash=0x6cacb5f5]
831: JIT compiled Benchstone.BenchF.SqMtx:Inner(double[][],double[][],int) [Instrumented Tier0, IL size=73, code size=574, hash=0x6cacb5f5]
832: JIT compiled Benchstone.BenchF.SqMtx:Inner(double[][],double[][],int) [Tier1-OSR @0x34 with Dynamic PGO, IL size=73, code size=331, hash=0x6cacb5f5]
833: JIT compiled Benchstone.BenchF.SqMtx:Inner(double[][],double[][],int) [Tier1 with Dynamic PGO, IL size=73, code size=720, hash=0x6cacb5f5]
890: JIT compiled Benchstone.BenchF.SqMtx:Test():ubyte:this [Tier1-OSR @0x48 with Dynamic PGO, IL size=100, code size=888, hash=0x8629e617]
1020: JIT compiled Benchstone.BenchF.SqMtx:Test():ubyte:this [Tier1-OSR @0x29 with Dynamic PGO, IL size=100, code size=936, hash=0x8629e617]
1121: JIT compiled Benchstone.BenchF.SqMtx:AllocArray[double](int,int):double[][] [Instrumented Tier0, IL size=30, code size=211, hash=0x825045bc]
Interesting that we get two different OSR methods for Inner at the same IL offset. Suspect this may be that one comes from the Tier0 method and another from the Tier0+instr method. Current OSR identification uses the call site return address so these are considered different and so we get two possibly identical OSR variants. While this may seem wasteful the two inspiring methods may have different frame layouts and different callee-saves so even though they both hit the same patchpoint, it's not clear in general we could have them both invoke the same OSR method.
At any rate we then get two different OSR variants for Test, and those are the two prominent methods in the profile, and they have diffs.
I thought this was going to be about using checked write barriers in OSR methods that promote gc ref containing types to the stack (since we are not sure if the code will reference the OSR stack version or the Tier-0 heap version of that allocation), but that's not the case (at least in my repros).
Code layout differs quite a bit between my base and diff, so I am going to build a closer matching set of compilers and retry.
Looks like one (perhaps the only) issue is that the change to ParseArrayAddressWorker in #104906 in doesn't always work for OSR because we may never see the newarr.
Hence VN doesn't understand array accesses with TYP_BYREF bases and we get slightly worse code:
Activity
LoopedBard3 commentedon Feb 11, 2025
Likely caused by: #112250 in commit range: fb1d061...ca9893f
Related Regressions:
2 remaining items
AndyAyersMS commentedon Feb 12, 2025
Dug in a little... I don't have a strong local repro
ADX however shows an across the board jump up
Profiling shows this is almost entirely measuring OSR methods:
AndyAyersMS commentedon Feb 12, 2025
From the disasm summary:
Interesting that we get two different OSR methods for
Innerat the same IL offset. Suspect this may be that one comes from the Tier0 method and another from the Tier0+instr method. Current OSR identification uses the call site return address so these are considered different and so we get two possibly identical OSR variants. While this may seem wasteful the two inspiring methods may have different frame layouts and different callee-saves so even though they both hit the same patchpoint, it's not clear in general we could have them both invoke the same OSR method.At any rate we then get two different OSR variants for
Test, and those are the two prominent methods in the profile, and they have diffs.dotnet-policy-service commentedon Feb 12, 2025
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
AndyAyersMS commentedon Feb 12, 2025
I thought this was going to be about using checked write barriers in OSR methods that promote gc ref containing types to the stack (since we are not sure if the code will reference the OSR stack version or the Tier-0 heap version of that allocation), but that's not the case (at least in my repros).
Code layout differs quite a bit between my base and diff, so I am going to build a closer matching set of compilers and retry.
AndyAyersMS commentedon Feb 12, 2025
Looks like one (perhaps the only) issue is that the change to
ParseArrayAddressWorkerin #104906 in doesn't always work for OSR because we may never see the newarr.Hence VN doesn't understand array accesses with
TYP_BYREFbases and we get slightly worse code:JIT: generalize ParseArrayAddress a bit more
JIT: generalize ParseArrayAddress a bit more (dotnet#112527)