Skip to content

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.
@ghost ghost 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
Contributor

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
@AndyAyersMS AndyAyersMS restored the OsrProfilerFix branch October 11, 2024 21:23
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