OpenJDK / amber / amber
changeset 60850:7992ff451fec
8242400: Shenandoah: Restore logging to pre-jdk8241984 format
Reviewed-by: shade
author | zgu |
---|---|
date | Thu, 09 Apr 2020 08:43:03 -0400 |
parents | 9623140d2685 |
children | c1700981433c |
files | src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp |
diffstat | 3 files changed, 9 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Thu Apr 09 13:04:10 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp Thu Apr 09 08:43:03 2020 -0400 @@ -2817,7 +2817,7 @@ 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);
--- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp Thu Apr 09 13:04:10 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.cpp Thu Apr 09 08:43:03 2020 -0400 @@ -86,7 +86,7 @@ } 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 @@ _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); }
--- a/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp Thu Apr 09 13:04:10 2020 +0200 +++ b/src/hotspot/share/gc/shenandoah/shenandoahUtils.hpp Thu Apr 09 08:43:03 2020 -0400 @@ -54,8 +54,9 @@ ~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: @@ -63,12 +64,13 @@ ~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(); };