未验证 提交 579b1d93 编写于 作者: A Andrew Au 提交者: GitHub

Remove gc_lh_block_event (#2059)

上级 fd7a5e8c
......@@ -2825,8 +2825,6 @@ BOOL gc_heap::bgc_thread_running;
CLRCriticalSection gc_heap::bgc_threads_timeout_cs;
GCEvent gc_heap::gc_lh_block_event;
#endif //BACKGROUND_GC
#ifdef MARK_LIST
......@@ -16542,8 +16540,6 @@ void gc_heap::init_background_gc ()
background_saved_lowest_address,
background_saved_highest_address));
}
gc_lh_block_event.Reset();
}
#endif //BACKGROUND_GC
......@@ -28352,36 +28348,18 @@ cleanup:
BOOL gc_heap::create_bgc_thread_support()
{
BOOL ret = FALSE;
uint8_t** parr;
if (!gc_lh_block_event.CreateManualEventNoThrow(FALSE))
{
goto cleanup;
}
//needs to have room for enough smallest objects fitting on a page
parr = new (nothrow) uint8_t*[1 + OS_PAGE_SIZE / MIN_OBJECT_SIZE];
if (!parr)
{
goto cleanup;
return FALSE;
}
make_c_mark_list (parr);
ret = TRUE;
cleanup:
if (!ret)
{
if (gc_lh_block_event.IsValid())
{
gc_lh_block_event.CloseEvent();
}
}
return ret;
return TRUE;
}
int gc_heap::check_for_ephemeral_alloc()
......@@ -28466,7 +28444,6 @@ void gc_heap::kill_gc_thread()
// In the secodn stage, we have the Loader lock and only one thread is
// alive. Hence we do not need to kill gc thread.
background_gc_done_event.CloseEvent();
gc_lh_block_event.CloseEvent();
bgc_start_event.CloseEvent();
bgc_threads_timeout_cs.Destroy();
bgc_thread = 0;
......@@ -34152,10 +34129,6 @@ void gc_heap::background_sweep()
//block concurrent allocation for large objects
dprintf (3, ("lh state: planning"));
if (gc_lh_block_event.IsValid())
{
gc_lh_block_event.Reset();
}
for (int i = 0; i <= (max_generation + 1); i++)
{
......@@ -34519,11 +34492,6 @@ void gc_heap::background_sweep()
disable_preemptive (true);
if (gc_lh_block_event.IsValid())
{
gc_lh_block_event.Set();
}
add_saved_spinlock_info (true, me_release, mt_bgc_loh_sweep);
leave_spin_lock (&more_space_lock_loh);
......@@ -397,17 +397,6 @@ uint32_t gc_heap::background_gc_wait (alloc_wait_reason awr, int time_out_ms)
return dwRet;
}
// Wait for background gc to finish sweeping large objects
void gc_heap::background_gc_wait_lh (alloc_wait_reason awr)
{
dprintf(2, ("Waiting end of background large sweep"));
assert (gc_lh_block_event.IsValid());
fire_alloc_wait_event_begin (awr);
user_thread_wait (&gc_lh_block_event, FALSE);
fire_alloc_wait_event_end (awr);
dprintf(2, ("Waiting end of background large sweep is done"));
}
#endif //BACKGROUND_GC
......
......@@ -3113,8 +3113,6 @@ protected:
PER_HEAP_ISOLATED
void fire_alloc_wait_event_end (alloc_wait_reason awr);
PER_HEAP
void background_gc_wait_lh (alloc_wait_reason awr = awr_ignored);
PER_HEAP
uint32_t background_gc_wait (alloc_wait_reason awr = awr_ignored, int time_out_ms = INFINITE);
PER_HEAP_ISOLATED
void start_c_gc();
......@@ -3665,9 +3663,6 @@ protected:
PER_HEAP_ISOLATED
GCEvent ee_proceed_event;
PER_HEAP
GCEvent gc_lh_block_event;
PER_HEAP_ISOLATED
bool gc_can_use_concurrent;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册