36
37 class GetRSThreadVTimeClosure : public ThreadClosure {
38 private:
39 G1RemSetSummary* _summary;
40 uint _counter;
41
42 public:
43 GetRSThreadVTimeClosure(G1RemSetSummary * summary) : ThreadClosure(), _summary(summary), _counter(0) {
44 assert(_summary != NULL, "just checking");
45 }
46
47 virtual void do_thread(Thread* t) {
48 G1ConcurrentRefineThread* crt = (G1ConcurrentRefineThread*) t;
49 _summary->set_rs_thread_vtime(_counter, crt->vtime_accum());
50 _counter++;
51 }
52 };
53
54 void G1RemSetSummary::update() {
55 _num_conc_refined_cards = _rem_set->num_conc_refined_cards();
56 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
57 _num_processed_buf_mutator = dcqs.processed_buffers_mut();
58 _num_processed_buf_rs_threads = dcqs.processed_buffers_rs_thread();
59
60 _num_coarsenings = HeapRegionRemSet::n_coarsenings();
61
62 G1CollectedHeap* g1h = G1CollectedHeap::heap();
63 G1ConcurrentRefine* cg1r = g1h->concurrent_refine();
64 if (_rs_threads_vtimes != NULL) {
65 GetRSThreadVTimeClosure p(this);
66 cg1r->threads_do(&p);
67 }
68 set_sampling_thread_vtime(g1h->sampling_thread()->vtime_accum());
69 }
70
71 void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {
72 assert(_rs_threads_vtimes != NULL, "just checking");
73 assert(thread < _num_vtimes, "just checking");
74 _rs_threads_vtimes[thread] = value;
75 }
76
|
36
37 class GetRSThreadVTimeClosure : public ThreadClosure {
38 private:
39 G1RemSetSummary* _summary;
40 uint _counter;
41
42 public:
43 GetRSThreadVTimeClosure(G1RemSetSummary * summary) : ThreadClosure(), _summary(summary), _counter(0) {
44 assert(_summary != NULL, "just checking");
45 }
46
47 virtual void do_thread(Thread* t) {
48 G1ConcurrentRefineThread* crt = (G1ConcurrentRefineThread*) t;
49 _summary->set_rs_thread_vtime(_counter, crt->vtime_accum());
50 _counter++;
51 }
52 };
53
54 void G1RemSetSummary::update() {
55 _num_conc_refined_cards = _rem_set->num_conc_refined_cards();
56 DirtyCardQueueSet& dcqs = G1BarrierSet::dirty_card_queue_set();
57 _num_processed_buf_mutator = dcqs.processed_buffers_mut();
58 _num_processed_buf_rs_threads = dcqs.processed_buffers_rs_thread();
59
60 _num_coarsenings = HeapRegionRemSet::n_coarsenings();
61
62 G1CollectedHeap* g1h = G1CollectedHeap::heap();
63 G1ConcurrentRefine* cg1r = g1h->concurrent_refine();
64 if (_rs_threads_vtimes != NULL) {
65 GetRSThreadVTimeClosure p(this);
66 cg1r->threads_do(&p);
67 }
68 set_sampling_thread_vtime(g1h->sampling_thread()->vtime_accum());
69 }
70
71 void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {
72 assert(_rs_threads_vtimes != NULL, "just checking");
73 assert(thread < _num_vtimes, "just checking");
74 _rs_threads_vtimes[thread] = value;
75 }
76
|