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

Commit

Permalink
Merge pull request #5775 from Maoni0/issue5773
Browse files Browse the repository at this point in the history
porting 5773 to release/1.0.0
  • Loading branch information
ellismg authored Jun 14, 2016
2 parents aa8aef1 + b0571dd commit abbb8f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/gc/env/gcenv.base.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ void LogSpewAlways(const char *fmt, ...);

void StompWriteBarrierEphemeral(bool isRuntimeSuspended);
void StompWriteBarrierResize(bool isRuntimeSuspended, bool bReqUpperBoundsCheck);
bool IsGCThread();

class CLRConfig
{
Expand Down
8 changes: 4 additions & 4 deletions src/gc/gc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -15320,7 +15320,7 @@ void gc_heap::gc1()
if (!settings.concurrent)
#endif //BACKGROUND_GC
{
adjust_ephemeral_limits(!!IsSuspendEEThread());
adjust_ephemeral_limits(!!IsGCThread());
}

#ifdef BACKGROUND_GC
Expand Down Expand Up @@ -16167,7 +16167,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
Expand Down
5 changes: 5 additions & 0 deletions src/gc/sample/gcenv.ee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ void StompWriteBarrierResize(bool /* isRuntimeSuspended */, bool /*bReqUpperBoun
{
}

bool IsGCThread()
{
return false;
}

void SwitchToWriteWatchBarrier()
{
}
Expand Down

0 comments on commit abbb8f6

Please sign in to comment.