Skip to content
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

JIT: fix OSR reporting for special stack slots #53897

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

AndyAyersMS
Copy link
Member

Revise the reporting of the special stack slots for OSR to be more uniform.

  • Always record the original method FP-relative offset.
  • Always apply the same adjustment for original method slosts i the OSR frame
  • Handle caller-SP relative adjustment in lvaToCallerSPRelativeOffset

In particular, this fixes #43534 where we were reporting the wrong caller SP
for the profiler exit hook.

Revise the reporting of the special stack slots for OSR to be more uniform.
* Always record the original method FP-relative offset.
* Always apply the same adjustment for original method slosts i the OSR frame
* Handle caller-SP relative adjustment in `lvaToCallerSPRelativeOffset`

In particular, this fixes dotnet#43534 where we were reporting the wrong caller SP
for the profiler exit hook.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jun 8, 2021
@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

OSR stress mode over pri1 passes locally.

{
offset = compiler->lvaToCallerSPRelativeOffset(compiler->lvaCachedGenericContextArgOffset(),
compiler->isFramePointerUsed());
// Sanity the offset vs saved patchpoint info.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Sanity the => Sanity check the

@AndyAyersMS AndyAyersMS merged commit 3d13204 into dotnet:main Jun 9, 2021
@AndyAyersMS AndyAyersMS deleted the OsrProfilerFix branch June 9, 2021 00:59
@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OSR Test Failures
2 participants