Opt-out of GC Stress for FEATURE_STANDALONE_GC (dotnet/coreclr#10391)
authorSean Gillespie <sean@swgillespie.me>
Wed, 22 Mar 2017 23:39:14 +0000 (16:39 -0700)
committerGitHub <noreply@github.com>
Wed, 22 Mar 2017 23:39:14 +0000 (16:39 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/ecdf277ce50f29cccb494157cdbbfda86517feac

src/coreclr/src/gc/gc.cpp
src/coreclr/src/gc/gc.h

index a217563..11faa79 100644 (file)
@@ -208,8 +208,10 @@ void GCStatistics::AddGCStats(const gc_mechanisms& settings, size_t timeInMSec)
 
     if (is_induced (settings.reason))
         cntReasons[(int)reason_induced]++;
+#ifdef STRESS_HEAP
     else if (settings.stress_induced)
         cntReasons[(int)reason_gcstress]++;
+#endif // STRESS_HEAP
     else
         cntReasons[(int)settings.reason]++;
 
index e9b52a7..d521f93 100644 (file)
@@ -31,6 +31,11 @@ Module Name:
 
 #ifdef FEATURE_STANDALONE_GC
 #include "gcenv.ee.standalone.inl"
+
+// GCStress does not currently work with Standalone GC
+#ifdef STRESS_HEAP
+ #undef STRESS_HEAP
+#endif // STRESS_HEAP
 #endif // FEATURE_STANDALONE_GC
 
 /*