7117303: VM uses non-monotonic time source and complains that it is non-monotonic

Replaces calls to os::javaTimeMillis(), which does not (and cannot) guarantee monotonicity, in GC code to an equivalent expression that uses os::javaTimeNanos(). os::javaTimeNanos is guaranteed monotonically non-decreasing if the underlying platform provides a monotonic time source. Changes in OS files are to make use of the newly defined constants in globalDefinitions.hpp.

Reviewed-by: dholmes, ysr
This commit is contained in:
John Cuthbertson 2011-12-19 10:02:05 -08:00
parent 2768349b41
commit 870bea622a
10 changed files with 57 additions and 57 deletions

View file

@ -175,6 +175,9 @@ const int MILLIUNITS = 1000; // milli units per base unit
const int MICROUNITS = 1000000; // micro units per base unit
const int NANOUNITS = 1000000000; // nano units per base unit
const jlong NANOSECS_PER_SEC = CONST64(1000000000);
const jint NANOSECS_PER_MILLISEC = 1000000;
inline const char* proper_unit_for_byte_size(size_t s) {
if (s >= 10*M) {
return "M";