Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk20u Public archive

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/hotspot/share/gc/g1/g1FullCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@ void G1FullCollector::phase1_mark_live_objects() {
_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
oop_queue_set()->print_and_reset_taskqueue_stats("Oop Queue");
array_queue_set()->print_and_reset_taskqueue_stats("ObjArrayOop Queue");
Expand Down
5 changes: 4 additions & 1 deletion src/hotspot/share/gc/parallel/psParallelCompact.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2070,7 +2070,10 @@ void PSParallelCompact::marking_phase(ParallelOldTracer *gc_tracer) {
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
ParCompactionManager::oop_task_queues()->print_and_reset_taskqueue_stats("Oop Queue");
ParCompactionManager::_objarray_task_queues->print_and_reset_taskqueue_stats("ObjArrayOop Queue");
Expand Down
5 changes: 4 additions & 1 deletion src/hotspot/share/gc/serial/genMarkSweep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,10 @@ void GenMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
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);
}
}


Expand Down