< prev index next >

src/hotspot/share/runtime/sweeper.cpp


*** 140,150 **** } #else #define SWEEP(nm) #endif ! CompiledMethodIterator NMethodSweeper::_current; // Current compiled method long NMethodSweeper::_traversals = 0; // Stack scan count, also sweep ID. long NMethodSweeper::_total_nof_code_cache_sweeps = 0; // Total number of full sweeps of the code cache long NMethodSweeper::_time_counter = 0; // Virtual time used to periodically invoke sweeper long NMethodSweeper::_last_sweep = 0; // Value of _time_counter when the last sweep happened int NMethodSweeper::_seen = 0; // Nof. nmethod we have currently processed in current pass of CodeCache --- 140,150 ---- } #else #define SWEEP(nm) #endif ! CompiledMethodIterator NMethodSweeper::_current(false /* only_alive */, false /* only_not_unloading */); // Current compiled method long NMethodSweeper::_traversals = 0; // Stack scan count, also sweep ID. long NMethodSweeper::_total_nof_code_cache_sweeps = 0; // Total number of full sweeps of the code cache long NMethodSweeper::_time_counter = 0; // Virtual time used to periodically invoke sweeper long NMethodSweeper::_last_sweep = 0; // Value of _time_counter when the last sweep happened int NMethodSweeper::_seen = 0; // Nof. nmethod we have currently processed in current pass of CodeCache ***************
*** 272,282 **** // Check for restart assert(_current.method() == NULL, "should only happen between sweeper cycles"); assert(wait_for_stack_scanning(), "should only happen between sweeper cycles"); _seen = 0; ! _current = CompiledMethodIterator(); // Initialize to first nmethod _current.next(); _traversals += 1; _total_time_this_sweep = Tickspan(); --- 272,282 ---- // Check for restart assert(_current.method() == NULL, "should only happen between sweeper cycles"); assert(wait_for_stack_scanning(), "should only happen between sweeper cycles"); _seen = 0; ! _current = CompiledMethodIterator(false /* only_alive */, false /* only_not_unloading */); // Initialize to first nmethod _current.next(); _traversals += 1; _total_time_this_sweep = Tickspan(); ***************
*** 651,661 **** public: CompiledMethodMarker(CompiledMethod* cm) { JavaThread* current = JavaThread::current(); assert (current->is_Code_cache_sweeper_thread(), "Must be"); _thread = (CodeCacheSweeperThread*)current; ! if (!cm->is_zombie() && !cm->is_unloaded()) { // Only expose live nmethods for scanning _thread->set_scanned_compiled_method(cm); } } ~CompiledMethodMarker() { --- 651,661 ---- public: CompiledMethodMarker(CompiledMethod* cm) { JavaThread* current = JavaThread::current(); assert (current->is_Code_cache_sweeper_thread(), "Must be"); _thread = (CodeCacheSweeperThread*)current; ! if (!cm->is_zombie() && !cm->is_unloading()) { // Only expose live nmethods for scanning _thread->set_scanned_compiled_method(cm); } } ~CompiledMethodMarker() { ***************
*** 695,705 **** SWEEP(cm); // Skip methods that are currently referenced by the VM if (cm->is_locked_by_vm()) { // But still remember to clean-up inline caches for alive nmethods ! if (cm->is_alive()) { // Clean inline caches that point to zombie/non-entrant/unloaded nmethods CompiledICLocker ml(cm); cm->cleanup_inline_caches(false); SWEEP(cm); } --- 695,705 ---- SWEEP(cm); // Skip methods that are currently referenced by the VM if (cm->is_locked_by_vm()) { // But still remember to clean-up inline caches for alive nmethods ! if (cm->is_alive() && !cm->is_unloading()) { // Clean inline caches that point to zombie/non-entrant/unloaded nmethods CompiledICLocker ml(cm); cm->cleanup_inline_caches(false); SWEEP(cm); } ***************
*** 784,794 **** } void NMethodSweeper::possibly_flush(nmethod* nm) { if (UseCodeCacheFlushing) { ! if (!nm->is_locked_by_vm() && !nm->is_native_method() && !nm->is_not_installed()) { bool make_not_entrant = false; // Do not make native methods not-entrant nm->dec_hotness_counter(); // Get the initial value of the hotness counter. This value depends on the --- 784,794 ---- } void NMethodSweeper::possibly_flush(nmethod* nm) { if (UseCodeCacheFlushing) { ! if (!nm->is_locked_by_vm() && !nm->is_native_method() && !nm->is_not_installed() && !nm->is_unloading()) { bool make_not_entrant = false; // Do not make native methods not-entrant nm->dec_hotness_counter(); // Get the initial value of the hotness counter. This value depends on the
< prev index next >