10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jvm.h"
27 #include "gc/shared/ageTable.inline.hpp"
28 #include "gc/shared/ageTableTracer.hpp"
29 #include "gc/shared/collectedHeap.hpp"
30 #include "gc/shared/collectorPolicy.hpp"
31 #include "memory/resourceArea.hpp"
32 #include "logging/log.hpp"
33 #include "oops/oop.inline.hpp"
34 #include "utilities/copy.hpp"
35
36 /* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University.
37 See the LICENSE file for license information. */
38
39 AgeTable::AgeTable(bool global) {
40
41 clear();
42
43 if (UsePerfData && global) {
44
45 ResourceMark rm;
46 EXCEPTION_MARK;
47
48 const char* agetable_ns = "generation.0.agetable";
49 const char* bytes_ns = PerfDataManager::name_space(agetable_ns, "bytes");
50
108 log_trace(gc, age)("Age table with threshold %u (max threshold " UINTX_FORMAT ")",
109 tenuring_threshold, MaxTenuringThreshold);
110
111 size_t total = 0;
112 uint age = 1;
113 while (age < table_size) {
114 size_t wordSize = sizes[age];
115 total += wordSize;
116 if (wordSize > 0) {
117 log_trace(gc, age)("- age %3u: " SIZE_FORMAT_W(10) " bytes, " SIZE_FORMAT_W(10) " total",
118 age, wordSize * oopSize, total * oopSize);
119 }
120 AgeTableTracer::send_tenuring_distribution_event(age, wordSize * oopSize);
121 if (UsePerfData) {
122 _perf_sizes[age]->set_value(wordSize * oopSize);
123 }
124 age++;
125 }
126 }
127 }
128
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jvm.h"
27 #include "gc/shared/ageTable.inline.hpp"
28 #include "gc/shared/ageTableTracer.hpp"
29 #include "gc/shared/collectedHeap.hpp"
30 #include "memory/resourceArea.hpp"
31 #include "logging/log.hpp"
32 #include "oops/oop.inline.hpp"
33 #include "utilities/copy.hpp"
34
35 /* Copyright (c) 1992, 2016, Oracle and/or its affiliates, and Stanford University.
36 See the LICENSE file for license information. */
37
38 AgeTable::AgeTable(bool global) {
39
40 clear();
41
42 if (UsePerfData && global) {
43
44 ResourceMark rm;
45 EXCEPTION_MARK;
46
47 const char* agetable_ns = "generation.0.agetable";
48 const char* bytes_ns = PerfDataManager::name_space(agetable_ns, "bytes");
49
107 log_trace(gc, age)("Age table with threshold %u (max threshold " UINTX_FORMAT ")",
108 tenuring_threshold, MaxTenuringThreshold);
109
110 size_t total = 0;
111 uint age = 1;
112 while (age < table_size) {
113 size_t wordSize = sizes[age];
114 total += wordSize;
115 if (wordSize > 0) {
116 log_trace(gc, age)("- age %3u: " SIZE_FORMAT_W(10) " bytes, " SIZE_FORMAT_W(10) " total",
117 age, wordSize * oopSize, total * oopSize);
118 }
119 AgeTableTracer::send_tenuring_distribution_event(age, wordSize * oopSize);
120 if (UsePerfData) {
121 _perf_sizes[age]->set_value(wordSize * oopSize);
122 }
123 age++;
124 }
125 }
126 }
|