Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions 24 src/coreclr/vm/prestub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -991,18 +991,6 @@ PCODE MethodDesc::JitCompileCodeLocked(PrepareCodeConfig* pConfig, COR_ILMETHOD_
// code. This also avoid races with profiler overriding ngened code (see
// matching SetNativeCodeInterlocked done after
// JITCachedFunctionSearchStarted)
Comment thread
janvorli marked this conversation as resolved.
if (!pConfig->SetNativeCode(pCode, &pOtherCode))
{
#ifdef HAVE_GCCOVER
// When GCStress is enabled, this thread should always win the publishing race
// since we're under a lock.
_ASSERTE(!GCStress<cfg_instr_jit>::IsEnabled() || !"GC Cover native code publish failed");
#endif

// Another thread beat us to publishing its copy of the JITted code.
return pOtherCode;
}

#ifdef FEATURE_INTERPRETER
if (*pIsInterpreterCode)
{
Expand All @@ -1018,6 +1006,18 @@ PCODE MethodDesc::JitCompileCodeLocked(PrepareCodeConfig* pConfig, COR_ILMETHOD_
}
#endif // FEATURE_INTERPRETER

if (!pConfig->SetNativeCode(pCode, &pOtherCode))
{
#ifdef HAVE_GCCOVER
// When GCStress is enabled, this thread should always win the publishing race
// since we're under a lock.
_ASSERTE(!GCStress<cfg_instr_jit>::IsEnabled() || !"GC Cover native code publish failed");
#endif

// Another thread beat us to publishing its copy of the JITted code.
return pOtherCode;
}

#ifdef FEATURE_CODE_VERSIONING
pConfig->SetGeneratedOrLoadedNewCode();
#endif
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.