summaryrefslogtreecommitdiff
path: root/src/debug/ee
diff options
context:
space:
mode:
authorAustin Wise <AustinWise@gmail.com>2017-03-05 17:51:40 -0800
committerJan Kotas <jkotas@microsoft.com>2017-03-05 17:51:40 -0800
commit51e968b013e9b1582035f202e004ed024f747f4f (patch)
tree25b0b82deb3392cbeacb3be81bbf3c29e11e81cb /src/debug/ee
parent118f88dc17c75800ca249330ea41a963d3bae306 (diff)
downloadcoreclr-51e968b013e9b1582035f202e004ed024f747f4f.tar.gz
coreclr-51e968b013e9b1582035f202e004ed024f747f4f.tar.bz2
coreclr-51e968b013e9b1582035f202e004ed024f747f4f.zip
Remove hosting methods that always return false (#9930)
* Remove CLRIoCompletionHosted as it always returns false. * Remove CLRSyncHosted as it always returns false. * Remove CLRMemoryHosted as it always returns false. * Remove CLRTaskHosted as it always returns false. * Remove CLRAssemblyHosted, CLRGCHosted,and CLRSecurityHosted. They are not called. * Remove IsThreadPoolHosted as it always returns false. * Remove EnterRuntime and LeaveRuntime, as they do nothing. * Add back calls to RevertIfImpersonated and GCX_PREEMP. I accidentally deleted the call to RevertIfImpersonated instead of just removing an extra parameter. When I removed the HR_LEAVE_RUNTIME_HOLDER macro from windowsruntime.h, I not only removed a LeaveRuntimeHolder but also a GCX_PREEMP. So I added it back. The holder and GCX_PREEMP where only inserted when the FEATURE_LEAVE_RUNTIME_HOLDER macro was defined. Since it is always defined, I removed it. Also as I understand it, you would always want to have a GCX_PREEMP before calling into the Windows API as not to block the GC, so I'm not sure why you would want to disable it.
Diffstat (limited to 'src/debug/ee')
-rw-r--r--src/debug/ee/controller.h2
-rw-r--r--src/debug/ee/debugger.cpp74
-rw-r--r--src/debug/ee/debugger.h2
3 files changed, 2 insertions, 76 deletions
diff --git a/src/debug/ee/controller.h b/src/debug/ee/controller.h
index a314874b8d..95569b55c7 100644
--- a/src/debug/ee/controller.h
+++ b/src/debug/ee/controller.h
@@ -954,8 +954,6 @@ class DebuggerController
//
public:
- // Once we support debugging + fibermode (which was cut in V2.0), we may need some Thread::BeginThreadAffinity() calls
- // associated with the controller lock because this lock wraps context operations.
class ControllerLockHolder : public CrstHolder
{
public:
diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp
index 0967c56075..ae698e2234 100644
--- a/src/debug/ee/debugger.cpp
+++ b/src/debug/ee/debugger.cpp
@@ -276,20 +276,6 @@ bool IsGuardPageGone()
return fGuardPageGone;
}
-
-// This is called from AppDomainEnumerationIPCBlock::Lock and Unlock
-void BeginThreadAffinityHelper()
-{
- WRAPPER_NO_CONTRACT;
-
- Thread::BeginThreadAffinity();
-}
-void EndThreadAffinityHelper()
-{
- WRAPPER_NO_CONTRACT;
- Thread::EndThreadAffinity();
-}
-
//-----------------------------------------------------------------------------
// LSPTR_XYZ is a type-safe wrapper around an opaque reference type XYZ in the left-side.
// But TypeHandles are value-types that can't be directly converted into a pointer.
@@ -5195,39 +5181,6 @@ HRESULT Debugger::MapPatchToDJI( DebuggerControllerPatch *dcp,DebuggerJitInfo *d
return S_OK;
}
-//
-// Wrapper function for debugger to WaitForSingleObject. If CLR is hosted,
-// notify host before we leave runtime.
-//
-DWORD Debugger::WaitForSingleObjectHelper(HANDLE handle, DWORD dwMilliseconds)
-{
- CONTRACTL
- {
- SO_NOT_MAINLINE;
- NOTHROW;
- GC_NOTRIGGER;
- }
- CONTRACTL_END;
-
- DWORD dw = 0;
- EX_TRY
- {
-
- // make sure that we let host know that we are leaving runtime.
- LeaveRuntimeHolder holder((size_t)(::WaitForSingleObject));
- dw = ::WaitForSingleObject(handle,dwMilliseconds);
- }
- EX_CATCH
- {
- // Only possibility to enter here is when Thread::LeaveRuntime
- // throws exception.
- dw = WAIT_ABANDONED;
- }
- EX_END_CATCH(SwallowAllExceptions);
- return dw;
-
-}
-
/* ------------------------------------------------------------------------ *
* EE Interface routines
@@ -12717,27 +12670,13 @@ CorDebugUserState Debugger::GetFullUserState(Thread *pThread)
/******************************************************************************
*
* Helper for debugger to get an unique thread id
- * If we are not in Fiber mode, we can safely use OSThreadId
- * Otherwise, we will use our own unique ID.
- *
- * We will return our unique ID when our host is hosting Thread.
- *
*
******************************************************************************/
DWORD Debugger::GetThreadIdHelper(Thread *pThread)
{
WRAPPER_NO_CONTRACT;
- if (!CLRTaskHosted())
- {
- // use the plain old OS Thread ID
- return pThread->GetOSThreadId();
- }
- else
- {
- // use our unique thread ID
- return pThread->GetThreadId();
- }
+ return pThread->GetOSThreadId();
}
//-----------------------------------------------------------------------------
@@ -15063,15 +15002,6 @@ HRESULT Debugger::InitAppDomainIPC(void)
// uninited values.
ZeroMemory(m_pAppDomainCB, sizeof(*m_pAppDomainCB));
- // Fix for issue: whidbey 143061
- // We are creating the mutex as hold, when we unlock, the EndThreadAffinity in
- // hosting case will be unbalanced.
- // Ideally, I would like to fix this by creating mutex not-held and call Lock method.
- // This way, when we clean up the OOM, (as you can tell, we never release the mutex in
- // some error cases), we can change it to holder class.
- //
- Thread::BeginThreadAffinity();
-
// Create a mutex to allow the Left and Right Sides to properly
// synchronize. The Right Side will spin until m_hMutex is valid,
// then it will acquire it before accessing the data.
@@ -16057,7 +15987,7 @@ BOOL Debugger::SendCtrlCToDebugger(DWORD dwCtrlType)
// now wait for notification from the right side about whether or not
// the out-of-proc debugger is handling ControlC events.
- WaitForSingleObjectHelper(GetCtrlCMutex(), INFINITE);
+ ::WaitForSingleObject(GetCtrlCMutex(), INFINITE);
return GetDebuggerHandlingCtrlC();
}
diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h
index 278bef7ecd..f99931e9dd 100644
--- a/src/debug/ee/debugger.h
+++ b/src/debug/ee/debugger.h
@@ -2772,8 +2772,6 @@ public:
bool ResumeThreads(AppDomain* pAppDomain);
- static DWORD WaitForSingleObjectHelper(HANDLE handle, DWORD dwMilliseconds);
-
void ProcessAnyPendingEvals(Thread *pThread);
bool HasLazyData();