diff --git a/src/hotspot/share/code/codeCache.cpp b/src/hotspot/share/code/codeCache.cpp index e4537c11f99..5cbe5aa32d5 100644 --- a/src/hotspot/share/code/codeCache.cpp +++ b/src/hotspot/share/code/codeCache.cpp @@ -716,6 +716,7 @@ void CodeCache::update_cold_gc_count() { size_t used = max - free; double gc_interval = time - last_time; + log_info(codecache)(">>> CodeCache::update_cold_gc_count _unloading_threshold_gc_requested = false"); _unloading_threshold_gc_requested = false; _last_unloading_time = time; _last_unloading_used = used; @@ -790,6 +791,7 @@ void CodeCache::gc_on_allocation() { size_t used = max - free; double free_ratio = double(free) / double(max); if (free_ratio <= StartAggressiveSweepingAt / 100.0) { + log_info(codecache)(">>> Should start GC (aggressive) (_unloading_threshold_gc_requested = %d)", _unloading_threshold_gc_requested); // In case the GC is concurrent, we make sure only one thread requests the GC. if (Atomic::cmpxchg(&_unloading_threshold_gc_requested, false, true) == false) { log_info(codecache)("Triggering aggressive GC due to having only %.3f%% free memory", free_ratio * 100.0); @@ -816,6 +818,7 @@ void CodeCache::gc_on_allocation() { // If code cache has been allocated without any GC at all, let's make sure // it is eventually invoked to avoid trouble. if (allocated_since_last_ratio > threshold) { + log_info(codecache)(">>> Should start GC (threshold) (_unloading_threshold_gc_requested = %d)", _unloading_threshold_gc_requested); // In case the GC is concurrent, we make sure only one thread requests the GC. if (Atomic::cmpxchg(&_unloading_threshold_gc_requested, false, true) == false) { log_info(codecache)("Triggering threshold (%.3f%%) GC due to allocating %.3f%% since last unloading (%.3f%% used -> %.3f%% used)", @@ -878,6 +881,7 @@ void CodeCache::arm_all_nmethods() { // Mark nmethods for unloading if they contain otherwise unreachable oops. void CodeCache::do_unloading(bool unloading_occurred) { + log_info(codecache)(">>> CodeCache::do_unloading"); assert_locked_or_safepoint(CodeCache_lock); CompiledMethodIterator iter(CompiledMethodIterator::all_blobs); while(iter.next()) {