Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 3bd9166

Browse files
committed
porting 5773 to release/1.0.0
1 parent 12a2d7b commit 3bd9166

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

src/gc/env/gcenv.base.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,7 @@ void LogSpewAlways(const char *fmt, ...);
550550

551551
void StompWriteBarrierEphemeral(bool isRuntimeSuspended);
552552
void StompWriteBarrierResize(bool isRuntimeSuspended, bool bReqUpperBoundsCheck);
553+
bool IsGCThread();
553554

554555
class CLRConfig
555556
{

src/gc/gc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7221,7 +7221,7 @@ int gc_heap::grow_brick_card_tables (uint8_t* start,
72217221

72227222
// Either this thread was the thread that did the suspension which means we are suspended; or this is called
72237223
// from a GC thread which means we are in a blocking GC and also suspended.
7224-
BOOL is_runtime_suspended = IsSuspendEEThread() || IsGCSpecialThread();
7224+
BOOL is_runtime_suspended = IsGCThread();
72257225
if (!is_runtime_suspended)
72267226
{
72277227
// 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,
72687268
// to be changed, so we are doing this after all global state has
72697269
// been updated. See the comment above suspend_EE() above for more
72707270
// info.
7271-
StompWriteBarrierResize(!!IsSuspendEEThread(), la != saved_g_lowest_address);
7271+
StompWriteBarrierResize(!!IsGCThread(), la != saved_g_lowest_address);
72727272
}
72737273

72747274
// We need to make sure that other threads executing checked write barriers
@@ -15320,7 +15320,7 @@ void gc_heap::gc1()
1532015320
if (!settings.concurrent)
1532115321
#endif //BACKGROUND_GC
1532215322
{
15323-
adjust_ephemeral_limits(!!IsSuspendEEThread());
15323+
adjust_ephemeral_limits(!!IsGCThread());
1532415324
}
1532515325

1532615326
#ifdef BACKGROUND_GC
@@ -16167,7 +16167,7 @@ BOOL gc_heap::expand_soh_with_minimal_gc()
1616716167
dd_gc_new_allocation (dynamic_data_of (max_generation)) -= ephemeral_size;
1616816168
dd_new_allocation (dynamic_data_of (max_generation)) = dd_gc_new_allocation (dynamic_data_of (max_generation));
1616916169

16170-
adjust_ephemeral_limits(!!IsSuspendEEThread());
16170+
adjust_ephemeral_limits(!!IsGCThread());
1617116171
return TRUE;
1617216172
}
1617316173
else

src/gc/sample/gcenv.ee.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,16 @@ void StompWriteBarrierResize(bool /* isRuntimeSuspended */, bool /*bReqUpperBoun
249249
{
250250
}
251251

252+
bool IsSuspendEEThread()
253+
{
254+
return false;
255+
}
256+
257+
bool IsGCThread()
258+
{
259+
return false;
260+
}
261+
252262
void SwitchToWriteWatchBarrier()
253263
{
254264
}

0 commit comments

Comments
 (0)