< prev index next >

src/hotspot/share/code/dependencyContext.cpp


*** 110,119 **** --- 110,120 ---- } void DependencyContext::release(nmethodBucket* b) { bool expunge = Atomic::load(&_cleaning_epoch) == 0; if (expunge) { + assert_locked_or_safepoint(CodeCache_lock); delete b; if (UsePerfData) { _perf_total_buckets_deallocated_count->inc(); } } else { ***************
*** 202,212 **** } // // Invalidate all dependencies in the context int DependencyContext::remove_all_dependents() { - assert_locked_or_safepoint(CodeCache_lock); nmethodBucket* b = dependencies_not_unloading(); set_dependencies(NULL); int marked = 0; int removed = 0; while (b != NULL) { --- 203,212 ---- ***************
*** 307,326 **** } // After the gc_prologue, the dependency contexts may be claimed by the GC // and releasing of nmethodBucket entries will be deferred and placed on // a purge list to be deleted later. ! void DependencyContext::gc_prologue() { assert(SafepointSynchronize::is_at_safepoint(), "must be"); ! uint64_t epoch = SafepointSynchronize::_safepoint_counter; Atomic::store(epoch, &_cleaning_epoch); } // The epilogue marks the end of dependency context cleanup by the GC, // and also makes subsequent releases of nmethodBuckets case immediate // deletion. It is admitted to end the cleanup in a concurrent phase. ! void DependencyContext::gc_epilogue() { uint64_t epoch = 0; Atomic::store(epoch, &_cleaning_epoch); } // This function skips over nmethodBuckets in the list corresponding to --- 307,326 ---- } // After the gc_prologue, the dependency contexts may be claimed by the GC // and releasing of nmethodBucket entries will be deferred and placed on // a purge list to be deleted later. ! void DependencyContext::cleaning_start() { assert(SafepointSynchronize::is_at_safepoint(), "must be"); ! uint64_t epoch = SafepointSynchronize::safepoint_counter(); Atomic::store(epoch, &_cleaning_epoch); } // The epilogue marks the end of dependency context cleanup by the GC, // and also makes subsequent releases of nmethodBuckets case immediate // deletion. It is admitted to end the cleanup in a concurrent phase. ! void DependencyContext::cleaning_end() { uint64_t epoch = 0; Atomic::store(epoch, &_cleaning_epoch); } // This function skips over nmethodBuckets in the list corresponding to
< prev index next >