mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 17:50:45 +00:00
8140509: Add note_gc_start to G1CollectorPolicy
Reviewed-by: mgerdin, tschatzl
This commit is contained in:
parent
d8b7d0ecd4
commit
adbbc4e8d8
@ -3826,7 +3826,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
workers()->set_active_workers(active_workers);
|
||||
|
||||
double pause_start_sec = os::elapsedTime();
|
||||
g1_policy()->phase_times()->note_gc_start(active_workers, collector_state()->mark_in_progress());
|
||||
g1_policy()->note_gc_start(active_workers);
|
||||
log_gc_header();
|
||||
|
||||
TraceCollectorStats tcs(g1mm()->incremental_collection_counters());
|
||||
|
||||
@ -437,6 +437,10 @@ void G1CollectorPolicy::init() {
|
||||
start_incremental_cset_building();
|
||||
}
|
||||
|
||||
void G1CollectorPolicy::note_gc_start(uint num_active_workers) {
|
||||
phase_times()->note_gc_start(num_active_workers);
|
||||
}
|
||||
|
||||
// Create the jstat counters for the policy.
|
||||
void G1CollectorPolicy::initialize_gc_policy_counters() {
|
||||
_gc_policy_counters = new GCPolicyCounters("GarbageFirst", 1, 3);
|
||||
|
||||
@ -549,6 +549,8 @@ public:
|
||||
|
||||
void init();
|
||||
|
||||
virtual void note_gc_start(uint num_active_workers);
|
||||
|
||||
// Create jstat counters for the policy.
|
||||
virtual void initialize_gc_policy_counters();
|
||||
|
||||
|
||||
@ -136,7 +136,7 @@ G1GCPhaseTimes::G1GCPhaseTimes(uint max_gc_threads) :
|
||||
_gc_par_phases[RedirtyCards]->link_thread_work_items(_redirtied_cards);
|
||||
}
|
||||
|
||||
void G1GCPhaseTimes::note_gc_start(uint active_gc_threads, bool mark_in_progress) {
|
||||
void G1GCPhaseTimes::note_gc_start(uint active_gc_threads) {
|
||||
assert(active_gc_threads > 0, "The number of threads must be > 0");
|
||||
assert(active_gc_threads <= _max_gc_threads, "The number of active threads must be <= the max number of threads");
|
||||
_active_gc_threads = active_gc_threads;
|
||||
|
||||
@ -125,7 +125,7 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
|
||||
|
||||
public:
|
||||
G1GCPhaseTimes(uint max_gc_threads);
|
||||
void note_gc_start(uint active_gc_threads, bool mark_in_progress);
|
||||
void note_gc_start(uint active_gc_threads);
|
||||
void print(double pause_time_sec);
|
||||
|
||||
// record the time a phase took in seconds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user