diff options
author | Maoni0 <maonis@microsoft.com> | 2016-06-13 14:57:12 -0700 |
---|---|---|
committer | Maoni0 <maonis@microsoft.com> | 2016-06-14 16:14:10 -0700 |
commit | f1aeb18e104cf02439c948ab5f20cf4bc8a27b03 (patch) | |
tree | fd74626030a7786ea287374b54c9de70b66f58ca /src | |
parent | 8442c3e1881315d207404e1e3e99840b15fc4e9f (diff) | |
download | coreclr-f1aeb18e104cf02439c948ab5f20cf4bc8a27b03.tar.gz coreclr-f1aeb18e104cf02439c948ab5f20cf4bc8a27b03.tar.bz2 coreclr-f1aeb18e104cf02439c948ab5f20cf4bc8a27b03.zip |
My last fix of checking whether the runtime was suspended was incomplete.
I needed to check at the 3 other places. Before the software write watch
implementation, this check was in the write barrier code itself and was
doing the right thing. So I am just using the same thing (ie, IsGCThread)
to check whether the runtime is suspended.
Diffstat (limited to 'src')
-rw-r--r-- | src/gc/env/gcenv.base.h | 2 | ||||
-rw-r--r-- | src/gc/gc.cpp | 8 | ||||
-rw-r--r-- | src/gc/sample/gcenv.ee.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gc/env/gcenv.base.h b/src/gc/env/gcenv.base.h index 88f86ce758..17a5416830 100644 --- a/src/gc/env/gcenv.base.h +++ b/src/gc/env/gcenv.base.h @@ -550,7 +550,7 @@ void LogSpewAlways(const char *fmt, ...); void StompWriteBarrierEphemeral(bool isRuntimeSuspended); void StompWriteBarrierResize(bool isRuntimeSuspended, bool bReqUpperBoundsCheck); -bool IsSuspendEEThread(); +bool IsGCThread(); class CLRConfig { diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp index 13713bff89..de538097bb 100644 --- a/src/gc/gc.cpp +++ b/src/gc/gc.cpp @@ -7221,7 +7221,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start, // Either this thread was the thread that did the suspension which means we are suspended; or this is called // from a GC thread which means we are in a blocking GC and also suspended. - BOOL is_runtime_suspended = IsSuspendEEThread() || IsGCSpecialThread(); + BOOL is_runtime_suspended = IsGCThread(); if (!is_runtime_suspended) { // Note on points where the runtime is suspended anywhere in this function. Upon an attempt to suspend the @@ -7268,7 +7268,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start, // to be changed, so we are doing this after all global state has // been updated. See the comment above suspend_EE() above for more // info. - StompWriteBarrierResize(!!IsSuspendEEThread(), la != saved_g_lowest_address); + StompWriteBarrierResize(!!IsGCThread(), la != saved_g_lowest_address); } // We need to make sure that other threads executing checked write barriers @@ -15321,7 +15321,7 @@ void gc_heap::gc1() if (!settings.concurrent) #endif //BACKGROUND_GC { - adjust_ephemeral_limits(!!IsSuspendEEThread()); + adjust_ephemeral_limits(!!IsGCThread()); } #ifdef BACKGROUND_GC @@ -16168,7 +16168,7 @@ BOOL gc_heap::expand_soh_with_minimal_gc() dd_gc_new_allocation (dynamic_data_of (max_generation)) -= ephemeral_size; dd_new_allocation (dynamic_data_of (max_generation)) = dd_gc_new_allocation (dynamic_data_of (max_generation)); - adjust_ephemeral_limits(!!IsSuspendEEThread()); + adjust_ephemeral_limits(!!IsGCThread()); return TRUE; } else diff --git a/src/gc/sample/gcenv.ee.cpp b/src/gc/sample/gcenv.ee.cpp index 2ce0fdab86..1d380d0a91 100644 --- a/src/gc/sample/gcenv.ee.cpp +++ b/src/gc/sample/gcenv.ee.cpp @@ -249,7 +249,7 @@ void StompWriteBarrierResize(bool /* isRuntimeSuspended */, bool /*bReqUpperBoun { } -bool IsSuspendEEThread() +bool IsGCThread() { return false; } |