< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
*** 2471,2482 ****
size_t G1CollectedHeap::max_capacity() const {
return _hrm.reserved().byte_size();
}
jlong G1CollectedHeap::millis_since_last_gc() {
! // assert(false, "NYI");
return 0;
}
void G1CollectedHeap::prepare_for_verify() {
_verifier->prepare_for_verify();
}
--- 2471,2490 ----
size_t G1CollectedHeap::max_capacity() const {
return _hrm.reserved().byte_size();
}
jlong G1CollectedHeap::millis_since_last_gc() {
! // See the notes in GenCollectedHeap::millis_since_last_gc()
! // for more information about the implementation.
! jlong ret_val = (os::javaTimeNanos() / NANOSECS_PER_MILLISEC) -
! _g1_policy->full_collection_end_millis();
! if (ret_val < 0) {
! log_warning(gc)("millis_since_last_gc() would return : " JLONG_FORMAT
! ". returning zero instead.", ret_val);
return 0;
+ }
+ return ret_val;
}
void G1CollectedHeap::prepare_for_verify() {
_verifier->prepare_for_verify();
}
< prev index next >