1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 // ===========================================================================
9 // Inline definitions of various items declared in REJIT.H\
10 // ===========================================================================
17 inline void ReJitManager::InitStatic()
21 s_csGlobalRequest.Init(CrstReJITGlobalRequest);
25 inline BOOL ReJitManager::IsReJITEnabled()
27 LIMITED_METHOD_CONTRACT;
29 return CORProfilerEnableRejit();
32 #ifndef DACCESS_COMPILE
34 inline void ReJitManager::ReportReJITError(CodeVersionManager::CodePublishError* pErrorRecord)
44 ReportReJITError(pErrorRecord->pModule, pErrorRecord->methodDef, pErrorRecord->pMethodDesc, pErrorRecord->hrStatus);
48 inline void ReJitManager::ReportReJITError(Module* pModule, mdMethodDef methodDef, MethodDesc* pMD, HRESULT hrStatus)
50 #ifdef PROFILING_SUPPORTED
61 BEGIN_PIN_PROFILER(CORProfilerPresent());
62 _ASSERTE(CORProfilerEnableRejit());
65 g_profControlBlock.pProfInterface->ReJITError(
66 reinterpret_cast< ModuleID > (pModule),
68 reinterpret_cast< FunctionID > (pMD),
73 #endif // PROFILING_SUPPORTED
75 #endif // DACCESS_COMPILE
77 #else // FEATURE_REJIT
79 // On architectures that don't support rejit, just keep around some do-nothing
80 // stubs so the rest of the VM doesn't have to be littered with #ifdef FEATURE_REJIT
83 inline BOOL ReJitManager::IsReJITEnabled()
89 inline void ReJitManager::InitStatic()
93 #endif // FEATURE_REJIT