mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8134953: Make the GC ID available in a central place
Reviewed-by: pliden, jmasa
This commit is contained in:
parent
d516b42238
commit
003892f897
41 changed files with 253 additions and 291 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "gc/serial/markSweep.hpp"
|
||||
#include "gc/shared/gcCause.hpp"
|
||||
#include "gc/shared/gcHeapSummary.hpp"
|
||||
#include "gc/shared/gcId.hpp"
|
||||
#include "gc/shared/gcLocker.inline.hpp"
|
||||
#include "gc/shared/gcTimer.hpp"
|
||||
#include "gc/shared/gcTrace.hpp"
|
||||
|
@ -113,6 +114,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
|||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
GCCause::Cause gc_cause = heap->gc_cause();
|
||||
|
||||
GCIdMark gc_id_mark;
|
||||
_gc_timer->register_gc_start();
|
||||
_gc_tracer->report_gc_start(gc_cause, _gc_timer->gc_start());
|
||||
|
||||
|
@ -165,7 +167,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
|
|||
HandleMark hm;
|
||||
|
||||
TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
|
||||
GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL, _gc_tracer->gc_id());
|
||||
GCTraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, NULL);
|
||||
TraceCollectorStats tcs(counters());
|
||||
TraceMemoryManagerStats tms(true /* Full GC */,gc_cause);
|
||||
|
||||
|
@ -508,7 +510,7 @@ void PSMarkSweep::deallocate_stacks() {
|
|||
|
||||
void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
|
||||
// Recursively traverse all live objects and mark them
|
||||
GCTraceTime tm("phase 1", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
|
||||
GCTraceTime tm("phase 1", PrintGCDetails && Verbose, true, _gc_timer);
|
||||
|
||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
|
||||
|
@ -541,7 +543,7 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
|
|||
ref_processor()->setup_policy(clear_all_softrefs);
|
||||
const ReferenceProcessorStats& stats =
|
||||
ref_processor()->process_discovered_references(
|
||||
is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, _gc_timer, _gc_tracer->gc_id());
|
||||
is_alive_closure(), mark_and_push_closure(), follow_stack_closure(), NULL, _gc_timer);
|
||||
gc_tracer()->report_gc_reference_stats(stats);
|
||||
}
|
||||
|
||||
|
@ -567,7 +569,7 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
|
|||
|
||||
|
||||
void PSMarkSweep::mark_sweep_phase2() {
|
||||
GCTraceTime tm("phase 2", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
|
||||
GCTraceTime tm("phase 2", PrintGCDetails && Verbose, true, _gc_timer);
|
||||
|
||||
// Now all live objects are marked, compute the new object addresses.
|
||||
|
||||
|
@ -594,7 +596,7 @@ static PSAlwaysTrueClosure always_true;
|
|||
|
||||
void PSMarkSweep::mark_sweep_phase3() {
|
||||
// Adjust the pointers to reflect the new locations
|
||||
GCTraceTime tm("phase 3", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
|
||||
GCTraceTime tm("phase 3", PrintGCDetails && Verbose, true, _gc_timer);
|
||||
|
||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
PSYoungGen* young_gen = heap->young_gen();
|
||||
|
@ -634,7 +636,7 @@ void PSMarkSweep::mark_sweep_phase3() {
|
|||
|
||||
void PSMarkSweep::mark_sweep_phase4() {
|
||||
EventMark m("4 compact heap");
|
||||
GCTraceTime tm("phase 4", PrintGCDetails && Verbose, true, _gc_timer, _gc_tracer->gc_id());
|
||||
GCTraceTime tm("phase 4", PrintGCDetails && Verbose, true, _gc_timer);
|
||||
|
||||
// All pointers are now adjusted, move objects accordingly
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue