mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8149035: Make the full_gc_dump() calls be recorded as part of the GC
Reviewed-by: jmasa, sjohanss
This commit is contained in:
parent
d2da0cb052
commit
1322b0fe56
9 changed files with 29 additions and 33 deletions
|
@ -572,19 +572,16 @@ void CollectedHeap::resize_all_tlabs() {
|
|||
}
|
||||
|
||||
void CollectedHeap::full_gc_dump(GCTimer* timer, bool before) {
|
||||
assert(timer != NULL, "timer is null");
|
||||
if ((HeapDumpBeforeFullGC && before) || (HeapDumpAfterFullGC && !before)) {
|
||||
GCIdMarkAndRestore gc_id_mark;
|
||||
FormatBuffer<> title("Heap Dump (%s full gc)", before ? "before" : "after");
|
||||
GCTraceTime(Info, gc) tm(title.buffer(), timer);
|
||||
GCTraceTime(Info, gc) tm(before ? "Heap Dump (before full gc)" : "Heap Dump (after full gc)", timer);
|
||||
HeapDumper::dump_heap();
|
||||
}
|
||||
|
||||
LogHandle(gc, classhisto) log;
|
||||
if (log.is_trace()) {
|
||||
GCTraceTime(Trace, gc, classhisto) tm(before ? "Class Histogram (before full gc)" : "Class Histogram (after full gc)", timer);
|
||||
ResourceMark rm;
|
||||
GCIdMarkAndRestore gc_id_mark;
|
||||
FormatBuffer<> title("Class Histogram (%s full gc)",
|
||||
before ? "before" : "after");
|
||||
GCTraceTime(Trace, gc, classhisto) tm(title.buffer(), timer);
|
||||
VM_GC_HeapInspection inspector(log.trace_stream(), false /* ! full gc */);
|
||||
inspector.doit();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue