Skip to content
Closed
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,7 @@ void DacDbiInterfaceImpl::GetCompilerFlags (

// Get the underlying module - none of this is AppDomain specific
Module * pModule = pDomainAssembly->GetModule();
DWORD dwBits = pModule->GetDebuggerInfoBits();
*pfAllowJITOpts = !CORDisableJITOptimizations(dwBits);
*pfAllowJITOpts = !pModule->AreJITOptimizationsDisabled();
*pfEnableEnC = pModule->IsEditAndContinueEnabled();


Expand Down Expand Up @@ -7424,7 +7423,7 @@ HRESULT DacDbiInterfaceImpl::AreOptimizationsDisabled(VMPTR_Module vmModule, mdM
#else
pOptimizationsDisabled->SetDacTargetPtr(0);
#endif

return S_OK;
}

Expand Down
7 changes: 2 additions & 5 deletions src/coreclr/debug/ee/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3305,7 +3305,7 @@ void Debugger::getBoundaries(MethodDesc * md,
// lives in, then don't grab specific boundaries from the symbol
// store since any boundaries we give the JIT will be pretty much
// ignored anyway.
if (!CORDisableJITOptimizations(md->GetModule()->GetDebuggerInfoBits()))
if (!md->GetModule()->AreJITOptimizationsDisabled())
{
*implicitBoundaries = ICorDebugInfo::BoundaryTypes(ICorDebugInfo::STACK_EMPTY_BOUNDARIES |
ICorDebugInfo::CALL_SITE_BOUNDARIES);
Expand Down Expand Up @@ -3383,13 +3383,10 @@ void Debugger::getVars(MethodDesc * md, ULONG32 *cVars, ICorDebugInfo::ILVarInfo
// free to ignore *extendOthers
*extendOthers = true;

DWORD bits = md->GetModule()->GetDebuggerInfoBits();

if (CORDBUnrecoverableError(this))
goto Exit;

if (CORDisableJITOptimizations(bits))
// if (!CORDebuggerAllowJITOpts(bits))
if (md->GetModule()->AreJITOptimizationsDisabled())
{
//
// @TODO: Do we really need this code since *extendOthers==true?
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/debug/ee/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ class DebuggerModule

AppDomain* m_pAppDomain;

bool m_fHasOptimizedCode;

void PickPrimaryModule();

// Can we change jit flags on the module?
Expand Down
8 changes: 1 addition & 7 deletions src/coreclr/debug/ee/debugger.inl
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ inline DebuggerModule::DebuggerModule(Module * pRuntimeModule,
// Arguably, this could be in DebuggerModuleTable::AddModule
PickPrimaryModule();


// Do we have any optimized code?
DWORD dwDebugBits = pRuntimeModule->GetDebuggerInfoBits();
m_fHasOptimizedCode = CORDebuggerAllowJITOpts(dwDebugBits);

// Dynamic modules must receive ClassLoad callbacks in order to receive metadata updates as the module
// evolves. So we force this on here and refuse to change it for all dynamic modules.
if (pRuntimeModule->IsReflection())
Expand All @@ -91,8 +86,7 @@ inline bool DebuggerModule::HasAnyOptimizedCode()
{
LIMITED_METHOD_CONTRACT;
Module * pModule = this->GetPrimaryModule()->GetRuntimeModule();
DWORD dwDebugBits = pModule->GetDebuggerInfoBits();
return CORDebuggerAllowJITOpts(dwDebugBits);
return !pModule->AreJITOptimizationsDisabled();
}

//-----------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/corprof.idl
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ typedef enum
COR_PRF_MONITOR_CLASS_LOADS |
COR_PRF_MONITOR_EXCEPTIONS |
COR_PRF_MONITOR_JIT_COMPILATION |
COR_PRF_DISABLE_INLINING |
COR_PRF_DISABLE_OPTIMIZATIONS |
COR_PRF_ENABLE_REJIT,

COR_PRF_ALLOWABLE_NOTIFICATION_PROFILER
Expand Down Expand Up @@ -625,8 +627,6 @@ typedef enum
COR_PRF_MONITOR_REMOTING_ASYNC |
COR_PRF_ENABLE_INPROC_DEBUGGING |
COR_PRF_ENABLE_JIT_MAPS |
COR_PRF_DISABLE_OPTIMIZATIONS |
COR_PRF_DISABLE_INLINING |
COR_PRF_ENABLE_OBJECT_ALLOCATED |
COR_PRF_ENABLE_FUNCTION_ARGS |
COR_PRF_ENABLE_FUNCTION_RETVAL |
Expand Down Expand Up @@ -4289,10 +4289,10 @@ interface ICorProfilerInfo14 : ICorProfilerInfo13
[out, size_is(cObjectRanges), length_is(*pcObjectRanges)] COR_PRF_NONGC_HEAP_RANGE ranges[]);


// EventPipeCreateProvider2 allows you to pass in a callback which will be called whenever a
// EventPipeCreateProvider2 allows you to pass in a callback which will be called whenever a
// session enables your provider. The behavior of the callback matches the ETW behavior which
// can be counter intuitive. You will get a callback any time a session changes with the updated
// global keywords enabled for your session. The is_enabled parameter will be true if any
// can be counter intuitive. You will get a callback any time a session changes with the updated
// global keywords enabled for your session. The is_enabled parameter will be true if any
// session has your provider enabled. The source_id parameter will be a valid id if the callback
// was triggered due to a session enabling and it will be NULL if it was triggered due to a session
// disabling.
Expand Down
Loading