Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8278700 | 19 | Hamlin Li | P4 | Resolved | Fixed | team |
This is a trivial improvement to refine the naming of G1GCParPhaseTimesTracker::_must_record to _initial_record.
diff --git a/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp b/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
index 11a62b03825..9843af786b7 100644
--- a/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
+++ b/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
@@ -36,10 +36,10 @@ protected:
G1GCPhaseTimes* _phase_times;
uint _worker_id;
EventGCPhaseParallel _event;
- bool _must_record;
+ bool _initial_record;
public:
- G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool must_record = true);
+ G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool initial_record = true);
virtual ~G1GCParPhaseTimesTracker();
};
diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
index 7c3eba2be94..79ad75a784c 100644
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
@@ -578,8 +578,8 @@ void G1EvacPhaseWithTrimTimeTracker::stop() {
_stopped = true;
}
-G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool must_record) :
- _start_time(), _phase(phase), _phase_times(phase_times), _worker_id(worker_id), _event(), _must_record(must_record) {
+G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool initial_record) :
+ _start_time(), _phase(phase), _phase_times(phase_times), _worker_id(worker_id), _event(), _initial_record(initial_record) {
if (_phase_times != NULL) {
_start_time = Ticks::now();
}
@@ -587,7 +587,7 @@ G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times,
G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() {
if (_phase_times != NULL) {
- if (_must_record) {
+ if (_initial_record) {
_phase_times->record_time_secs(_phase, _worker_id, (Ticks::now() - _start_time).seconds());
} else {
_phase_times->record_or_add_time_secs(_phase, _worker_id, (Ticks::now() - _start_time).seconds());
diff --git a/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp b/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
index 11a62b03825..9843af786b7 100644
--- a/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
+++ b/src/hotspot/share/gc/g1/g1GCParPhaseTimesTracker.hpp
@@ -36,10 +36,10 @@ protected:
G1GCPhaseTimes* _phase_times;
uint _worker_id;
EventGCPhaseParallel _event;
- bool _must_record;
+ bool _initial_record;
public:
- G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool must_record = true);
+ G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool initial_record = true);
virtual ~G1GCParPhaseTimesTracker();
};
diff --git a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
index 7c3eba2be94..79ad75a784c 100644
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
@@ -578,8 +578,8 @@ void G1EvacPhaseWithTrimTimeTracker::stop() {
_stopped = true;
}
-G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool must_record) :
- _start_time(), _phase(phase), _phase_times(phase_times), _worker_id(worker_id), _event(), _must_record(must_record) {
+G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id, bool initial_record) :
+ _start_time(), _phase(phase), _phase_times(phase_times), _worker_id(worker_id), _event(), _initial_record(initial_record) {
if (_phase_times != NULL) {
_start_time = Ticks::now();
}
@@ -587,7 +587,7 @@ G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times,
G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() {
if (_phase_times != NULL) {
- if (_must_record) {
+ if (_initial_record) {
_phase_times->record_time_secs(_phase, _worker_id, (Ticks::now() - _start_time).seconds());
} else {
_phase_times->record_or_add_time_secs(_phase, _worker_id, (Ticks::now() - _start_time).seconds());
- backported by
-
JDK-8278700 G1: Refine naming of G1GCParPhaseTimesTracker::_must_record
-
- Resolved
-