< prev index next > src/hotspot/share/code/dependencyContext.cpp
PerfCounter* DependencyContext::_perf_total_buckets_allocated_count = NULL;
PerfCounter* DependencyContext::_perf_total_buckets_deallocated_count = NULL;
PerfCounter* DependencyContext::_perf_total_buckets_stale_count = NULL;
PerfCounter* DependencyContext::_perf_total_buckets_stale_acc_count = NULL;
-nmethodBucket* volatile DependencyContext::_purge_list = NULL;
-volatile uint64_t DependencyContext::_cleaning_epoch = 0;
+nmethodBucket* volatile DependencyContext::_purge_list = NULL;
+volatile uint64_t DependencyContext::_cleaning_epoch = 0;
+uint64_t DependencyContext::_cleaning_epoch_monotonic = 0;
void dependencyContext_init() {
DependencyContext::init();
}
// 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();
+ uint64_t epoch = ++_cleaning_epoch_monotonic;
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
< prev index next >