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

OSR method may require kept-alive this in cases where base method didn't #47532

Closed
AndyAyersMS opened this issue Jan 27, 2021 · 2 comments
Closed
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@AndyAyersMS
Copy link
Member

AndyAyersMS commented Jan 27, 2021

A couple examples in the OSR stress weekend experimental runs.

Because of inlining the reporting of this for generic contexts is needed in an OSR method, but not in the base method. This violates an assumption that both methods would agree on this aspect.

// OSR methods use the original method slot for the cached kept alive this,
// so don't need to allocate a slot on the new frame.
if (opts.IsOSR())
{
if (lvaKeepAliveAndReportThis())
{
PatchpointInfo* ppInfo = info.compPatchpointInfo;
assert(ppInfo->HasKeptAliveThis());
int originalOffset = ppInfo->KeptAliveThisOffset();
lvaCachedGenericContextArgOffs = originalFrameStkOffs + originalOffset;
}
}

Should not be too hard to report the kept-alive this in the OSR method on it's part of the frame. Looks like CodeGen::genReportGenericContextArg might just work for OSR frames, though that needs to be verified.

category:correctness
theme:osr
skill-level:intermediate
cost:small
impact:small

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 27, 2021
@AndyAyersMS AndyAyersMS added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 27, 2021
@AndyAyersMS AndyAyersMS added this to the Future milestone Jan 27, 2021
@AndyAyersMS AndyAyersMS removed the untriaged New issue has not been triaged by the area owner label Jan 27, 2021
@AndyAyersMS AndyAyersMS modified the milestones: Future, 6.0.0 Apr 27, 2021
@AndyAyersMS AndyAyersMS self-assigned this Apr 27, 2021
@AndyAyersMS
Copy link
Member Author

Fixed by #51057.

@ghost ghost locked as resolved and limited conversation to collaborators May 27, 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
Archived in project
Development

No branches or pull requests

1 participant