Skip to content

Enable inlining P/Invokes into try blocks with no catch or filter clauses - #73032

Merged
jkoritzinsky merged 5 commits into
dotnet:mainfrom
jkoritzinsky:inline-pinvoke-try-no-catch
Aug 4, 2022
Merged

Enable inlining P/Invokes into try blocks with no catch or filter clauses#73032
jkoritzinsky merged 5 commits into
dotnet:mainfrom
jkoritzinsky:inline-pinvoke-try-no-catch

Conversation

@jkoritzinsky

Copy link
Copy Markdown
Member

Contributes to #70109

@jkoritzinskyjkoritzinsky added the area-ExceptionHandling-coreclr only use for closed issues label Jul 28, 2022
@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
jkoritzinsky requested a review from jkotasJuly 28, 2022 23:55
Comment threadsrc/coreclr/vm/i386/excepx86.cpp Outdated
Comment threadsrc/coreclr/jit/lower.cpp Outdated
Comment threadsrc/coreclr/jit/importer.cpp Outdated

if (ExecutionManager::IsReadyToRunCode(((InlinedCallFrame*)pFrame)->m_pCallerReturnAddress))
TADDR returnAddress = ((InlinedCallFrame*)pFrame)->m_pCallerReturnAddress;
#ifdef USE_PER_FRAME_PINVOKE_INIT

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.

Is corinfo.h guaranteed to be included here to pickup this #define?

corinfo.h is JIT/EE interface so it does not need to be included globally.

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.

Is this one of those things we should set in the CMake files?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I've explicitly included corinfo.h. Given that this behavior is effectively part of the JIT/EE contract (as one changing behavior will generally require corresponding work in the other to avoid crashes), I think corinfo.h is a good place for it to live.

Comment threadsrc/coreclr/jit/importer.cpp Outdated
@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

/azp run runtime-coreclr outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

Failures are #73247

This is ready for another round of review

@jakobbotschjakobbotsch 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.

JIT changes LGTM, just one small nit.

Comment threadsrc/coreclr/jit/importer.cpp Outdated
@jkoritzinsky

Copy link
Copy Markdown
MemberAuthor

Failures are #73247 and the timeouts that we've been seeing.

@jkoritzinsky
jkoritzinsky merged commit 4c07f3d into dotnet:mainAug 4, 2022
@jkoritzinsky
jkoritzinsky deleted the inline-pinvoke-try-no-catch branch August 4, 2022 18:54
noahfalk added a commit to noahfalk/runtime that referenced this pull request Aug 8, 2022
…lter clauses (dotnet#73032)"
This reverts commit 4c07f3d. We believe it is causing recent CI failures.
See dotnet#73247
noahfalk added a commit that referenced this pull request Aug 8, 2022
…lter clauses (#73032)" (#73551)
This reverts commit 4c07f3d. We believe it is causing recent CI failures.
See #73247
jkoritzinsky added a commit to jkoritzinsky/runtime that referenced this pull request Aug 9, 2022
@ghostghost locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ExceptionHandling-coreclronly use for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@jkoritzinsky@jkotas@jakobbotsch@AaronRobinsonMSFT