Skip to content
Permalink
Browse files

8242400: Shenandoah: Restore logging to pre-jdk8241984 format

Reviewed-by: shade
  • Loading branch information
zhengyu123 committed Apr 9, 2020
1 parent cdfe841 commit 136450572ed61528a32b4f35f5892b6c1a726ebe
@@ -2817,7 +2817,7 @@ void ShenandoahHeap::entry_roots() {

void ShenandoahHeap::entry_cleanup() {
static const char* msg = "Concurrent cleanup";
ShenandoahConcurrentPhase gc_phase(msg);
ShenandoahConcurrentPhase gc_phase(msg, true /* log_heap_usage */);
EventMark em("%s", msg);

ShenandoahGCSubPhase phase(ShenandoahPhaseTimings::conc_cleanup);
@@ -86,7 +86,7 @@ ShenandoahGCPauseMark::ShenandoahGCPauseMark(uint gc_id, SvcGCMarker::reason_typ
}

ShenandoahPausePhase::ShenandoahPausePhase(const char* title) :
GCTraceTimeWrapper<LogLevel::Info, LOG_TAGS(gc)>(title),
_tracer(title),
_timer(ShenandoahHeap::heap()->gc_timer()) {
_timer->register_gc_pause_start(title);
}
@@ -95,8 +95,8 @@ ShenandoahPausePhase::~ShenandoahPausePhase() {
_timer->register_gc_pause_end();
}

ShenandoahConcurrentPhase::ShenandoahConcurrentPhase(const char* title) :
GCTraceConcTimeImpl<LogLevel::Info, LOG_TAGS(gc)>(title),
ShenandoahConcurrentPhase::ShenandoahConcurrentPhase(const char* title, bool log_heap_usage) :
_tracer(title, NULL, GCCause::_no_gc, log_heap_usage),
_timer(ShenandoahHeap::heap()->gc_timer()) {
_timer->register_gc_concurrent_start(title);
}
@@ -54,21 +54,23 @@ class ShenandoahGCSession : public StackObj {
~ShenandoahGCSession();
};

class ShenandoahPausePhase : public GCTraceTimeWrapper<LogLevel::Info, LOG_TAGS(gc)> {
class ShenandoahPausePhase : public StackObj {
private:
GCTraceTimeWrapper<LogLevel::Info, LOG_TAGS(gc)> _tracer;
ConcurrentGCTimer* const _timer;

public:
ShenandoahPausePhase(const char* title);
~ShenandoahPausePhase();
};

class ShenandoahConcurrentPhase : public GCTraceConcTimeImpl<LogLevel::Info, LOG_TAGS(gc)> {
class ShenandoahConcurrentPhase : public StackObj {
private:
GCTraceTimeWrapper<LogLevel::Info, LOG_TAGS(gc)> _tracer;
ConcurrentGCTimer* const _timer;

public:
ShenandoahConcurrentPhase(const char* title);
ShenandoahConcurrentPhase(const char* title, bool log_heap_usage = false);
~ShenandoahConcurrentPhase();
};

0 comments on commit 1364505

Please sign in to comment.