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

Removal of IBC infrastructure #68717

Merged
merged 8 commits into from
May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 0 additions & 6 deletions src/coreclr/classlibnative/bcltype/arraynative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1081,9 +1081,6 @@ FCIMPL2_IV(void, ArrayNative::InitializeArray, ArrayBase* pArrayRef, FCALLRuntim
if (!pField->IsRVA())
COMPlusThrow(kArgumentException);

// Report the RVA field to the logger.
g_IBCLogger.LogRVADataAccess(pField);

// Note that we do not check that the field is actually in the PE file that is initializing
// the array. Basically the data being published is can be accessed by anyone with the proper
// permissions (C# marks these as assembly visibility, and thus are protected from outside
Expand Down Expand Up @@ -1161,9 +1158,6 @@ FCIMPL3_VVI(void*, ArrayNative::GetSpanDataFrom, FCALLRuntimeFieldHandle structF
DWORD totalSize = pField->LoadSize();
DWORD targetTypeSize = targetTypeHandle.GetSize();

// Report the RVA field to the logger.
g_IBCLogger.LogRVADataAccess(pField);

data = pField->GetStaticAddressHandle(NULL);
_ASSERTE(data != NULL);
_ASSERTE(count != NULL);
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/nativeaot/Runtime/eventtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6444,11 +6444,6 @@ void ETW::EnumerationLog::EnumerationHelper(Module* moduleFilter, BaseDomain* do
GC_TRIGGERS;
} CONTRACTL_END;

// Disable IBC logging during ETW enumeration since we call a lot of functionality
// that does logging and causes problems in the shutdown path due to critical
// section access for IBC logging
IBCLoggingDisabler disableLogging;

// See code:#TableLockHolder
ReJitManager::TableLockHolder lkRejitMgrSharedDomain(SharedDomain::GetDomain()->GetReJitManager());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
/*
* CallHelpers.CPP: helpers to call managed code
*
*

*/

Expand All @@ -28,12 +28,12 @@ void AssertMulticoreJitAllowedModule(PCODE pTarget)
}
CONTRACTL_END;

MethodDesc* pMethod = Entry2MethodDesc(pTarget, NULL);
MethodDesc* pMethod = Entry2MethodDesc(pTarget, NULL);

Module * pModule = pMethod->GetModule_NoLogging();

#if defined(FEATURE_APPX_BINDER)

// For Appx process, allow certain modules to load on background thread
if (AppX::IsAppXProcess())
{
Expand Down Expand Up @@ -89,7 +89,7 @@ void CallDescrWorkerWithHandler(
}


#if !defined(_WIN64) && defined(_DEBUG)
#if !defined(_WIN64) && defined(_DEBUG)

//*******************************************************************************
// assembly code, in i386/asmhelpers.asm
Expand All @@ -103,7 +103,7 @@ void CallDescrWorker(CallDescrData * pCallDescrData)
// unwind the C++ handler before branching to the catch clause in managed code. That essentially causes an
// out-of-order destruction of the contract object, resulting in very odd crashes later.
//
#if 0
#if 0
CONTRACTL {
THROWS;
GC_TRIGGERS;
Expand Down Expand Up @@ -189,7 +189,7 @@ void DispatchCallDebuggerWrapper(
// Helper for VM->managed calls with simple signatures.
void * DispatchCallSimple(
SIZE_T *pSrc,
DWORD numStackSlotsToCopy,
DWORD numStackSlotsToCopy,
PCODE pTargetAddress,
DWORD dwDispatchCallSimpleFlags)
{
Expand All @@ -201,7 +201,7 @@ void * DispatchCallSimple(
}
CONTRACTL_END;

#ifdef DEBUGGING_SUPPORTED
#ifdef DEBUGGING_SUPPORTED
if (CORDebuggerTraceCall())
g_pDebugInterface->TraceCall((const BYTE *)pTargetAddress);
#endif // DEBUGGING_SUPPORTED
Expand Down Expand Up @@ -261,7 +261,7 @@ void DispatchCall(
}
CONTRACTL_END;

#ifdef DEBUGGING_SUPPORTED
#ifdef DEBUGGING_SUPPORTED
if (CORDebuggerTraceCall())
g_pDebugInterface->TraceCall((const BYTE *)pCallDescrData->pTarget);
#endif // DEBUGGING_SUPPORTED
Expand Down Expand Up @@ -320,7 +320,7 @@ void FillInRegTypeMap(int argOffset, CorElementType typ, BYTE * pMap)
// right for each arg.

if (regArgNum < NUM_ARGUMENT_REGISTERS)
{
{
pMap[regArgNum] = typ;
}
}
Expand All @@ -342,8 +342,8 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)
//
// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
//
// This method needs to have a GC_TRIGGERS contract because it
// calls managed code. However, IT MAY NOT TRIGGER A GC ITSELF
// This method needs to have a GC_TRIGGERS contract because it
// calls managed code. However, IT MAY NOT TRIGGER A GC ITSELF
// because the argument array is not protected and may contain gc
// refs.
//
Expand All @@ -361,7 +361,7 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)
#ifdef FEATURE_COMINTEROP
// If we're an exe, then we must either be initializing the first AD, or have already setup the main thread's
// COM apartment state.
// If you hit this assert, then you likely introduced code during startup that could inadvertently
// If you hit this assert, then you likely introduced code during startup that could inadvertently
// initialize the COM apartment state of the main thread before we set it based on the user attribute.
PRECONDITION(g_fInExecuteMainMethod ? (g_fMainThreadApartmentStateSet || g_fInitializingInitialAD) : TRUE);
#endif // FEATURE_COMINTEROP
Expand All @@ -375,7 +375,7 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)
//
// @todo: In an ideal world, we would require each of those sites to do the override rather than disabling
// the assert broadly here. However, by limiting the override to mscorlib methods, we should still be able
// to effectively enforce the more general rule about loader recursion.
// to effectively enforce the more general rule about loader recursion.
MAYBE_OVERRIDE_TYPE_LOAD_LEVEL_LIMIT(CLASS_LOADED, m_pMD->GetModule()->IsSystem());

LPBYTE pTransitionBlock;
Expand All @@ -391,17 +391,14 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)

{
//
// the incoming argument array is not gc-protected, so we
// the incoming argument array is not gc-protected, so we
// may not trigger a GC before we actually call managed code
//
GCX_FORBID();

// Record this call if required
g_IBCLogger.LogMethodDescAccess(m_pMD);

//
//
// All types must already be loaded. This macro also sets up a FAULT_FORBID region which is
// also required for critical calls since we cannot inject any failure points between the
// also required for critical calls since we cannot inject any failure points between the
// caller of MethodDesc::CallDescr and the actual transition to managed code.
//
ENABLE_FORBID_GC_LOADER_USE_IN_THIS_SCOPE();
Expand Down Expand Up @@ -492,7 +489,7 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)
}
#ifdef FEATURE_HFA
#ifdef FEATURE_INTERPRETER
// Something is necessary for HFA's, but what's below (in the FEATURE_INTERPRETER ifdef)
// Something is necessary for HFA's, but what's below (in the FEATURE_INTERPRETER ifdef)
// doesn't seem to do the proper test. It fires,
// incorrectly, for a one-word struct that *doesn't* have a ret buff. So we'll try this, instead:
// We're here because it doesn't have a ret buff. If it would, except that the struct being returned
Expand Down Expand Up @@ -642,7 +639,7 @@ ARG_SLOT MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments)
}
}
#endif // !defined(_WIN64) && BIGENDIAN

