hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
changeset 11251 e29da6b5622b
parent 11178 8318f84ac604
child 11636 3c07b54482a5
equal deleted inserted replaced
11250:ef1ab0772513 11251:e29da6b5622b
  3396            "live objects skipped because closure is full");
  3396            "live objects skipped because closure is full");
  3397   }
  3397   }
  3398 }
  3398 }
  3399 
  3399 
  3400 jlong PSParallelCompact::millis_since_last_gc() {
  3400 jlong PSParallelCompact::millis_since_last_gc() {
  3401   jlong ret_val = os::javaTimeMillis() - _time_of_last_gc;
  3401   // We need a monotonically non-deccreasing time in ms but
       
  3402   // os::javaTimeMillis() does not guarantee monotonicity.
       
  3403   jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
       
  3404   jlong ret_val = now - _time_of_last_gc;
  3402   // XXX See note in genCollectedHeap::millis_since_last_gc().
  3405   // XXX See note in genCollectedHeap::millis_since_last_gc().
  3403   if (ret_val < 0) {
  3406   if (ret_val < 0) {
  3404     NOT_PRODUCT(warning("time warp: %d", ret_val);)
  3407     NOT_PRODUCT(warning("time warp: "INT64_FORMAT, ret_val);)
  3405     return 0;
  3408     return 0;
  3406   }
  3409   }
  3407   return ret_val;
  3410   return ret_val;
  3408 }
  3411 }
  3409 
  3412 
  3410 void PSParallelCompact::reset_millis_since_last_gc() {
  3413 void PSParallelCompact::reset_millis_since_last_gc() {
  3411   _time_of_last_gc = os::javaTimeMillis();
  3414   // We need a monotonically non-deccreasing time in ms but
       
  3415   // os::javaTimeMillis() does not guarantee monotonicity.
       
  3416   _time_of_last_gc = os::javaTimeNanos() / NANOSECS_PER_MILLISEC;
  3412 }
  3417 }
  3413 
  3418 
  3414 ParMarkBitMap::IterationStatus MoveAndUpdateClosure::copy_until_full()
  3419 ParMarkBitMap::IterationStatus MoveAndUpdateClosure::copy_until_full()
  3415 {
  3420 {
  3416   if (source() != destination()) {
  3421   if (source() != destination()) {