Mercurial > hg > truffle
annotate src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp @ 21209:629cc690c4c6
Fix instanceof with checking arrays of interface
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Thu, 30 Apr 2015 18:09:36 +0200 |
parents | 7baf47cb97cb |
children |
rev | line source |
---|---|
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
1 /* |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
4 * |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
8 * |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
13 * accompanied this code). |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
14 * |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
18 * |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
21 * questions. |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
22 * |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
23 */ |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
24 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
25 #include "precompiled.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
26 #include "gc_implementation/g1/concurrentG1Refine.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
27 #include "gc_implementation/g1/concurrentG1RefineThread.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
28 #include "gc_implementation/g1/heapRegion.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
30 #include "gc_implementation/g1/g1RemSet.inline.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
31 #include "gc_implementation/g1/g1RemSetSummary.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
32 #include "gc_implementation/g1/heapRegionRemSet.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
33 #include "runtime/thread.inline.hpp" |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
34 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
35 class GetRSThreadVTimeClosure : public ThreadClosure { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
36 private: |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
37 G1RemSetSummary* _summary; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
38 uint _counter; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
39 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
40 public: |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
41 GetRSThreadVTimeClosure(G1RemSetSummary * summary) : ThreadClosure(), _summary(summary), _counter(0) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
42 assert(_summary != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
43 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
44 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
45 virtual void do_thread(Thread* t) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
46 ConcurrentG1RefineThread* crt = (ConcurrentG1RefineThread*) t; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
47 _summary->set_rs_thread_vtime(_counter, crt->vtime_accum()); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
48 _counter++; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
49 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
50 }; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
51 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
52 void G1RemSetSummary::update() { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
53 _num_refined_cards = remset()->conc_refine_cards(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
54 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
55 _num_processed_buf_mutator = dcqs.processed_buffers_mut(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
56 _num_processed_buf_rs_threads = dcqs.processed_buffers_rs_thread(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
57 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
58 _num_coarsenings = HeapRegionRemSet::n_coarsenings(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
59 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
60 ConcurrentG1Refine * cg1r = G1CollectedHeap::heap()->concurrent_g1_refine(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
61 if (_rs_threads_vtimes != NULL) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
62 GetRSThreadVTimeClosure p(this); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
63 cg1r->worker_threads_do(&p); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
64 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
65 set_sampling_thread_vtime(cg1r->sampling_thread()->vtime_accum()); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
66 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
67 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
68 void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
69 assert(_rs_threads_vtimes != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
70 assert(thread < _num_vtimes, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
71 _rs_threads_vtimes[thread] = value; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
72 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
73 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
74 double G1RemSetSummary::rs_thread_vtime(uint thread) const { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
75 assert(_rs_threads_vtimes != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
76 assert(thread < _num_vtimes, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
77 return _rs_threads_vtimes[thread]; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
78 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
79 |
12344
7ec10139bf37
8025441: G1: assert "assert(thread < _num_vtimes) failed: just checking" fails when G1ConcRefinementThreads > ParallelGCThreads
tschatzl
parents:
12339
diff
changeset
|
80 void G1RemSetSummary::initialize(G1RemSet* remset) { |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
81 assert(_rs_threads_vtimes == NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
82 assert(remset != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
83 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
84 _remset = remset; |
12344
7ec10139bf37
8025441: G1: assert "assert(thread < _num_vtimes) failed: just checking" fails when G1ConcRefinementThreads > ParallelGCThreads
tschatzl
parents:
12339
diff
changeset
|
85 _num_vtimes = ConcurrentG1Refine::thread_num(); |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
86 _rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
87 memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
88 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
89 update(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
90 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
91 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
92 void G1RemSetSummary::set(G1RemSetSummary* other) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
93 assert(other != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
94 assert(remset() == other->remset(), "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
95 assert(_num_vtimes == other->_num_vtimes, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
96 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
97 _num_refined_cards = other->num_concurrent_refined_cards(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
98 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
99 _num_processed_buf_mutator = other->num_processed_buf_mutator(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
100 _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
101 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
102 _num_coarsenings = other->_num_coarsenings; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
103 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
104 memcpy(_rs_threads_vtimes, other->_rs_threads_vtimes, sizeof(double) * _num_vtimes); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
105 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
106 set_sampling_thread_vtime(other->sampling_thread_vtime()); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
107 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
108 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
109 void G1RemSetSummary::subtract_from(G1RemSetSummary* other) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
110 assert(other != NULL, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
111 assert(remset() == other->remset(), "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
112 assert(_num_vtimes == other->_num_vtimes, "just checking"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
113 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
114 _num_refined_cards = other->num_concurrent_refined_cards() - _num_refined_cards; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
115 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
116 _num_processed_buf_mutator = other->num_processed_buf_mutator() - _num_processed_buf_mutator; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
117 _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads() - _num_processed_buf_rs_threads; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
118 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
119 _num_coarsenings = other->num_coarsenings() - _num_coarsenings; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
120 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
121 for (uint i = 0; i < _num_vtimes; i++) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
122 set_rs_thread_vtime(i, other->rs_thread_vtime(i) - rs_thread_vtime(i)); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
123 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
124 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
125 _sampling_thread_vtime = other->sampling_thread_vtime() - _sampling_thread_vtime; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
126 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
127 |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
128 static double percent_of(size_t numerator, size_t denominator) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
129 if (denominator != 0) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
130 return (double)numerator / denominator * 100.0f; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
131 } else { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
132 return 0.0f; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
133 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
134 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
135 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
136 static size_t round_to_K(size_t value) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
137 return value / K; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
138 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
139 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
140 class RegionTypeCounter VALUE_OBJ_CLASS_SPEC { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
141 private: |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
142 const char* _name; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
143 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
144 size_t _rs_mem_size; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
145 size_t _cards_occupied; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
146 size_t _amount; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
147 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
148 size_t _code_root_mem_size; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
149 size_t _code_root_elems; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
150 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
151 double rs_mem_size_percent_of(size_t total) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
152 return percent_of(_rs_mem_size, total); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
153 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
154 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
155 double cards_occupied_percent_of(size_t total) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
156 return percent_of(_cards_occupied, total); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
157 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
158 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
159 double code_root_mem_size_percent_of(size_t total) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
160 return percent_of(_code_root_mem_size, total); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
161 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
162 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
163 double code_root_elems_percent_of(size_t total) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
164 return percent_of(_code_root_elems, total); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
165 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
166 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
167 size_t amount() const { return _amount; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
168 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
169 public: |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
170 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
171 RegionTypeCounter(const char* name) : _name(name), _rs_mem_size(0), _cards_occupied(0), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
172 _amount(0), _code_root_mem_size(0), _code_root_elems(0) { } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
173 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
174 void add(size_t rs_mem_size, size_t cards_occupied, size_t code_root_mem_size, |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
175 size_t code_root_elems) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
176 _rs_mem_size += rs_mem_size; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
177 _cards_occupied += cards_occupied; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
178 _code_root_mem_size += code_root_mem_size; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
179 _code_root_elems += code_root_elems; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
180 _amount++; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
181 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
182 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
183 size_t rs_mem_size() const { return _rs_mem_size; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
184 size_t cards_occupied() const { return _cards_occupied; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
185 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
186 size_t code_root_mem_size() const { return _code_root_mem_size; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
187 size_t code_root_elems() const { return _code_root_elems; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
188 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
189 void print_rs_mem_info_on(outputStream * out, size_t total) { |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
190 out->print_cr(" "SIZE_FORMAT_W(8)"K (%5.1f%%) by "SIZE_FORMAT" %s regions", |
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
191 round_to_K(rs_mem_size()), rs_mem_size_percent_of(total), amount(), _name); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
192 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
193 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
194 void print_cards_occupied_info_on(outputStream * out, size_t total) { |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
195 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) entries by "SIZE_FORMAT" %s regions", |
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
196 cards_occupied(), cards_occupied_percent_of(total), amount(), _name); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
197 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
198 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
199 void print_code_root_mem_info_on(outputStream * out, size_t total) { |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
200 out->print_cr(" "SIZE_FORMAT_W(8)"K (%5.1f%%) by "SIZE_FORMAT" %s regions", |
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
201 round_to_K(code_root_mem_size()), code_root_mem_size_percent_of(total), amount(), _name); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
202 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
203 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
204 void print_code_root_elems_info_on(outputStream * out, size_t total) { |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
205 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) elements by "SIZE_FORMAT" %s regions", |
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
206 code_root_elems(), code_root_elems_percent_of(total), amount(), _name); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
207 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
208 }; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
209 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
210 |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
211 class HRRSStatsIter: public HeapRegionClosure { |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
212 private: |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
213 RegionTypeCounter _young; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
214 RegionTypeCounter _humonguous; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
215 RegionTypeCounter _free; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
216 RegionTypeCounter _old; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
217 RegionTypeCounter _all; |
12080 | 218 |
219 size_t _max_rs_mem_sz; | |
220 HeapRegion* _max_rs_mem_sz_region; | |
221 | |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
222 size_t total_rs_mem_sz() const { return _all.rs_mem_size(); } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
223 size_t total_cards_occupied() const { return _all.cards_occupied(); } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
224 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
225 size_t max_rs_mem_sz() const { return _max_rs_mem_sz; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
226 HeapRegion* max_rs_mem_sz_region() const { return _max_rs_mem_sz_region; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
227 |
12080 | 228 size_t _max_code_root_mem_sz; |
229 HeapRegion* _max_code_root_mem_sz_region; | |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
230 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
231 size_t total_code_root_mem_sz() const { return _all.code_root_mem_size(); } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
232 size_t total_code_root_elems() const { return _all.code_root_elems(); } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
233 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
234 size_t max_code_root_mem_sz() const { return _max_code_root_mem_sz; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
235 HeapRegion* max_code_root_mem_sz_region() const { return _max_code_root_mem_sz_region; } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
236 |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
237 public: |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
238 HRRSStatsIter() : _all("All"), _young("Young"), _humonguous("Humonguous"), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
239 _free("Free"), _old("Old"), _max_code_root_mem_sz_region(NULL), _max_rs_mem_sz_region(NULL), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
240 _max_rs_mem_sz(0), _max_code_root_mem_sz(0) |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
241 {} |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
242 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
243 bool doHeapRegion(HeapRegion* r) { |
12080 | 244 HeapRegionRemSet* hrrs = r->rem_set(); |
245 | |
246 // HeapRegionRemSet::mem_size() includes the | |
247 // size of the strong code roots | |
248 size_t rs_mem_sz = hrrs->mem_size(); | |
249 if (rs_mem_sz > _max_rs_mem_sz) { | |
250 _max_rs_mem_sz = rs_mem_sz; | |
251 _max_rs_mem_sz_region = r; | |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
252 } |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
253 size_t occupied_cards = hrrs->occupied(); |
12080 | 254 size_t code_root_mem_sz = hrrs->strong_code_roots_mem_size(); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
255 if (code_root_mem_sz > max_code_root_mem_sz()) { |
20494 | 256 _max_code_root_mem_sz = code_root_mem_sz; |
12080 | 257 _max_code_root_mem_sz_region = r; |
258 } | |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
259 size_t code_root_elems = hrrs->strong_code_roots_list_length(); |
12080 | 260 |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
261 RegionTypeCounter* current = NULL; |
20481
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
262 if (r->is_free()) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
263 current = &_free; |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
264 } else if (r->is_young()) { |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
265 current = &_young; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
266 } else if (r->isHumongous()) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
267 current = &_humonguous; |
20481
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
268 } else if (r->is_old()) { |
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
269 current = &_old; |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
270 } else { |
20481
c02ec279b062
8057768: Make heap region region type in G1 HeapRegion explicit
brutisso
parents:
12984
diff
changeset
|
271 ShouldNotReachHere(); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
272 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
273 current->add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
274 _all.add(rs_mem_sz, occupied_cards, code_root_mem_sz, code_root_elems); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
275 |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
276 return false; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
277 } |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
278 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
279 void print_summary_on(outputStream* out) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
280 RegionTypeCounter* counters[] = { &_young, &_humonguous, &_free, &_old, NULL }; |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
281 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
282 out->print_cr("\n Current rem set statistics"); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
283 out->print_cr(" Total per region rem sets sizes = "SIZE_FORMAT"K." |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
284 " Max = "SIZE_FORMAT"K.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
285 round_to_K(total_rs_mem_sz()), round_to_K(max_rs_mem_sz())); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
286 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
287 (*current)->print_rs_mem_info_on(out, total_rs_mem_sz()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
288 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
289 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
290 out->print_cr(" Static structures = "SIZE_FORMAT"K," |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
291 " free_lists = "SIZE_FORMAT"K.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
292 round_to_K(HeapRegionRemSet::static_mem_size()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
293 round_to_K(HeapRegionRemSet::fl_mem_size())); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
294 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
295 out->print_cr(" "SIZE_FORMAT" occupied cards represented.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
296 total_cards_occupied()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
297 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
298 (*current)->print_cards_occupied_info_on(out, total_cards_occupied()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
299 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
300 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
301 // Largest sized rem set region statistics |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
302 HeapRegionRemSet* rem_set = max_rs_mem_sz_region()->rem_set(); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
303 out->print_cr(" Region with largest rem set = "HR_FORMAT", " |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
304 "size = "SIZE_FORMAT "K, occupied = "SIZE_FORMAT"K.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
305 HR_FORMAT_PARAMS(max_rs_mem_sz_region()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
306 round_to_K(rem_set->mem_size()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
307 round_to_K(rem_set->occupied())); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
308 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
309 // Strong code root statistics |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
310 HeapRegionRemSet* max_code_root_rem_set = max_code_root_mem_sz_region()->rem_set(); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
311 out->print_cr(" Total heap region code root sets sizes = "SIZE_FORMAT"K." |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
312 " Max = "SIZE_FORMAT"K.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
313 round_to_K(total_code_root_mem_sz()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
314 round_to_K(max_code_root_rem_set->strong_code_roots_mem_size())); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
315 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
316 (*current)->print_code_root_mem_info_on(out, total_code_root_mem_sz()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
317 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
318 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
319 out->print_cr(" "SIZE_FORMAT" code roots represented.", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
320 total_code_root_elems()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
321 for (RegionTypeCounter** current = &counters[0]; *current != NULL; current++) { |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
322 (*current)->print_code_root_elems_info_on(out, total_code_root_elems()); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
323 } |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
324 |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
325 out->print_cr(" Region with largest amount of code roots = "HR_FORMAT", " |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
326 "size = "SIZE_FORMAT "K, num_elems = "SIZE_FORMAT".", |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
327 HR_FORMAT_PARAMS(max_code_root_mem_sz_region()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
328 round_to_K(max_code_root_rem_set->strong_code_roots_mem_size()), |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
329 round_to_K(max_code_root_rem_set->strong_code_roots_list_length())); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
330 } |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
331 }; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
332 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
333 void G1RemSetSummary::print_on(outputStream* out) { |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
334 out->print_cr("\n Recent concurrent refinement statistics"); |
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
335 out->print_cr(" Processed "SIZE_FORMAT" cards", |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
336 num_concurrent_refined_cards()); |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
337 out->print_cr(" Of "SIZE_FORMAT" completed buffers:", num_processed_buf_total()); |
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
338 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by concurrent RS threads.", |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
339 num_processed_buf_total(), |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
340 percent_of(num_processed_buf_rs_threads(), num_processed_buf_total())); |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
341 out->print_cr(" "SIZE_FORMAT_W(8)" (%5.1f%%) by mutator threads.", |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
342 num_processed_buf_mutator(), |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
343 percent_of(num_processed_buf_mutator(), num_processed_buf_total())); |
12984
c7f403b05168
8026848: -XX:+G1SummarizeRSetStats can result in wrong exit code and crash
sjohanss
parents:
12344
diff
changeset
|
344 out->print_cr(" Did "SIZE_FORMAT" coarsenings.", num_coarsenings()); |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
345 out->print_cr(" Concurrent RS threads times (s)"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
346 out->print(" "); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
347 for (uint i = 0; i < _num_vtimes; i++) { |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
348 out->print(" %5.2f", rs_thread_vtime(i)); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
349 } |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
350 out->cr(); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
351 out->print_cr(" Concurrent sampling threads times (s)"); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
352 out->print_cr(" %5.2f", sampling_thread_vtime()); |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
353 |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
354 HRRSStatsIter blk; |
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
355 G1CollectedHeap::heap()->heap_region_iterate(&blk); |
12339
c319b188c7b2
8014078: G1: improve remembered set summary information by providing per region type information
tschatzl
parents:
12080
diff
changeset
|
356 blk.print_summary_on(out); |
10372
e72f7eecc96d
8013895: G1: G1SummarizeRSetStats output on Linux needs improvemen
tschatzl
parents:
diff
changeset
|
357 } |