8307346: Add missing gc+phases logging for ObjectCount(AfterGC) JFR event collection code

Reviewed-by: tschatzl, shade, ayang
This commit is contained in:
Oli Gillespie 2023-05-04 09:19:19 +00:00 committed by Aleksey Shipilev
parent e206d57bfc
commit 3f1927a7f3
3 changed files with 12 additions and 3 deletions

View File

@ -325,7 +325,10 @@ void G1FullCollector::phase1_mark_live_objects() {
_heap->complete_cleaning(purged_class); _heap->complete_cleaning(purged_class);
} }
scope()->tracer()->report_object_count_after_gc(&_is_alive); {
GCTraceTime(Debug, gc, phases) debug("Report Object Count", scope()->timer());
scope()->tracer()->report_object_count_after_gc(&_is_alive);
}
#if TASKQUEUE_STATS #if TASKQUEUE_STATS
oop_queue_set()->print_and_reset_taskqueue_stats("Oop Queue"); oop_queue_set()->print_and_reset_taskqueue_stats("Oop Queue");
array_queue_set()->print_and_reset_taskqueue_stats("ObjArrayOop Queue"); array_queue_set()->print_and_reset_taskqueue_stats("ObjArrayOop Queue");

View File

@ -2067,7 +2067,10 @@ void PSParallelCompact::marking_phase(ParallelOldTracer *gc_tracer) {
JVMCI_ONLY(JVMCI::do_unloading(purged_class)); JVMCI_ONLY(JVMCI::do_unloading(purged_class));
} }
_gc_tracer.report_object_count_after_gc(is_alive_closure()); {
GCTraceTime(Debug, gc, phases) tm("Report Object Count", &_gc_timer);
_gc_tracer.report_object_count_after_gc(is_alive_closure());
}
#if TASKQUEUE_STATS #if TASKQUEUE_STATS
ParCompactionManager::oop_task_queues()->print_and_reset_taskqueue_stats("Oop Queue"); ParCompactionManager::oop_task_queues()->print_and_reset_taskqueue_stats("Oop Queue");
ParCompactionManager::_objarray_task_queues->print_and_reset_taskqueue_stats("ObjArrayOop Queue"); ParCompactionManager::_objarray_task_queues->print_and_reset_taskqueue_stats("ObjArrayOop Queue");

View File

@ -210,7 +210,10 @@ void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
JVMCI_ONLY(JVMCI::do_unloading(purged_class)); JVMCI_ONLY(JVMCI::do_unloading(purged_class));
} }
gc_tracer()->report_object_count_after_gc(&is_alive); {
GCTraceTime(Debug, gc, phases) tm_m("Report Object Count", gc_timer());
gc_tracer()->report_object_count_after_gc(&is_alive);
}
} }