annotate src/share/vm/oops/methodDataKlass.cpp @ 4979:18a5539bf19b

More diff vs hsx24 optimizations.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Mon, 27 Feb 2012 21:43:51 +0100
parents 59d3d0b80975
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
2227
e5383553fd4e 7014851: Remove unused parallel compaction code
stefank
parents: 1972
diff changeset
2 * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1155
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1155
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1155
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
25 #include "precompiled.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
26 #include "gc_implementation/shared/markSweep.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
27 #include "gc_interface/collectedHeap.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
28 #include "memory/gcLocker.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
29 #include "memory/resourceArea.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
30 #include "memory/universe.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
31 #include "oops/klassOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
32 #include "oops/methodDataKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
33 #include "oops/methodDataOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
34 #include "oops/oop.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
35 #include "oops/oop.inline2.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
36 #include "runtime/handles.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
37 #ifndef SERIALGC
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
38 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
39 #include "oops/oop.pcgc.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
40 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
41
a61af66fc99e Initial load
duke
parents:
diff changeset
42 klassOop methodDataKlass::create_klass(TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
43 methodDataKlass o;
a61af66fc99e Initial load
duke
parents:
diff changeset
44 KlassHandle h_this_klass(THREAD, Universe::klassKlassObj());
a61af66fc99e Initial load
duke
parents:
diff changeset
45 KlassHandle k = base_create_klass(h_this_klass, header_size(),
a61af66fc99e Initial load
duke
parents:
diff changeset
46 o.vtbl_value(), CHECK_NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
47 // Make sure size calculation is right
a61af66fc99e Initial load
duke
parents:
diff changeset
48 assert(k()->size() == align_object_size(header_size()),
a61af66fc99e Initial load
duke
parents:
diff changeset
49 "wrong size for object");
a61af66fc99e Initial load
duke
parents:
diff changeset
50 return k();
a61af66fc99e Initial load
duke
parents:
diff changeset
51 }
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53
a61af66fc99e Initial load
duke
parents:
diff changeset
54 int methodDataKlass::oop_size(oop obj) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
55 assert(obj->is_methodData(), "must be method data oop");
a61af66fc99e Initial load
duke
parents:
diff changeset
56 return methodDataOop(obj)->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
57 }
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 bool methodDataKlass::oop_is_parsable(oop obj) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
61 assert(obj->is_methodData(), "must be method data oop");
a61af66fc99e Initial load
duke
parents:
diff changeset
62 return methodDataOop(obj)->object_is_parsable();
a61af66fc99e Initial load
duke
parents:
diff changeset
63 }
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65
a61af66fc99e Initial load
duke
parents:
diff changeset
66 methodDataOop methodDataKlass::allocate(methodHandle method, TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
67 int size = methodDataOopDesc::compute_allocation_size_in_words(method);
a61af66fc99e Initial load
duke
parents:
diff changeset
68 KlassHandle h_k(THREAD, as_klassOop());
a61af66fc99e Initial load
duke
parents:
diff changeset
69 methodDataOop mdo =
a61af66fc99e Initial load
duke
parents:
diff changeset
70 (methodDataOop)CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
71 assert(!mdo->is_parsable(), "not expecting parsability yet.");
a61af66fc99e Initial load
duke
parents:
diff changeset
72 No_Safepoint_Verifier no_safepoint; // init function atomic wrt GC
a61af66fc99e Initial load
duke
parents:
diff changeset
73 mdo->initialize(method);
a61af66fc99e Initial load
duke
parents:
diff changeset
74
a61af66fc99e Initial load
duke
parents:
diff changeset
75 assert(mdo->is_parsable(), "should be parsable here.");
a61af66fc99e Initial load
duke
parents:
diff changeset
76 assert(size == mdo->object_size(), "wrong size for methodDataOop");
a61af66fc99e Initial load
duke
parents:
diff changeset
77 return mdo;
a61af66fc99e Initial load
duke
parents:
diff changeset
78 }
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 void methodDataKlass::oop_follow_contents(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
82 assert (obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
83 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 obj->follow_header();
a61af66fc99e Initial load
duke
parents:
diff changeset
86 MarkSweep::mark_and_push(m->adr_method());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
87 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
88 MarkSweep::mark_and_push(m->adr_graal_mirror());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
89 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
90 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
91 for (ProfileData* data = m->first_data();
a61af66fc99e Initial load
duke
parents:
diff changeset
92 m->is_valid(data);
a61af66fc99e Initial load
duke
parents:
diff changeset
93 data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
94 data->follow_contents();
a61af66fc99e Initial load
duke
parents:
diff changeset
95 }
a61af66fc99e Initial load
duke
parents:
diff changeset
96 }
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 #ifndef SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
99 void methodDataKlass::oop_follow_contents(ParCompactionManager* cm,
a61af66fc99e Initial load
duke
parents:
diff changeset
100 oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
101 assert (obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
102 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
103
a61af66fc99e Initial load
duke
parents:
diff changeset
104 obj->follow_header(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
105 PSParallelCompact::mark_and_push(cm, m->adr_method());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
106 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
107 PSParallelCompact::mark_and_push(cm, m->adr_graal_mirror());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
108 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
109 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
110 for (ProfileData* data = m->first_data();
a61af66fc99e Initial load
duke
parents:
diff changeset
111 m->is_valid(data);
a61af66fc99e Initial load
duke
parents:
diff changeset
112 data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
113 data->follow_contents(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
114 }
a61af66fc99e Initial load
duke
parents:
diff changeset
115 }
a61af66fc99e Initial load
duke
parents:
diff changeset
116 #endif // SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
117
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
118
0
a61af66fc99e Initial load
duke
parents:
diff changeset
119 int methodDataKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
a61af66fc99e Initial load
duke
parents:
diff changeset
120 assert (obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
121 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 // Get size before changing pointers
a61af66fc99e Initial load
duke
parents:
diff changeset
123 // Don't call size() or oop_size() since that is a virtual call.
a61af66fc99e Initial load
duke
parents:
diff changeset
124 int size = m->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
125
a61af66fc99e Initial load
duke
parents:
diff changeset
126 obj->oop_iterate_header(blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
127 blk->do_oop(m->adr_method());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
128 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
129 blk->do_oop(m->adr_graal_mirror());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
130 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
131 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
132 for (ProfileData* data = m->first_data();
a61af66fc99e Initial load
duke
parents:
diff changeset
133 m->is_valid(data);
a61af66fc99e Initial load
duke
parents:
diff changeset
134 data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
135 data->oop_iterate(blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
136 }
a61af66fc99e Initial load
duke
parents:
diff changeset
137 return size;
a61af66fc99e Initial load
duke
parents:
diff changeset
138 }
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 int methodDataKlass::oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr) {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 assert (obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
142 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
143 // Get size before changing pointers
a61af66fc99e Initial load
duke
parents:
diff changeset
144 // Don't call size() or oop_size() since that is a virtual call.
a61af66fc99e Initial load
duke
parents:
diff changeset
145 int size = m->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
146
a61af66fc99e Initial load
duke
parents:
diff changeset
147 obj->oop_iterate_header(blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
148 oop* adr = m->adr_method();
a61af66fc99e Initial load
duke
parents:
diff changeset
149 if (mr.contains(adr)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
150 blk->do_oop(m->adr_method());
a61af66fc99e Initial load
duke
parents:
diff changeset
151 }
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
152 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
153 adr = m->adr_graal_mirror();
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
154 if(mr.contains(adr)) {
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
155 blk->do_oop(m->adr_graal_mirror());
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
156 }
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
157 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
158 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
159 for (ProfileData* data = m->first_data();
a61af66fc99e Initial load
duke
parents:
diff changeset
160 m->is_valid(data);
a61af66fc99e Initial load
duke
parents:
diff changeset
161 data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
162 data->oop_iterate_m(blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
163 }
a61af66fc99e Initial load
duke
parents:
diff changeset
164 return size;
a61af66fc99e Initial load
duke
parents:
diff changeset
165 }
a61af66fc99e Initial load
duke
parents:
diff changeset
166
a61af66fc99e Initial load
duke
parents:
diff changeset
167 int methodDataKlass::oop_adjust_pointers(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
168 assert(obj->is_methodData(), "should be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
169 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
170 // Get size before changing pointers
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // Don't call size() or oop_size() since that is a virtual call.
a61af66fc99e Initial load
duke
parents:
diff changeset
172 int size = m->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
173
a61af66fc99e Initial load
duke
parents:
diff changeset
174 obj->adjust_header();
a61af66fc99e Initial load
duke
parents:
diff changeset
175 MarkSweep::adjust_pointer(m->adr_method());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
176 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
177 MarkSweep::adjust_pointer(m->adr_graal_mirror());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
178 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
179 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
180 ProfileData* data;
a61af66fc99e Initial load
duke
parents:
diff changeset
181 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
182 data->adjust_pointers();
a61af66fc99e Initial load
duke
parents:
diff changeset
183 }
a61af66fc99e Initial load
duke
parents:
diff changeset
184 return size;
a61af66fc99e Initial load
duke
parents:
diff changeset
185 }
a61af66fc99e Initial load
duke
parents:
diff changeset
186
a61af66fc99e Initial load
duke
parents:
diff changeset
187
a61af66fc99e Initial load
duke
parents:
diff changeset
188 #ifndef SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
189 void methodDataKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
190 assert (obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
191 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
192 // This should never point into the young gen.
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
193 assert(!PSScavenge::should_scavenge(m->adr_method()), "Sanity");
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
194 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
195 oop* adr = m->adr_graal_mirror();
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
196 if(PSScavenge::should_scavenge(adr)) {
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
197 pm->claim_or_forward_depth(adr);
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
198 }
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
199 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
200 }
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 int methodDataKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
203 assert(obj->is_methodData(), "should be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
204 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 PSParallelCompact::adjust_pointer(m->adr_method());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
207 #ifdef GRAAL
4439
f7251c729b31 profiling info first try
Christian Haeubl <christian.haeubl@oracle.com>
parents: 2227
diff changeset
208 PSParallelCompact::adjust_pointer(m->adr_graal_mirror());
4979
18a5539bf19b More diff vs hsx24 optimizations.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents: 4471
diff changeset
209 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
210
a61af66fc99e Initial load
duke
parents:
diff changeset
211 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
212 ProfileData* data;
a61af66fc99e Initial load
duke
parents:
diff changeset
213 for (data = m->first_data(); m->is_valid(data); data = m->next_data(data)) {
a61af66fc99e Initial load
duke
parents:
diff changeset
214 data->update_pointers();
a61af66fc99e Initial load
duke
parents:
diff changeset
215 }
a61af66fc99e Initial load
duke
parents:
diff changeset
216 return m->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
217 }
a61af66fc99e Initial load
duke
parents:
diff changeset
218 #endif // SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
219
a61af66fc99e Initial load
duke
parents:
diff changeset
220 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
221
a61af66fc99e Initial load
duke
parents:
diff changeset
222 // Printing
a61af66fc99e Initial load
duke
parents:
diff changeset
223 void methodDataKlass::oop_print_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
224 assert(obj->is_methodData(), "should be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
225 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
226 st->print("method data for ");
a61af66fc99e Initial load
duke
parents:
diff changeset
227 m->method()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
228 st->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
229 m->print_data_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
230 }
a61af66fc99e Initial load
duke
parents:
diff changeset
231
1155
4e6abf09f540 6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents: 196
diff changeset
232 #endif //PRODUCT
4e6abf09f540 6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents: 196
diff changeset
233
0
a61af66fc99e Initial load
duke
parents:
diff changeset
234 void methodDataKlass::oop_print_value_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
235 assert(obj->is_methodData(), "should be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
236 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
237 st->print("method data for ");
a61af66fc99e Initial load
duke
parents:
diff changeset
238 m->method()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
239 }
a61af66fc99e Initial load
duke
parents:
diff changeset
240
a61af66fc99e Initial load
duke
parents:
diff changeset
241 const char* methodDataKlass::internal_name() const {
a61af66fc99e Initial load
duke
parents:
diff changeset
242 return "{method data}";
a61af66fc99e Initial load
duke
parents:
diff changeset
243 }
a61af66fc99e Initial load
duke
parents:
diff changeset
244
a61af66fc99e Initial load
duke
parents:
diff changeset
245
a61af66fc99e Initial load
duke
parents:
diff changeset
246 // Verification
a61af66fc99e Initial load
duke
parents:
diff changeset
247 void methodDataKlass::oop_verify_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
248 Klass::oop_verify_on(obj, st);
a61af66fc99e Initial load
duke
parents:
diff changeset
249 guarantee(obj->is_methodData(), "object must be method data");
a61af66fc99e Initial load
duke
parents:
diff changeset
250 methodDataOop m = methodDataOop(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
251 guarantee(m->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
252 m->verify_data_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
253 }