Skip to content

Only pass the method context when tracking transitions. - #47238

Merged
jkoritzinsky merged 10 commits into
dotnet:masterfrom
jkoritzinsky:reverse-pinvoke-helper-opt
Jan 21, 2021
Merged

jkoritzinsky merged 10 commits into
dotnet:masterfrom
jkoritzinsky:reverse-pinvoke-helper-opt

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

Create a new helper instead of modifying an existing one. Only track transitions when we absolutely need to.

Fixes #47223

cc: @dotnet/jit-contrib

Comment thread src/coreclr/inc/corinfo.h Resolved
Comment thread src/coreclr/inc/corinfo.h Resolved
@jkotas

jkotas commented Jan 20, 2021

Copy link
Copy Markdown
Member

ReadyToRunInfo::GetEntryPoint should have something like this:

if (CORProfilerTrackTransitions() && pMD->HasUnmanagedCallersOnlyAttribute())
{
   pMD->SetProfilerRejectedPrecompiledCode();
   goto done;
}

Comment thread src/coreclr/inc/corjitflags.h Resolved
Comment thread src/coreclr/vm/jithelpers.cpp Resolved

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@ghost

ghost commented Jan 20, 2021

Copy link
Copy Markdown

Hello @jkoritzinsky!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@sandreenko sandreenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Jit changes look fine.

@jkotas

jkotas commented Jan 20, 2021

Copy link
Copy Markdown
Member

Why is the last commit needed? These callouts should be limited to JIT only. We would have to introduce a whole new separate R2R image flavor to make that work. It is not something we want to do.

@jkotas jkotas removed the auto-merge label Jan 20, 2021
@jkoritzinsky

Copy link
Copy Markdown
Member Author

I may have been a little overzealous on adding all the R2R helpers. I’ll go remove the e R2R helpers and just update the JIT helpers on the Crossgen2 side (which is all I really needed to do on that commit)

@jkoritzinsky

Copy link
Copy Markdown
Member Author

Can you take a look at the 2 new commits and let me know what you think?

Comment thread src/coreclr/vm/jithelpers.cpp Resolved
Comment thread src/coreclr/vm/jithelpers.cpp Resolved
@jkotas

jkotas commented Jan 20, 2021

Copy link
Copy Markdown
Member

LGTM otherwise.

@jkoritzinsky
jkoritzinsky force-pushed the reverse-pinvoke-helper-opt branch from 9bb318b to c1a881d Compare January 20, 2021 23:52
@jkoritzinsky
jkoritzinsky merged commit 7225baf into dotnet:master Jan 21, 2021
@jkoritzinsky
jkoritzinsky deleted the reverse-pinvoke-helper-opt branch January 21, 2021 02:48
@ghost ghost locked as resolved and limited conversation to collaborators Feb 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UnmanagedCallersOnly performance regression and R2R breaking change in

3 participants