-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8336742: Shenandoah: Add more verbose logging/stats for mark termination attempts #20318
Changes from 1 commit
7c3d4a8
6e7fdd5
a7c0514
9649c2c
1609ed5
da59959
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ class outputStream; | |
f(conc_mark_roots, "Concurrent Mark Roots ") \ | ||
SHENANDOAH_PAR_PHASE_DO(conc_mark_roots, " CMR: ", f) \ | ||
f(conc_mark, "Concurrent Marking") \ | ||
f(conc_mark_satb_flush_rendezvous, " SATB Flush Rendezvous") \ | ||
f(conc_mark_satb_flush_rendezvous, " SATB Flush Rendezvous") \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be "Flush SATB" or "Flush SATB Handshakes" for consistency with #20549? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will rename to "Flush STAB" |
||
\ | ||
f(final_mark_gross, "Pause Final Mark (G)") \ | ||
f(final_mark, "Pause Final Mark (N)") \ | ||
|
@@ -217,13 +217,13 @@ class ShenandoahPhaseTimings : public CHeapObj<mtGC> { | |
ShenandoahWorkerData* worker_data(Phase phase, ParPhase par_phase); | ||
Phase worker_par_phase(Phase phase, ParPhase par_phase); | ||
|
||
void set_cycle_data(Phase phase, double time); | ||
void set_cycle_data(Phase phase, double time, bool should_aggregate_cycles=false); | ||
static double uninitialized() { return -1; } | ||
|
||
public: | ||
ShenandoahPhaseTimings(uint max_workers); | ||
|
||
void record_phase_time(Phase phase, double time); | ||
void record_phase_time(Phase phase, double time, bool should_aggregate_cycles=false); | ||
|
||
void record_workers_start(Phase phase); | ||
void record_workers_end(Phase phase); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,17 +111,20 @@ ShenandoahConcurrentPhase::~ShenandoahConcurrentPhase() { | |
_timer->register_gc_concurrent_end(); | ||
} | ||
|
||
ShenandoahTimingsTracker::ShenandoahTimingsTracker(ShenandoahPhaseTimings::Phase phase) : | ||
ShenandoahTimingsTracker::ShenandoahTimingsTracker(ShenandoahPhaseTimings::Phase phase, bool should_aggregate_cycles) : | ||
_timings(ShenandoahHeap::heap()->phase_timings()), _phase(phase) { | ||
assert(Thread::current()->is_VM_thread() || Thread::current()->is_ConcurrentGC_thread(), | ||
"Must be set by these threads"); | ||
_parent_phase = _current_phase; | ||
_current_phase = phase; | ||
_start = os::elapsedTime(); | ||
_should_aggregate_cycles = should_aggregate_cycles; | ||
} | ||
|
||
ShenandoahTimingsTracker::~ShenandoahTimingsTracker() { | ||
_timings->record_phase_time(_phase, os::elapsedTime() - _start); | ||
const double end_time = os::elapsedTime(); | ||
const double phase_elapsed_time = end_time - _start; | ||
_timings->record_phase_time(_phase, phase_elapsed_time, _should_aggregate_cycles); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to introduce local variables here, right? The expression can stay inlined. |
||
_current_phase = _parent_phase; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,9 +66,10 @@ class ShenandoahTimingsTracker : public StackObj { | |
const ShenandoahPhaseTimings::Phase _phase; | ||
ShenandoahPhaseTimings::Phase _parent_phase; | ||
double _start; | ||
bool _should_aggregate_cycles; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about simplifying it to |
||
|
||
public: | ||
ShenandoahTimingsTracker(ShenandoahPhaseTimings::Phase phase); | ||
ShenandoahTimingsTracker(ShenandoahPhaseTimings::Phase phase, bool should_aggregate_cycles=false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and everywhere else, need whitespaces: |
||
~ShenandoahTimingsTracker(); | ||
|
||
static ShenandoahPhaseTimings::Phase current_phase() { return _current_phase; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
<= 0
is too broad, and assumes things about the value ofuninitialized()
. Check foruninitialized()
explicitly.