diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-02-03 06:18:44 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-02-03 06:18:44 -0800 |
commit | d747b85536994e4c73c3f810d9e7b9cb46e02745 (patch) | |
tree | ef950ddc845ede744fbe30ca248398f0f9997a88 /src/gc | |
parent | c92c399cee4c2c772093b67cb6f6cac3d705adc8 (diff) | |
download | coreclr-d747b85536994e4c73c3f810d9e7b9cb46e02745.tar.gz coreclr-d747b85536994e4c73c3f810d9e7b9cb46e02745.tar.bz2 coreclr-d747b85536994e4c73c3f810d9e7b9cb46e02745.zip |
Integrate changes from full .NET Framework
- Custom attribute to suppress NGen with method granularity
- Static contract fixes
- GC fix
[tfs-changeset: 1571860]
Diffstat (limited to 'src/gc')
-rw-r--r-- | src/gc/env/gcenv.structs.h | 13 | ||||
-rw-r--r-- | src/gc/gc.cpp | 19 | ||||
-rw-r--r-- | src/gc/gcpriv.h | 8 |
3 files changed, 19 insertions, 21 deletions
diff --git a/src/gc/env/gcenv.structs.h b/src/gc/env/gcenv.structs.h index 64c39f3618..ef6ec595aa 100644 --- a/src/gc/env/gcenv.structs.h +++ b/src/gc/env/gcenv.structs.h @@ -102,19 +102,6 @@ public: #ifndef _INC_WINDOWS -typedef union _LARGE_INTEGER { - struct { -#if BIGENDIAN - int32_t HighPart; - uint32_t LowPart; -#else - uint32_t LowPart; - int32_t HighPart; -#endif - } u; - int64_t QuadPart; -} LARGE_INTEGER, *PLARGE_INTEGER; - #ifdef PLATFORM_UNIX typedef struct _RTL_CRITICAL_SECTION { diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp index 869b0b95e6..0d9e986d73 100644 --- a/src/gc/gc.cpp +++ b/src/gc/gc.cpp @@ -39,6 +39,10 @@ inline BOOL ShouldTrackMovementForProfilerOrEtw() } #endif // defined(GC_PROFILING) || defined(FEATURE_EVENT_TRACE) +#if defined(BACKGROUND_GC) && defined(FEATURE_EVENT_TRACE) +BOOL bgc_heap_walk_for_etw_p = FALSE; +#endif //BACKGROUND_GC && FEATURE_EVENT_TRACE + #if defined(FEATURE_REDHAWK) #define MAYBE_UNUSED_VAR(v) v = v #else @@ -15285,10 +15289,14 @@ void gc_heap::gc1() #if defined(VERIFY_HEAP) || (defined (FEATURE_EVENT_TRACE) && defined(BACKGROUND_GC)) if (FALSE #ifdef VERIFY_HEAP + // Note that right now g_pConfig->GetHeapVerifyLevel always returns the same + // value. If we ever allow randomly adjusting this as the process runs, + // we cannot call it this way as joins need to match - we must have the same + // value for all heaps like we do with bgc_heap_walk_for_etw_p. || (g_pConfig->GetHeapVerifyLevel() & EEConfig::HEAPVERIFY_GC) #endif #if defined(FEATURE_EVENT_TRACE) && defined(BACKGROUND_GC) - || (ETW::GCLog::ShouldTrackMovementForEtw() && settings.concurrent) + || (bgc_heap_walk_for_etw_p && settings.concurrent) #endif ) { @@ -15331,7 +15339,7 @@ void gc_heap::gc1() #ifdef BACKGROUND_GC assert (settings.concurrent == (uint32_t)(bgc_thread_id.IsCurrentThread())); #ifdef FEATURE_EVENT_TRACE - if (ETW::GCLog::ShouldTrackMovementForEtw() && settings.concurrent) + if (bgc_heap_walk_for_etw_p && settings.concurrent) { make_free_lists_for_profiler_for_bgc(); } @@ -16402,8 +16410,7 @@ int gc_heap::garbage_collect (int n) } { - int gen_num_for_data = ((settings.condemned_generation < (max_generation - 1)) ? - (settings.condemned_generation + 1) : (max_generation + 1)); + int gen_num_for_data = max_generation + 1; for (int i = 0; i <= gen_num_for_data; i++) { gc_data_per_heap.gen_data[i].size_before = generation_size (i); @@ -31185,6 +31192,10 @@ void gc_heap::background_sweep() if (bgc_t_join.joined()) #endif //MULTIPLE_HEAPS { +#ifdef FEATURE_EVENT_TRACE + bgc_heap_walk_for_etw_p = ETW::GCLog::ShouldTrackMovementForEtw(); +#endif //FEATURE_EVENT_TRACE + leave_spin_lock (&gc_lock); #ifdef MULTIPLE_HEAPS diff --git a/src/gc/gcpriv.h b/src/gc/gcpriv.h index 868c59e657..1727a4cf4d 100644 --- a/src/gc/gcpriv.h +++ b/src/gc/gcpriv.h @@ -141,12 +141,12 @@ inline void FATAL_GC_ERROR() #if defined (SYNCHRONIZATION_STATS) || defined (STAGE_STATS) #define BEGIN_TIMING(x) \ - LARGE_INTEGER x##_start; \ - x##_start = GCToOSInterface::QueryPerformanceCounter () + int64_t x##_start; \ + x##_start = GCToOSInterface::QueryPerformanceCounter() #define END_TIMING(x) \ - LARGE_INTEGER x##_end; \ - x##_end = GCToOSInterface::QueryPerformanceCounter (); \ + int64_t x##_end; \ + x##_end = GCToOSInterface::QueryPerformanceCounter(); \ x += x##_end - x##_start #else |