return retval;
}

Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ set(VM_SOURCES_WKS
genanalysis.cpp
genmeth.cpp
hosting.cpp
ibclogger.cpp
ilmarshalers.cpp
interopconverter.cpp
interoputil.cpp
Expand Down Expand Up @@ -436,7 +435,6 @@ set(VM_HEADERS_WKS
gcenv.ee.h
gcenv.os.h
gchelpers.h
ibclogger.h
ilmarshalers.h
interopconverter.h
interoputil.h
Expand Down
6 changes: 1 addition & 5 deletions src/coreclr/vm/appdomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1744,8 +1744,6 @@ StackWalkAction SystemDomain::CallersMethodCallbackWithStackMark(CrawlFrame* pCf
Frame* frame = pCf->GetFrame();
_ASSERTE(pCf->IsFrameless() || frame);



// Skipping reflection frames. We don't need to be quite as exhaustive here
// as the security or reflection stack walking code since we know this logic
// is only invoked for selected methods in CoreLib itself. So we're
Expand All @@ -1754,8 +1752,6 @@ StackWalkAction SystemDomain::CallersMethodCallbackWithStackMark(CrawlFrame* pCf
// MethodInfo, Type or Delegate (and depending on which invoke overload is
// being used, several different reflection classes may be involved).

g_IBCLogger.LogMethodDescAccess(pFunc);

if (SystemDomain::IsReflectionInvocationMethod(pFunc))
return SWA_CONTINUE;

Expand Down Expand Up @@ -5093,7 +5089,7 @@ HRESULT RuntimeInvokeHostAssemblyResolver(INT_PTR pManagedAssemblyLoadContextToB
if (pParentLoaderAllocator == NULL)
{
// The AssemblyLoadContext for which we are resolving the the Assembly is not collectible.
COMPlusThrow(kNotSupportedException, W("NotSupported_CollectibleBoundNonCollectible"));
COMPlusThrow(kNotSupportedException, W("NotSupported_CollectibleBoundNonCollectible"));
}

_ASSERTE(pResultAssemblyLoaderAllocator);
Expand Down
3 changes: 0 additions & 3 deletions src/coreclr/vm/callhelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ void MethodDescCallSite::CallTargetWorker(const ARG_SLOT *pArguments, ARG_SLOT *
//
GCX_FORBID();

// Record this call if required
g_IBCLogger.LogMethodDescAccess(m_pMD);

//
// All types must already be loaded. This macro also sets up a FAULT_FORBID region which is
// also required for critical calls since we cannot inject any failure points between the
Expand Down
Loading