Update GC from CoreRT
authorJan Kotas <jkotas@microsoft.com>
Mon, 18 Apr 2016 09:31:55 +0000 (02:31 -0700)
committerJan Kotas <jkotas@microsoft.com>
Fri, 22 Apr 2016 20:14:44 +0000 (13:14 -0700)
https://github.com/dotnet/corert/tree/master/src/Native/gc 102af78f9169082478165e7c676bbee6ae194940

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

index 96d69176966e88645b3a8f035e5adac03aef1777..16636aecff7fd3c2cb5ce838c511bd7b869215de 100644 (file)
@@ -570,7 +570,7 @@ public:
     typedef CLRConfigTypes ConfigStringInfo;
 
     static uint32_t GetConfigValue(ConfigDWORDInfo eType);
-    static HRESULT GetConfigValue(ConfigStringInfo /*eType*/, TCHAR * * outVal);
+    static HRESULT GetConfigValue(ConfigStringInfo /*eType*/, __out_z TCHAR * * outVal);
 };
 
 inline bool FitsInU1(uint64_t val)
index 0ef979c221ec8d96718ba9dec6d831a422e5cf03..007b57f3bc7c7fb26ad79e1980ca2fc08cd96db5 100644 (file)
@@ -181,7 +181,7 @@ public:
     // current platform. It is indended for logging purposes only.
     // Return:
     //  Numeric id of the current thread or 0 if the 
-    static uint32_t GetCurrentThreadIdForLogging();
+    static uint64_t GetCurrentThreadIdForLogging();
 
     // Get id of the current process
     // Return:
index 082713fc7160fc2b16b5cbc24b982c83e8104fa7..837c4bbcec8b54396179d26e6f645294b69613bb 100644 (file)
@@ -403,7 +403,7 @@ void log_va_msg(const char *fmt, va_list args)
 
     pBuffer[0] = '\n';
     int buffer_start = 1;
-    int pid_len = sprintf_s (&pBuffer[buffer_start], BUFFERSIZE - buffer_start, "[%5d]", GCToOSInterface::GetCurrentThreadIdForLogging());
+    int pid_len = sprintf_s (&pBuffer[buffer_start], BUFFERSIZE - buffer_start, "[%5lld]", GCToOSInterface::GetCurrentThreadIdForLogging());
     buffer_start += pid_len;
     memset(&pBuffer[buffer_start], '-', BUFFERSIZE - buffer_start);
     int msg_len = _vsnprintf(&pBuffer[buffer_start], BUFFERSIZE - buffer_start, fmt, args );
@@ -27041,7 +27041,7 @@ uint32_t gc_heap::bgc_thread_function()
     Thread* current_thread = GetThread();
     BOOL cooperative_mode = TRUE;
     bgc_thread_id.SetToCurrentThread();
-    dprintf (1, ("bgc_thread_id is set to %Ix", GCToOSInterface::GetCurrentThreadIdForLogging()));
+    dprintf (1, ("bgc_thread_id is set to %llx", GCToOSInterface::GetCurrentThreadIdForLogging()));
     //this also indicates that the thread is ready.
     background_gc_create_event.Set();
     while (1)
@@ -35882,7 +35882,6 @@ size_t GCHeap::GetValidGen0MaxSize(size_t seg_size)
 
     if ((gen0size == 0) || !GCHeap::IsValidGen0MaxSize(gen0size))
     {
-#if !defined(FEATURE_REDHAWK)
 #ifdef SERVER_GC
         // performance data seems to indicate halving the size results
         // in optimal perf.  Ask for adjusted gen0 size.
@@ -35914,9 +35913,6 @@ size_t GCHeap::GetValidGen0MaxSize(size_t seg_size)
 #else //SERVER_GC
         gen0size = max((4*GCToOSInterface::GetLargestOnDieCacheSize(TRUE)/5),(256*1024));
 #endif //SERVER_GC
-#else //!FEATURE_REDHAWK
-        gen0size = (256*1024);
-#endif //!FEATURE_REDHAWK
     }
 
     // Generation 0 must never be more than 1/2 the segment size.
index 04d5ac34804658f66bbb444f8967787ee08a410f..7e6641e0102ebc5a4627bd74d278ac8bd73c7308 100644 (file)
@@ -52,7 +52,7 @@ void GCToOSInterface::Shutdown()
 // current platform. It is indended for logging purposes only.
 // Return:
 //  Numeric id of the current thread or 0 if the 
-uint32_t GCToOSInterface::GetCurrentThreadIdForLogging()
+uint64_t GCToOSInterface::GetCurrentThreadIdForLogging()
 {
     return ::GetCurrentThreadId();
 }