src/share/vm/runtime/sweeper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8029091 Cdiff src/share/vm/runtime/sweeper.cpp

src/share/vm/runtime/sweeper.cpp

Print this page

        

*** 254,266 **** // As a result, we invoke the sweeper after // 15 invocations of 'mark_active_nmethods. // Large ReservedCodeCacheSize: (e.g., 256M + code Cache is 90% full). The formula // computes: (256 / 16) - 10 = 6. if (!_should_sweep) { ! int time_since_last_sweep = _time_counter - _last_sweep; ! double wait_until_next_sweep = (ReservedCodeCacheSize / (16 * M)) - time_since_last_sweep - ! CodeCache::reverse_free_ratio(); if ((wait_until_next_sweep <= 0.0) || !CompileBroker::should_compile_new_jobs()) { _should_sweep = true; } } --- 254,268 ---- // As a result, we invoke the sweeper after // 15 invocations of 'mark_active_nmethods. // Large ReservedCodeCacheSize: (e.g., 256M + code Cache is 90% full). The formula // computes: (256 / 16) - 10 = 6. if (!_should_sweep) { ! const int time_since_last_sweep = _time_counter - _last_sweep; ! const int max_wait_time = ReservedCodeCacheSize / (16 * M); ! // Use only signed types ! double wait_until_next_sweep = max_wait_time - time_since_last_sweep - CodeCache::reverse_free_ratio(); ! assert(wait_until_next_sweep <= (double)max_wait_time, "Calculation of code cache sweeper interval is incorrect"); if ((wait_until_next_sweep <= 0.0) || !CompileBroker::should_compile_new_jobs()) { _should_sweep = true; } }
src/share/vm/runtime/sweeper.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File