src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/sweeper.cpp Mon Nov 25 14:06:27 2013
--- new/src/share/vm/runtime/sweeper.cpp Mon Nov 25 14:06:27 2013
*** 254,266 ****
--- 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;
double wait_until_next_sweep = (ReservedCodeCacheSize / (16 * M)) - time_since_last_sweep -
CodeCache::reverse_free_ratio();
+ 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