mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8248401: Refactor/unify RMI gc support functionality
Move recent timestamp of most recent whole heap liveness analysis into CollectedHeap, removing the duplicates in all collectors Reviewed-by: kbarrett, ayang, stefank
This commit is contained in:
parent
1ad1659413
commit
9852a6f75c
25 changed files with 56 additions and 166 deletions
|
@ -843,7 +843,6 @@ ParallelOldTracer PSParallelCompact::_gc_tracer;
|
|||
elapsedTimer PSParallelCompact::_accumulated_time;
|
||||
unsigned int PSParallelCompact::_total_invocations = 0;
|
||||
unsigned int PSParallelCompact::_maximum_compaction_gc_num = 0;
|
||||
jlong PSParallelCompact::_time_of_last_gc = 0;
|
||||
CollectorCounters* PSParallelCompact::_counters = NULL;
|
||||
ParMarkBitMap PSParallelCompact::_mark_bitmap;
|
||||
ParallelCompactData PSParallelCompact::_summary_data;
|
||||
|
@ -1070,8 +1069,8 @@ void PSParallelCompact::post_compact()
|
|||
heap->gen_mangle_unused_area();
|
||||
}
|
||||
|
||||
// Update time of last GC
|
||||
reset_millis_since_last_gc();
|
||||
// Signal that we have completed a visit to all live objects.
|
||||
Universe::heap()->record_whole_heap_examined_timestamp();
|
||||
}
|
||||
|
||||
HeapWord*
|
||||
|
@ -3192,25 +3191,6 @@ void PSParallelCompact::fill_blocks(size_t region_idx)
|
|||
}
|
||||
}
|
||||
|
||||
jlong PSParallelCompact::millis_since_last_gc() {
|
||||
// We need a monotonically non-decreasing time in ms but
|
||||
// os::javaTimeMillis() does not guarantee monotonicity.
|
||||
jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
|
||||
jlong ret_val = now - _time_of_last_gc;
|
||||
// XXX See note in genCollectedHeap::millis_since_last_gc().
|
||||
if (ret_val < 0) {
|
||||
NOT_PRODUCT(log_warning(gc)("time warp: " JLONG_FORMAT, ret_val);)
|
||||
return 0;
|
||||
}
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
void PSParallelCompact::reset_millis_since_last_gc() {
|
||||
// We need a monotonically non-decreasing time in ms but
|
||||
// os::javaTimeMillis() does not guarantee monotonicity.
|
||||
_time_of_last_gc = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
|
||||
}
|
||||
|
||||
ParMarkBitMap::IterationStatus MoveAndUpdateClosure::copy_until_full()
|
||||
{
|
||||
if (source() != copy_destination()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue