[x86/Linux] Disable Watson-related code for non-Windows platforms (dotnet/coreclr...
authorJonghyun Park <parjong@gmail.com>
Fri, 2 Dec 2016 01:01:29 +0000 (10:01 +0900)
committerJan Kotas <jkotas@microsoft.com>
Fri, 2 Dec 2016 01:01:29 +0000 (17:01 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/1a1da83f1750c45cfe6e62080608f328d9b36978

src/coreclr/src/vm/exinfo.cpp
src/coreclr/src/vm/i386/excepx86.cpp

index 4cbc6d3..9e07ceb 100644 (file)
@@ -76,9 +76,11 @@ void ExInfo::CopyAndClearSource(ExInfo *from)
     // Finally, initialize the source ExInfo.
     from->Init();
 
+#ifndef FEATURE_PAL
     // Clear the Watson Bucketing information as well since they
     // have been transferred over by the "memcpy" above.
     from->GetWatsonBucketTracker()->Init();
+#endif // FEATURE_PAL
 }
 
 void ExInfo::Init()
@@ -136,8 +138,10 @@ ExInfo::ExInfo()
     m_hThrowable = NULL;
     Init();
 
+#ifndef FEATURE_PAL
     // Init the WatsonBucketTracker
     m_WatsonBucketTracker.Init();
+#endif // FEATURE_PAL
 }
 
 //*******************************************************************************
@@ -206,9 +210,11 @@ void ExInfo::UnwindExInfo(VOID* limit)
             pPrevNestedInfo->DestroyExceptionHandle();
         }
 
+        #ifndef FEATURE_PAL
         // Free the Watson bucket details when ExInfo
         // is being released
         pPrevNestedInfo->GetWatsonBucketTracker()->ClearWatsonBucketDetails();
+        #endif // FEATURE_PAL
 
         pPrevNestedInfo->m_StackTraceInfo.FreeStackTrace();
 
@@ -256,8 +262,10 @@ void ExInfo::UnwindExInfo(VOID* limit)
         // We just do a basic Init of the current top ExInfo here.
         Init();
 
+        #ifndef FEATURE_PAL
         // Init the Watson buckets as well
         GetWatsonBucketTracker()->ClearWatsonBucketDetails();
+        #endif // FEATURE_PAL
     }
 }
 #endif // DACCESS_COMPILE
index fb68963..5ee49ff 100644 (file)
@@ -1153,6 +1153,7 @@ CPFH_RealFirstPassHandler(                  // ExceptionContinueSearch, etc.
 
     pExInfo->m_pExceptionPointers = &exceptionPointers;
 
+#ifndef FEATURE_PAL
     if (bRethrownException || bNestedException)
     {
         _ASSERTE(pExInfo->m_pPrevNestedInfo != NULL);
@@ -1161,6 +1162,7 @@ CPFH_RealFirstPassHandler(                  // ExceptionContinueSearch, etc.
         SetStateForWatsonBucketing(bRethrownException, pExInfo->GetPreviousExceptionTracker()->GetThrowableAsHandle());
         END_SO_INTOLERANT_CODE;
     }
+#endif
 
 #ifdef DEBUGGING_SUPPORTED
     //