Update GC from CoreRT (dotnet/coreclr#5522)
authorJan Kotas <jkotas@microsoft.com>
Tue, 7 Jun 2016 16:26:19 +0000 (09:26 -0700)
committerJan Kotas <jkotas@microsoft.com>
Tue, 7 Jun 2016 16:26:19 +0000 (09:26 -0700)
https://github.com/dotnet/corert/tree/master/src/Native/gc dotnet/coreclr@3bd148c2089a781458b99d787395377a25bd23d0

Commit migrated from https://github.com/dotnet/coreclr/commit/372edb81017d314683a8bdbf44f9fb678e216726

src/coreclr/src/gc/env/gcenv.base.h
src/coreclr/src/gc/env/gcenv.os.h
src/coreclr/src/gc/gc.cpp
src/coreclr/src/gc/sample/gcenv.ee.cpp
src/coreclr/src/gc/sample/gcenv.h
src/coreclr/src/gc/sample/gcenv.windows.cpp
src/coreclr/src/gc/softwarewritewatch.cpp

index 7077082..88f86ce 100644 (file)
@@ -550,6 +550,7 @@ void LogSpewAlways(const char *fmt, ...);
 
 void StompWriteBarrierEphemeral(bool isRuntimeSuspended);
 void StompWriteBarrierResize(bool isRuntimeSuspended, bool bReqUpperBoundsCheck);
+bool IsSuspendEEThread();
 
 class CLRConfig
 {
index 45b958c..0cdc7a4 100644 (file)
@@ -226,7 +226,7 @@ public:
     //
     // Global memory info
     //
-    
+
     // Return the size of the user-mode portion of the virtual address space of this process.
     // Return:
     //  non zero if it has succeeded, 0 if it has failed
index 904f949..1de3caf 100644 (file)
@@ -9398,6 +9398,7 @@ void gc_heap::get_write_watch_for_gc_heap(bool reset, void *base_address, size_t
 #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
     SoftwareWriteWatch::GetDirty(base_address, region_size, dirty_pages, dirty_page_count_ref, reset, is_runtime_suspended);
 #else // !FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
+    UNREFERENCED_PARAMETER(is_runtime_suspended);
     bool success = GCToOSInterface::GetWriteWatch(reset, base_address, region_size, dirty_pages, dirty_page_count_ref);
     assert(success);
 #endif // FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
index 3205900..2ce0fda 100644 (file)
@@ -249,6 +249,11 @@ void StompWriteBarrierResize(bool /* isRuntimeSuspended */, bool /*bReqUpperBoun
 {
 }
 
+bool IsSuspendEEThread()
+{
+    return false;
+}
+
 void SwitchToWriteWatchBarrier()
 {
 }
index 1b4b7b7..d407eba 100644 (file)
@@ -79,12 +79,6 @@ public:
 
 Thread * GetThread();
 
-inline BOOL IsSuspendEEThread()
-{
-    // TODO: Implement
-    return false;
-}
-
 class ThreadStore
 {
 public:
index 64faa32..1324bd3 100644 (file)
@@ -315,13 +315,6 @@ uint64_t GCToOSInterface::GetPhysicalMemoryLimit()
 //  ms - pointer to the structure that will be filled in with the memory status
 void GCToOSInterface::GetMemoryStatus(uint32_t* memory_load, uint64_t* available_physical, uint64_t* available_page_file)
 {
-    CONTRACTL
-    {
-        NOTHROW;
-        GC_NOTRIGGER;
-    }
-    CONTRACTL_END;
-
     MEMORYSTATUSEX memStatus;
 
     memStatus.dwLength = sizeof(MEMORYSTATUSEX);
index bbd37ef..5197449 100644 (file)
@@ -5,13 +5,12 @@
 #include "common.h"
 #include "softwarewritewatch.h"
 
-#include "../inc/static_assert.h"
 #include "gcenv.h"
 
 #ifdef FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP
 #ifndef DACCESS_COMPILE
 
-static_assert_no_msg((static_cast<size_t>(1) << SOFTWARE_WRITE_WATCH_AddressToTableByteIndexShift) == OS_PAGE_SIZE);
+static_assert((static_cast<size_t>(1) << SOFTWARE_WRITE_WATCH_AddressToTableByteIndexShift) == OS_PAGE_SIZE, "Unexpected OS_PAGE_SIZE");
 
 extern "C"
 {
@@ -73,7 +72,7 @@ bool SoftwareWriteWatch::GetDirtyFromBlock(
     while (dirtyBytes != 0)
     {
         DWORD bitIndex;
-        static_assert_no_msg(sizeof(size_t) <= 8);
+        static_assert(sizeof(size_t) <= 8, "Unexpected sizeof(size_t)");
         if (sizeof(size_t) == 8)
         {
             BitScanForward64(&bitIndex, static_cast<DWORD64>(dirtyBytes));