Skip to content
Permalink
Browse files

8236851: Shenandoah: More details in Traversal GC event messages

Reviewed-by: shade
  • Loading branch information
rkennke committed Jan 10, 2020
1 parent 4f35b4a commit c2b462cf02e78e5fca53fa8c01bc2f76d23e3a49
@@ -2805,7 +2805,7 @@ void ShenandoahHeap::entry_init_traversal() {
ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
ShenandoahGCPhase phase(ShenandoahPhaseTimings::init_traversal_gc);

static const char* msg = "Pause Init Traversal";
static const char* msg = init_traversal_event_message();
GCTraceTime(Info, gc) time(msg, gc_timer());
EventMark em("%s", msg);

@@ -2820,7 +2820,7 @@ void ShenandoahHeap::entry_final_traversal() {
ShenandoahGCPhase total_phase(ShenandoahPhaseTimings::total_pause);
ShenandoahGCPhase phase(ShenandoahPhaseTimings::final_traversal_gc);

static const char* msg = "Pause Final Traversal";
static const char* msg = final_traversal_event_message();
GCTraceTime(Info, gc) time(msg, gc_timer());
EventMark em("%s", msg);

@@ -2972,7 +2972,7 @@ void ShenandoahHeap::entry_preclean() {
}

void ShenandoahHeap::entry_traversal() {
static const char* msg = "Concurrent traversal";
static const char* msg = conc_traversal_event_message();
GCTraceTime(Info, gc) time(msg, NULL, GCCause::_no_gc, true);
EventMark em("%s", msg);

@@ -3141,6 +3141,51 @@ const char* ShenandoahHeap::conc_mark_event_message() const {
}
}

const char* ShenandoahHeap::init_traversal_event_message() const {
bool proc_refs = process_references();
bool unload_cls = unload_classes();

if (proc_refs && unload_cls) {
return "Pause Init Traversal (process weakrefs) (unload classes)";
} else if (proc_refs) {
return "Pause Init Traversal (process weakrefs)";
} else if (unload_cls) {
return "Pause Init Traversal (unload classes)";
} else {
return "Pause Init Traversal";
}
}

const char* ShenandoahHeap::final_traversal_event_message() const {
bool proc_refs = process_references();
bool unload_cls = unload_classes();

if (proc_refs && unload_cls) {
return "Pause Final Traversal (process weakrefs) (unload classes)";
} else if (proc_refs) {
return "Pause Final Traversal (process weakrefs)";
} else if (unload_cls) {
return "Pause Final Traversal (unload classes)";
} else {
return "Pause Final Traversal";
}
}

const char* ShenandoahHeap::conc_traversal_event_message() const {
bool proc_refs = process_references();
bool unload_cls = unload_classes();

if (proc_refs && unload_cls) {
return "Concurrent Traversal (process weakrefs) (unload classes)";
} else if (proc_refs) {
return "Concurrent Traversal (process weakrefs)";
} else if (unload_cls) {
return "Concurrent Traversal (unload classes)";
} else {
return "Concurrent Traversal";
}
}

const char* ShenandoahHeap::degen_event_message(ShenandoahDegenPoint point) const {
switch (point) {
case _degenerated_unset:
@@ -438,6 +438,9 @@ class ShenandoahHeap : public CollectedHeap {
const char* init_mark_event_message() const;
const char* final_mark_event_message() const;
const char* conc_mark_event_message() const;
const char* init_traversal_event_message() const;
const char* final_traversal_event_message() const;
const char* conc_traversal_event_message() const;
const char* degen_event_message(ShenandoahDegenPoint point) const;

// ---------- GC subsystems

0 comments on commit c2b462c

Please sign in to comment.
You can’t perform that action at this time.