-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Investigating #109310 revealed that profiler rejit reverts are partially broken, at least on windows. The way the profiler rejit test is written hides this by making it hard to tell from the output that it's not working right, and the test itself does not fully validate that the revert worked. It's not immediately obvious to me when this regressed or whether it's always been partially broken in this way - I'm going to do some git bisecting to try and find out.
You can see that reverts don't work correctly by inspecting the stdout from the test after modifying it to dump more precise information to stdout via the replacement strings generated by the profiler.
before the initial profiler rejits (unimportant stdout stripped and important messages marked with -->):
maxinlining
TriggerDirectInlining
Inline.InlineeTarget
CallMethodWithoutInlining
Inline.InlineeTarget
TriggerInlining
Inline.InlineeChain1
Inline.InlineeTarget
Then we rejit and almost all of the strings get replaced:
--> ReJIT should be triggered after this method...
Hello from profiler rejit method 'TriggerDirectInlining'!
Hello from profiler rejit method 'InlineeTarget'!
CallMethodWithoutInlining
Hello from profiler rejit method 'InlineeTarget'!
Hello from profiler rejit method 'TriggerInliningChain'!
Inline.InlineeChain1
Hello from profiler rejit method 'InlineeTarget'!
Now we revert, which should return all the methods to their original behavior. It does not.
--> Revert should be triggered after this method...
Hello from profiler rejit method 'TriggerDirectInlining'!
Inline.InlineeTarget
CallMethodWithoutInlining
Inline.InlineeTarget
Hello from profiler rejit method 'TriggerInliningChain'!
Inline.InlineeChain1
Inline.InlineeTarget
Based on outerloop CI runs it seems like the test itself is less likely to fail on certain platforms than others, but I think that doesn't necessarily indicate that rejit reverts are working anywhere.