equal
deleted
inserted
replaced
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "classfile/classLoaderData.hpp" |
26 #include "classfile/classLoaderData.hpp" |
27 #include "gc/g1/concurrentMarkThread.inline.hpp" |
27 #include "gc/g1/concurrentMarkThread.inline.hpp" |
28 #include "gc/g1/g1Analytics.hpp" |
28 #include "gc/g1/g1Analytics.hpp" |
29 #include "gc/g1/g1CollectedHeap.inline.hpp" |
29 #include "gc/g1/g1CollectedHeap.inline.hpp" |
30 #include "gc/g1/g1CollectorPolicy.hpp" |
|
31 #include "gc/g1/g1ConcurrentMark.inline.hpp" |
30 #include "gc/g1/g1ConcurrentMark.inline.hpp" |
32 #include "gc/g1/g1MMUTracker.hpp" |
31 #include "gc/g1/g1MMUTracker.hpp" |
|
32 #include "gc/g1/g1Policy.hpp" |
33 #include "gc/g1/suspendibleThreadSet.hpp" |
33 #include "gc/g1/suspendibleThreadSet.hpp" |
34 #include "gc/g1/vm_operations_g1.hpp" |
34 #include "gc/g1/vm_operations_g1.hpp" |
35 #include "gc/shared/gcId.hpp" |
35 #include "gc/shared/gcId.hpp" |
36 #include "gc/shared/gcTrace.hpp" |
36 #include "gc/shared/gcTrace.hpp" |
37 #include "gc/shared/gcTraceTime.inline.hpp" |
37 #include "gc/shared/gcTraceTime.inline.hpp" |
78 _cm->cleanup(); |
78 _cm->cleanup(); |
79 } |
79 } |
80 }; |
80 }; |
81 |
81 |
82 // Marking pauses can be scheduled flexibly, so we might delay marking to meet MMU. |
82 // Marking pauses can be scheduled flexibly, so we might delay marking to meet MMU. |
83 void ConcurrentMarkThread::delay_to_keep_mmu(G1CollectorPolicy* g1_policy, bool remark) { |
83 void ConcurrentMarkThread::delay_to_keep_mmu(G1Policy* g1_policy, bool remark) { |
84 const G1Analytics* analytics = g1_policy->analytics(); |
84 const G1Analytics* analytics = g1_policy->analytics(); |
85 if (g1_policy->adaptive_young_list_length()) { |
85 if (g1_policy->adaptive_young_list_length()) { |
86 double now = os::elapsedTime(); |
86 double now = os::elapsedTime(); |
87 double prediction_ms = remark ? analytics->predict_remark_time_ms() |
87 double prediction_ms = remark ? analytics->predict_remark_time_ms() |
88 : analytics->predict_cleanup_time_ms(); |
88 : analytics->predict_cleanup_time_ms(); |
109 |
109 |
110 void ConcurrentMarkThread::run_service() { |
110 void ConcurrentMarkThread::run_service() { |
111 _vtime_start = os::elapsedVTime(); |
111 _vtime_start = os::elapsedVTime(); |
112 |
112 |
113 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
113 G1CollectedHeap* g1h = G1CollectedHeap::heap(); |
114 G1CollectorPolicy* g1_policy = g1h->g1_policy(); |
114 G1Policy* g1_policy = g1h->g1_policy(); |
115 |
115 |
116 while (!should_terminate()) { |
116 while (!should_terminate()) { |
117 // wait until started is set. |
117 // wait until started is set. |
118 sleepBeforeNextCycle(); |
118 sleepBeforeNextCycle(); |
119 if (should_terminate()) { |
119 if (should_terminate()) { |