< prev index next >
src/hotspot/share/gc/shared/collectedHeap.cpp
Print this page
rev 60422 : [mq]: 8248401-ayang-review
*** 189,198 ****
--- 189,199 ----
// Memory state functions.
CollectedHeap::CollectedHeap() :
_is_gc_active(false),
+ _last_whole_heap_examined_time_ns(os::javaTimeNanos()),
_total_collections(0),
_total_full_collections(0),
_gc_cause(GCCause::_no_gc),
_gc_lastcause(GCCause::_no_gc)
{
*** 486,495 ****
--- 487,504 ----
thread->tlab().resize();
}
}
}
+ jlong CollectedHeap::millis_since_last_whole_heap_examined() {
+ return (os::javaTimeNanos() - _last_whole_heap_examined_time_ns) / NANOSECS_PER_MILLISEC;
+ }
+
+ void CollectedHeap::record_whole_heap_examined_timestamp() {
+ _last_whole_heap_examined_time_ns = os::javaTimeNanos();
+ }
+
void CollectedHeap::full_gc_dump(GCTimer* timer, bool before) {
assert(timer != NULL, "timer is null");
if ((HeapDumpBeforeFullGC && before) || (HeapDumpAfterFullGC && !before)) {
GCTraceTime(Info, gc) tm(before ? "Heap Dump (before full gc)" : "Heap Dump (after full gc)", timer);
HeapDumper::dump_heap();
< prev index next >