< prev index next >
src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp
Print this page
rev 49680 : imported patch 6672778-partial-queue-trimming
rev 49682 : [mq]: 6672778-stefanj-review
@@ -29,10 +29,11 @@
#include "logging/logLevel.hpp"
#include "memory/allocation.hpp"
#include "utilities/macros.hpp"
class LineBuffer;
+class G1ParScanThreadState;
class STWGCTimer;
template <class T> class WorkerDataArray;
class G1GCPhaseTimes : public CHeapObj<mtGC> {
@@ -194,12 +195,11 @@
void record_time_secs(GCParPhases phase, uint worker_i, double secs);
// add a number of seconds to a phase
void add_time_secs(GCParPhases phase, uint worker_i, double secs);
- // Move a number of seconds from one phase to another.
- void move_time_secs(GCParPhases from, GCParPhases to, uint worker_i, double secs);
+ void record_or_add_objcopy_time_secs(uint worker_i, double secs);
void record_thread_work_item(GCParPhases phase, uint worker_i, size_t count, uint index = 0);
// return the average time for a phase in milliseconds
double average_time_ms(GCParPhases phase);
@@ -364,16 +364,38 @@
}
ReferenceProcessorPhaseTimes* ref_phase_times() { return &_ref_phase_times; }
};
-class G1GCParPhaseTimesTracker : public StackObj {
+class G1EvacPhaseWithTrimTimeTracker : public StackObj {
+ G1ParScanThreadState* _pss;
+ Ticks _start;
+
+ Tickspan& _total_time;
+ Tickspan& _trim_time;
+public:
+ G1EvacPhaseWithTrimTimeTracker(G1ParScanThreadState* pss, Tickspan& total_time, Tickspan& trim_time);
+ ~G1EvacPhaseWithTrimTimeTracker();
+};
+
+class G1GCParPhaseTimesTracker : public CHeapObj<mtGC> {
+protected:
double _start_time;
G1GCPhaseTimes::GCParPhases _phase;
G1GCPhaseTimes* _phase_times;
uint _worker_id;
public:
G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id);
- ~G1GCParPhaseTimesTracker();
+ virtual ~G1GCParPhaseTimesTracker();
+};
+
+class G1EvacPhaseTimesTracker : public G1GCParPhaseTimesTracker {
+ Tickspan _total_time;
+ Tickspan _trim_time;
+
+ G1EvacPhaseWithTrimTimeTracker _trim_tracker;
+public:
+ G1EvacPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1ParScanThreadState* pss, G1GCPhaseTimes::GCParPhases phase, uint worker_id);
+ virtual ~G1EvacPhaseTimesTracker();
};
#endif // SHARE_VM_GC_G1_G1GCPHASETIMES_HPP
< prev index next >