diff -r 8631304f255c -r 100d4a515df0 hotspot/src/share/vm/gc/shared/gcTraceTime.hpp --- a/hotspot/src/share/vm/gc/shared/gcTraceTime.hpp Tue Apr 05 10:35:39 2016 +0200 +++ b/hotspot/src/share/vm/gc/shared/gcTraceTime.hpp Tue Apr 05 10:41:52 2016 +0200 @@ -26,6 +26,8 @@ #define SHARE_VM_GC_SHARED_GCTRACETIME_HPP #include "logging/log.hpp" +#include "logging/logHandle.hpp" +#include "logging/logStream.hpp" #include "memory/allocation.hpp" #include "utilities/ticks.hpp" @@ -41,10 +43,10 @@ class GCTimer; -template class GCTraceTimeImpl : public StackObj { private: + LogTargetHandle _out_start; + LogTargetHandle _out_stop; bool _enabled; Ticks _start_ticks; const char* _title; @@ -57,10 +59,18 @@ void time_stamp(Ticks& ticks); public: - GCTraceTimeImpl(const char* title, GCTimer* timer = NULL, GCCause::Cause gc_cause = GCCause::_no_gc, bool log_heap_usage = false); + GCTraceTimeImpl(LogTargetHandle out_start, LogTargetHandle out_end, const char* title, GCTimer* timer = NULL, GCCause::Cause gc_cause = GCCause::_no_gc, bool log_heap_usage = false); ~GCTraceTimeImpl(); }; +template +class GCTraceTimeImplWrapper : public StackObj { + GCTraceTimeImpl _impl; +public: + GCTraceTimeImplWrapper(const char* title, GCTimer* timer = NULL, GCCause::Cause gc_cause = GCCause::_no_gc, bool log_heap_usage = false); + ~GCTraceTimeImplWrapper(); +}; + // Similar to GCTraceTimeImpl but is intended for concurrent phase logging, // which is a bit simpler and should always print the start line, i.e. not add the "start" tag. template