diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-10-21 19:48:55 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-10-24 01:14:37 -0700 |
commit | 672efaf06bc55a7f58a9661f0c0c964b05f4c989 (patch) | |
tree | bb9abbb60492cfa62a8115e632035e2c9c0a352a /src/vm | |
parent | 2207dadf19fc976c6ccd04e12d46924a7b733457 (diff) | |
download | coreclr-672efaf06bc55a7f58a9661f0c0c964b05f4c989.tar.gz coreclr-672efaf06bc55a7f58a9661f0c0c964b05f4c989.tar.bz2 coreclr-672efaf06bc55a7f58a9661f0c0c964b05f4c989.zip |
Cleanup BCLDebug
- Delete correctness, performance and safe handle stacktrace logging
- Change remaining BCLDebug.Assert uses to Debug.Assert
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/comutilnative.cpp | 7 | ||||
-rw-r--r-- | src/vm/comutilnative.h | 2 | ||||
-rw-r--r-- | src/vm/mscorlib.h | 3 | ||||
-rw-r--r-- | src/vm/object.h | 6 | ||||
-rw-r--r-- | src/vm/safehandle.cpp | 9 |
5 files changed, 3 insertions, 24 deletions
diff --git a/src/vm/comutilnative.cpp b/src/vm/comutilnative.cpp index 5c5a1e9eaa..c6c3138e07 100644 --- a/src/vm/comutilnative.cpp +++ b/src/vm/comutilnative.cpp @@ -1957,7 +1957,7 @@ void QCALLTYPE COMInterlocked::MemoryBarrierProcessWide() FlushProcessWriteBuffers(); } -FCIMPL6(INT32, ManagedLoggingHelper::GetRegistryLoggingValues, CLR_BOOL* bLoggingEnabled, CLR_BOOL* bLogToConsole, INT32 *iLogLevel, CLR_BOOL* bPerfWarnings, CLR_BOOL* bCorrectnessWarnings, CLR_BOOL* bSafeHandleStackTraces) +FCIMPL3(INT32, ManagedLoggingHelper::GetRegistryLoggingValues, CLR_BOOL* bLoggingEnabled, CLR_BOOL* bLogToConsole, INT32 *iLogLevel) { FCALL_CONTRACT; @@ -1969,11 +1969,8 @@ FCIMPL6(INT32, ManagedLoggingHelper::GetRegistryLoggingValues, CLR_BOOL* bLoggin *bLogToConsole = (bool)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_LogToConsole, 0)!=0); *iLogLevel = (INT32)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::EXTERNAL_LogLevel, 0)); logFacility = (INT32)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_ManagedLogFacility, 0)); - *bPerfWarnings = (bool)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_BCLPerfWarnings, 0)!=0); - *bCorrectnessWarnings = (bool)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_BCLCorrectnessWarnings, 0)!=0); - *bSafeHandleStackTraces = (bool)(g_pConfig->GetConfigDWORD_DontUse_(CLRConfig::INTERNAL_SafeHandleStackTraces, 0)!=0); - HELPER_METHOD_FRAME_END(); \ + HELPER_METHOD_FRAME_END(); return logFacility; } diff --git a/src/vm/comutilnative.h b/src/vm/comutilnative.h index 07c57c1312..b9737cedb7 100644 --- a/src/vm/comutilnative.h +++ b/src/vm/comutilnative.h @@ -204,7 +204,7 @@ public: class ManagedLoggingHelper { public: - static FCDECL6(INT32, GetRegistryLoggingValues, CLR_BOOL* bLoggingEnabled, CLR_BOOL* bLogToConsole, INT32 *bLogLevel, CLR_BOOL* bPerfWarnings, CLR_BOOL* bCorrectnessWarnings, CLR_BOOL* bSafeHandleStackTraces); + static FCDECL3(INT32, GetRegistryLoggingValues, CLR_BOOL* bLoggingEnabled, CLR_BOOL* bLogToConsole, INT32 *bLogLevel); }; class ValueTypeHelper { diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index 10456e484b..e757624be3 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -224,9 +224,6 @@ DEFINE_CLASS(RUNTIME_CLASS, WinRT, RuntimeClass) #endif // FEATURE_COMINTEROP DEFINE_CLASS_U(Interop, CriticalHandle, CriticalHandle) -#ifdef _DEBUG -DEFINE_FIELD_U(_stackTrace, CriticalHandle, m_debugStackTrace) -#endif DEFINE_FIELD_U(handle, CriticalHandle, m_handle) DEFINE_FIELD_U(_isClosed, CriticalHandle, m_isClosed) DEFINE_CLASS(CRITICAL_HANDLE, Interop, CriticalHandle) diff --git a/src/vm/object.h b/src/vm/object.h index 7de739ab61..84ed0a5f1b 100644 --- a/src/vm/object.h +++ b/src/vm/object.h @@ -2875,9 +2875,6 @@ class SafeHandle : public Object // Modifying the order or fields of this object may require // other changes to the classlib class definition of this // object or special handling when loading this system class. -#ifdef _DEBUG - STRINGREF m_debugStackTrace; // Where we allocated this SafeHandle -#endif Volatile<LPVOID> m_handle; Volatile<INT32> m_state; // Combined ref count and closed/disposed state (for atomicity) Volatile<CLR_BOOL> m_ownsHandle; @@ -2945,9 +2942,6 @@ class CriticalHandle : public Object // Modifying the order or fields of this object may require // other changes to the classlib class definition of this // object or special handling when loading this system class. -#ifdef _DEBUG - STRINGREF m_debugStackTrace; // Where we allocated this CriticalHandle -#endif Volatile<LPVOID> m_handle; Volatile<CLR_BOOL> m_isClosed; diff --git a/src/vm/safehandle.cpp b/src/vm/safehandle.cpp index d79c5a749a..5e0626b9e7 100644 --- a/src/vm/safehandle.cpp +++ b/src/vm/safehandle.cpp @@ -62,9 +62,6 @@ void SafeHandle::AddRef() // Cannot use "this" after Release, which toggles the GC mode. SAFEHANDLEREF sh(this); -#ifdef _DEBUG - VALIDATEOBJECTREF(sh->m_debugStackTrace); -#endif _ASSERTE(sh->IsFullyInitialized()); // To prevent handle recycling security attacks we must enforce the @@ -137,9 +134,6 @@ void SafeHandle::Release(bool fDispose) // Cannot use "this" after RunReleaseMethod, which toggles the GC mode. SAFEHANDLEREF sh(this); -#ifdef _DEBUG - VALIDATEOBJECTREF(sh->m_debugStackTrace); -#endif _ASSERTE(sh->IsFullyInitialized()); // See AddRef above for the design of the synchronization here. Basically we @@ -236,9 +230,6 @@ void SafeHandle::Dispose() // Release may trigger a GC. SAFEHANDLEREF sh(this); -#ifdef _DEBUG - VALIDATEOBJECTREF(sh->m_debugStackTrace); -#endif _ASSERTE(sh->IsFullyInitialized()); GCPROTECT_BEGIN(sh); |