mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7129514: time warp warnings after 7117303
Replace calls to os::javaTimeMillis() that are used to update the milliseconds since the last GC to an equivalent that uses a monotonically non-decreasing time source. Reviewed-by: ysr, jmasa
This commit is contained in:
parent
6a31970946
commit
fa9d6d7682
4 changed files with 23 additions and 6 deletions
|
@ -6092,7 +6092,11 @@ void CMSCollector::sweep(bool asynch) {
|
|||
_inter_sweep_timer.reset();
|
||||
_inter_sweep_timer.start();
|
||||
|
||||
update_time_of_last_gc(os::javaTimeMillis());
|
||||
// We need to use a monotonically non-deccreasing time in ms
|
||||
// or we will see time-warp warnings and os::javaTimeMillis()
|
||||
// does not guarantee monotonicity.
|
||||
jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
|
||||
update_time_of_last_gc(now);
|
||||
|
||||
// NOTE on abstract state transitions:
|
||||
// Mutators allocate-live and/or mark the mod-union table dirty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue