Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 4911:d903bf750e9f
7129514: time warp warnings after 7117303
Summary: 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
author | johnc |
---|---|
date | Wed, 18 Jan 2012 09:50:16 -0800 |
parents | be649fefcdc2 |
children | b632e80fc9dc |
comparison
equal
deleted
inserted
replaced
4910:caa4652b4414 | 4911:d903bf750e9f |
---|---|
6090 _intra_sweep_estimate.sample(_intra_sweep_timer.seconds()); | 6090 _intra_sweep_estimate.sample(_intra_sweep_timer.seconds()); |
6091 | 6091 |
6092 _inter_sweep_timer.reset(); | 6092 _inter_sweep_timer.reset(); |
6093 _inter_sweep_timer.start(); | 6093 _inter_sweep_timer.start(); |
6094 | 6094 |
6095 update_time_of_last_gc(os::javaTimeMillis()); | 6095 // We need to use a monotonically non-deccreasing time in ms |
6096 // or we will see time-warp warnings and os::javaTimeMillis() | |
6097 // does not guarantee monotonicity. | |
6098 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; | |
6099 update_time_of_last_gc(now); | |
6096 | 6100 |
6097 // NOTE on abstract state transitions: | 6101 // NOTE on abstract state transitions: |
6098 // Mutators allocate-live and/or mark the mod-union table dirty | 6102 // Mutators allocate-live and/or mark the mod-union table dirty |
6099 // based on the state of the collection. The former is done in | 6103 // based on the state of the collection. The former is done in |
6100 // the interval [Marking, Sweeping] and the latter in the interval | 6104 // the interval [Marking, Sweeping] and the latter in the interval |