diff --git a/src/coreclr/src/gc/gc.cpp b/src/coreclr/src/gc/gc.cpp index 8c7498fd08ab48dea13a2019e663df42decce89b..23dec9796d199871136b018b51b92bd6bc9f6db5 100644 --- a/src/coreclr/src/gc/gc.cpp +++ b/src/coreclr/src/gc/gc.cpp @@ -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); diff --git a/src/coreclr/src/gc/gcee.cpp b/src/coreclr/src/gc/gcee.cpp index 079e63d26bd91d1c1829c24f04eedb9f84b55185..b742b1e106efa60e25340e02ffabbdd0102759be 100644 --- a/src/coreclr/src/gc/gcee.cpp +++ b/src/coreclr/src/gc/gcee.cpp @@ -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 diff --git a/src/coreclr/src/gc/gcpriv.h b/src/coreclr/src/gc/gcpriv.h index 8ba993451743c53c82aab3f176826f8d6ed8fbfe..833e79f367b00bcdfac0bf0dd46bd9c5a1b6c464 100644 --- a/src/coreclr/src/gc/gcpriv.h +++ b/src/coreclr/src/gc/gcpriv.h @@ -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;