--- old/src/share/vm/gc/g1/g1GCPhaseTimes.hpp 2017-08-03 16:11:36.289642118 -0700 +++ new/src/share/vm/gc/g1/g1GCPhaseTimes.hpp 2017-08-03 16:11:36.189642122 -0700 @@ -25,11 +25,13 @@ #ifndef SHARE_VM_GC_G1_G1GCPHASETIMES_HPP #define SHARE_VM_GC_G1_G1GCPHASETIMES_HPP +#include "gc/shared/referenceProcessorPhaseTimes.hpp" #include "logging/logLevel.hpp" #include "memory/allocation.hpp" #include "utilities/macros.hpp" class LineBuffer; +class STWGCTimer; template class WorkerDataArray; @@ -151,6 +153,8 @@ double _cur_verify_before_time_ms; double _cur_verify_after_time_ms; + ReferenceProcessorPhaseTimes _ref_phase_times; + double worker_time(GCParPhases phase, uint worker); void note_gc_end(); void reset(); @@ -164,6 +168,8 @@ void info_time(const char* name, double value) const; void debug_time(const char* name, double value) const; + // This will print logs for both 'gc+phases' and 'gc+phases+ref'. + void debug_time_for_reference(const char* name, double value) const; void trace_time(const char* name, double value) const; void trace_count(const char* name, size_t value) const; @@ -173,7 +179,7 @@ void print_other(double accounted_ms) const; public: - G1GCPhaseTimes(uint max_gc_threads); + G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads); void note_gc_start(); void print(); @@ -346,6 +352,8 @@ double fast_reclaim_humongous_time_ms() { return _cur_fast_reclaim_humongous_time_ms; } + + ReferenceProcessorPhaseTimes* ref_phase_times() { return &_ref_phase_times; } }; class G1GCParPhaseTimesTracker : public StackObj {