src/share/vm/memory/generation.hpp

Print this page
rev 2869 : 7117303: VM uses non-monotonic time source and complains that it is non-monotonic
Summary: Replaces calls to os::javaTimeMillis(), which does not guarantee montonicity, in GC code to os::javaTimeNanos() with a suitable conversion factor. os::javaTimeNanos() mostly guarantees montonicity depending on the underlying OS implementation and, as a result, a better alternative. Changes in OS files are to make use of the newly defined constants in globalDefinitions.hpp.
Reviewed-by:

*** 414,424 **** // in progress. virtual jlong time_of_last_gc(jlong now) { // XXX See note in genCollectedHeap::millis_since_last_gc() NOT_PRODUCT( if (now < _time_of_last_gc) { ! warning("time warp: %d to %d", _time_of_last_gc, now); } ) return _time_of_last_gc; } --- 414,424 ---- // in progress. virtual jlong time_of_last_gc(jlong now) { // XXX See note in genCollectedHeap::millis_since_last_gc() NOT_PRODUCT( if (now < _time_of_last_gc) { ! warning("time warp: "INT64_FORMAT" to "INT64_FORMAT, _time_of_last_gc, now); } ) return _time_of_last_gc; }