summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-06-19 09:40:48 -0700
committerGitHub <noreply@github.com>2016-06-19 09:40:48 -0700
commit734f9814f534b324a9268804371cf9da9245ec78 (patch)
tree43eff95966a555b37ee4e714e224dcea32e9fd62 /src
parent0e5f844e008b3a9ea537a0dfcb84f51f8b79e60b (diff)
downloadcoreclr-734f9814f534b324a9268804371cf9da9245ec78.tar.gz
coreclr-734f9814f534b324a9268804371cf9da9245ec78.tar.bz2
coreclr-734f9814f534b324a9268804371cf9da9245ec78.zip
Update GC from CoreRT (#5859)
https://github.com/dotnet/corert/tree/master/src/Native/gc 53276850bc2e7e531908434b2d062fcff3e1d58d
Diffstat (limited to 'src')
-rw-r--r--src/gc/env/gcenv.base.h38
-rw-r--r--src/gc/gc.cpp4
-rw-r--r--src/gc/sample/gcenv.h38
3 files changed, 40 insertions, 40 deletions
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h
index 17a5416830..329ac6e1dc 100644
--- a/src/gc/env/gcenv.base.h
+++ b/src/gc/env/gcenv.base.h
@@ -504,46 +504,8 @@ namespace ETW
// Logging
//
-#ifdef _MSC_VER
-#define SUPPRESS_WARNING_4127 \
- __pragma(warning(push)) \
- __pragma(warning(disable:4127)) /* conditional expression is constant*/
-#define POP_WARNING_STATE \
- __pragma(warning(pop))
-#else // _MSC_VER
-#define SUPPRESS_WARNING_4127
-#define POP_WARNING_STATE
-#endif // _MSC_VER
-
-#define WHILE_0 \
- SUPPRESS_WARNING_4127 \
- while(0) \
- POP_WARNING_STATE \
-
-#define LOG(x)
-
void LogSpewAlways(const char *fmt, ...);
-#define LL_INFO10 4
-
-#define STRESS_LOG_VA(msg) do { } WHILE_0
-#define STRESS_LOG0(facility, level, msg) do { } WHILE_0
-#define STRESS_LOG1(facility, level, msg, data1) do { } WHILE_0
-#define STRESS_LOG2(facility, level, msg, data1, data2) do { } WHILE_0
-#define STRESS_LOG3(facility, level, msg, data1, data2, data3) do { } WHILE_0
-#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) do { } WHILE_0
-#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) do { } WHILE_0
-#define STRESS_LOG6(facility, level, msg, data1, data2, data3, data4, data5, data6) do { } WHILE_0
-#define STRESS_LOG7(facility, level, msg, data1, data2, data3, data4, data5, data6, data7) do { } WHILE_0
-#define STRESS_LOG_PLUG_MOVE(plug_start, plug_end, plug_delta) do { } WHILE_0
-#define STRESS_LOG_ROOT_PROMOTE(root_addr, objPtr, methodTable) do { } WHILE_0
-#define STRESS_LOG_ROOT_RELOCATE(root_addr, old_value, new_value, methodTable) do { } WHILE_0
-#define STRESS_LOG_GC_START(gcCount, Gen, collectClasses) do { } WHILE_0
-#define STRESS_LOG_GC_END(gcCount, Gen, collectClasses) do { } WHILE_0
-#define STRESS_LOG_OOM_STACK(size) do { } while(0)
-#define STRESS_LOG_RESERVE_MEM(numChunks) do {} while (0)
-#define STRESS_LOG_GC_STACK
-
#define DEFAULT_GC_PRN_LVL 3
// -----------------------------------------------------------------------------------------------------------
diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp
index bad784421f..9c04356617 100644
--- a/src/gc/gc.cpp
+++ b/src/gc/gc.cpp
@@ -18438,7 +18438,7 @@ void gc_heap::background_promote (Object** ppObject, ScanContext* sc, uint32_t f
//needs to be called before the marking because it is possible for a foreground
//gc to take place during the mark and move the object
- STRESS_LOG3(LF_GC|LF_GCROOTS, LL_INFO1000000, " GCHeap::Promote: Promote GC Root *%p = %p MT = %pT", ppObject, o, o ? ((Object*) o)->GetMethodTable() : NULL);
+ STRESS_LOG3(LF_GC|LF_GCROOTS, LL_INFO1000000, " GCHeap::Promote: Promote GC Root *%p = %p MT = %pT", ppObject, o, o ? ((Object*) o)->GetGCSafeMethodTable() : NULL);
hpt->background_mark_simple (o THREAD_NUMBER_ARG);
}
@@ -26681,7 +26681,7 @@ void gc_heap::background_promote_callback (Object** ppObject, ScanContext* sc,
dprintf (3, ("pushing %08x into mark_list", (size_t)o));
hpt->c_mark_list [hpt->c_mark_list_index++] = o;
- STRESS_LOG3(LF_GC|LF_GCROOTS, LL_INFO1000000, " GCHeap::Background Promote: Promote GC Root *%p = %p MT = %pT", ppObject, o, o ? ((Object*) o)->GetMethodTable() : NULL);
+ STRESS_LOG3(LF_GC|LF_GCROOTS, LL_INFO1000000, " GCHeap::Background Promote: Promote GC Root *%p = %p MT = %pT", ppObject, o, o ? ((Object*) o)->GetGCSafeMethodTable() : NULL);
}
void gc_heap::mark_absorb_new_alloc()
diff --git a/src/gc/sample/gcenv.h b/src/gc/sample/gcenv.h
index d407eba334..d560789751 100644
--- a/src/gc/sample/gcenv.h
+++ b/src/gc/sample/gcenv.h
@@ -26,6 +26,44 @@
#define MAX_LONGPATH 1024
+#ifdef _MSC_VER
+#define SUPPRESS_WARNING_4127 \
+ __pragma(warning(push)) \
+ __pragma(warning(disable:4127)) /* conditional expression is constant*/
+#define POP_WARNING_STATE \
+ __pragma(warning(pop))
+#else // _MSC_VER
+#define SUPPRESS_WARNING_4127
+#define POP_WARNING_STATE
+#endif // _MSC_VER
+
+#define WHILE_0 \
+ SUPPRESS_WARNING_4127 \
+ while(0) \
+ POP_WARNING_STATE \
+
+#define LL_INFO10 4
+
+#define STRESS_LOG_VA(msg) do { } WHILE_0
+#define STRESS_LOG0(facility, level, msg) do { } WHILE_0
+#define STRESS_LOG1(facility, level, msg, data1) do { } WHILE_0
+#define STRESS_LOG2(facility, level, msg, data1, data2) do { } WHILE_0
+#define STRESS_LOG3(facility, level, msg, data1, data2, data3) do { } WHILE_0
+#define STRESS_LOG4(facility, level, msg, data1, data2, data3, data4) do { } WHILE_0
+#define STRESS_LOG5(facility, level, msg, data1, data2, data3, data4, data5) do { } WHILE_0
+#define STRESS_LOG6(facility, level, msg, data1, data2, data3, data4, data5, data6) do { } WHILE_0
+#define STRESS_LOG7(facility, level, msg, data1, data2, data3, data4, data5, data6, data7) do { } WHILE_0
+#define STRESS_LOG_PLUG_MOVE(plug_start, plug_end, plug_delta) do { } WHILE_0
+#define STRESS_LOG_ROOT_PROMOTE(root_addr, objPtr, methodTable) do { } WHILE_0
+#define STRESS_LOG_ROOT_RELOCATE(root_addr, old_value, new_value, methodTable) do { } WHILE_0
+#define STRESS_LOG_GC_START(gcCount, Gen, collectClasses) do { } WHILE_0
+#define STRESS_LOG_GC_END(gcCount, Gen, collectClasses) do { } WHILE_0
+#define STRESS_LOG_OOM_STACK(size) do { } while(0)
+#define STRESS_LOG_RESERVE_MEM(numChunks) do {} while (0)
+#define STRESS_LOG_GC_STACK
+
+#define LOG(x)
+
//
// Thread
//