< prev index next >

test/hotspot/gtest/gc/g1/test_g1FreeIdSet.cpp

Print this page

        

*** 25,35 **** #include "precompiled.hpp" #include "gc/g1/g1FreeIdSet.hpp" #include "memory/allocation.hpp" #include "runtime/atomic.hpp" #include "runtime/interfaceSupport.inline.hpp" - #include "runtime/orderAccess.hpp" #include "runtime/semaphore.inline.hpp" #include "runtime/thread.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" #include "utilities/ostream.hpp" --- 25,34 ----
*** 106,116 **** _allocations(0), _thread_number(thread_number) {} virtual void main_run() { ! while (OrderAccess::load_acquire(_continue_running)) { uint id = _set->claim_par_id(); _set->release_par_id(id); ++_allocations; ThreadBlockInVM tbiv(this); // Safepoint check. } --- 105,115 ---- _allocations(0), _thread_number(thread_number) {} virtual void main_run() { ! while (Atomic::load_acquire(_continue_running)) { uint id = _set->claim_par_id(); _set->release_par_id(id); ++_allocations; ThreadBlockInVM tbiv(this); // Safepoint check. }
*** 145,155 **** tty->print_cr("Stressing G1FreeIdSet for %u ms", milliseconds_to_run); { ThreadInVMfromNative invm(this_thread); this_thread->sleep(milliseconds_to_run); } ! OrderAccess::release_store(&continue_running, false); for (uint i = 0; i < nthreads; ++i) { ThreadInVMfromNative invm(this_thread); post.wait_with_safepoint_check(this_thread); } tty->print_cr("total allocations: " SIZE_FORMAT, total_allocations); --- 144,154 ---- tty->print_cr("Stressing G1FreeIdSet for %u ms", milliseconds_to_run); { ThreadInVMfromNative invm(this_thread); this_thread->sleep(milliseconds_to_run); } ! Atomic::release_store(&continue_running, false); for (uint i = 0; i < nthreads; ++i) { ThreadInVMfromNative invm(this_thread); post.wait_with_safepoint_check(this_thread); } tty->print_cr("total allocations: " SIZE_FORMAT, total_allocations);
< prev index next >