annotate src/share/vm/oops/instanceKlassKlass.cpp @ 6038:8bafad97cd26

7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support. Summary: Change the _host_klass to be conditionally created embedded instanceKlass field. Reviewed-by: jrose, coleenp, dholmes
author jiangli
date Wed, 02 May 2012 13:21:36 -0400
parents 49036505ab5f
children 04ade88d9712
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
2 * Copyright (c) 1997, 2012, 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: 1490
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1490
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: 1490
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 "classfile/javaClasses.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
27 #include "classfile/systemDictionary.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
28 #include "gc_implementation/shared/markSweep.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
29 #include "gc_interface/collectedHeap.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
30 #include "interpreter/oopMapCache.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
31 #include "memory/gcLocker.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
32 #include "oops/constantPoolOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
33 #include "oops/instanceKlass.hpp"
2376
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
34 #include "oops/instanceMirrorKlass.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
35 #include "oops/instanceKlassKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
36 #include "oops/instanceRefKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
37 #include "oops/objArrayKlassKlass.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
38 #include "oops/objArrayOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
39 #include "oops/oop.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
40 #include "oops/oop.inline2.hpp"
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1972
diff changeset
41 #include "oops/symbol.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
42 #include "oops/typeArrayOop.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
43 #include "prims/jvmtiExport.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
44 #include "runtime/fieldDescriptor.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
45 #ifndef SERIALGC
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
46 #include "gc_implementation/parNew/parOopClosures.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
47 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
48 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
49 #include "memory/cardTableRS.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
50 #include "oops/oop.pcgc.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1706
diff changeset
51 #endif
0
a61af66fc99e Initial load
duke
parents:
diff changeset
52
a61af66fc99e Initial load
duke
parents:
diff changeset
53 klassOop instanceKlassKlass::create_klass(TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
54 instanceKlassKlass o;
a61af66fc99e Initial load
duke
parents:
diff changeset
55 KlassHandle h_this_klass(THREAD, Universe::klassKlassObj());
a61af66fc99e Initial load
duke
parents:
diff changeset
56 KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
57 // Make sure size calculation is right
a61af66fc99e Initial load
duke
parents:
diff changeset
58 assert(k()->size() == align_object_size(header_size()), "wrong size for object");
a61af66fc99e Initial load
duke
parents:
diff changeset
59 java_lang_Class::create_mirror(k, CHECK_NULL); // Allocate mirror
a61af66fc99e Initial load
duke
parents:
diff changeset
60 return k();
a61af66fc99e Initial load
duke
parents:
diff changeset
61 }
a61af66fc99e Initial load
duke
parents:
diff changeset
62
a61af66fc99e Initial load
duke
parents:
diff changeset
63 int instanceKlassKlass::oop_size(oop obj) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
64 assert(obj->is_klass(), "must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
65 return instanceKlass::cast(klassOop(obj))->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
66 }
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 bool instanceKlassKlass::oop_is_parsable(oop obj) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
69 assert(obj->is_klass(), "must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
70 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
71 return (!ik->null_vtbl()) && ik->object_is_parsable();
a61af66fc99e Initial load
duke
parents:
diff changeset
72 }
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 void instanceKlassKlass::iterate_c_heap_oops(instanceKlass* ik,
a61af66fc99e Initial load
duke
parents:
diff changeset
75 OopClosure* closure) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 if (ik->oop_map_cache() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
77 ik->oop_map_cache()->oop_iterate(closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
78 }
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80 if (ik->jni_ids() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
81 ik->jni_ids()->oops_do(closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
82 }
a61af66fc99e Initial load
duke
parents:
diff changeset
83 }
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 void instanceKlassKlass::oop_follow_contents(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
86 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
87 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
88
a61af66fc99e Initial load
duke
parents:
diff changeset
89 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
90 {
a61af66fc99e Initial load
duke
parents:
diff changeset
91 HandleMark hm;
a61af66fc99e Initial load
duke
parents:
diff changeset
92 ik->vtable()->oop_follow_contents();
a61af66fc99e Initial load
duke
parents:
diff changeset
93 ik->itable()->oop_follow_contents();
a61af66fc99e Initial load
duke
parents:
diff changeset
94 }
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 MarkSweep::mark_and_push(ik->adr_array_klasses());
a61af66fc99e Initial load
duke
parents:
diff changeset
97 MarkSweep::mark_and_push(ik->adr_methods());
a61af66fc99e Initial load
duke
parents:
diff changeset
98 MarkSweep::mark_and_push(ik->adr_method_ordering());
a61af66fc99e Initial load
duke
parents:
diff changeset
99 MarkSweep::mark_and_push(ik->adr_local_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
100 MarkSweep::mark_and_push(ik->adr_transitive_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
101 MarkSweep::mark_and_push(ik->adr_fields());
a61af66fc99e Initial load
duke
parents:
diff changeset
102 MarkSweep::mark_and_push(ik->adr_constants());
a61af66fc99e Initial load
duke
parents:
diff changeset
103 MarkSweep::mark_and_push(ik->adr_class_loader());
a61af66fc99e Initial load
duke
parents:
diff changeset
104 MarkSweep::mark_and_push(ik->adr_inner_classes());
a61af66fc99e Initial load
duke
parents:
diff changeset
105 MarkSweep::mark_and_push(ik->adr_protection_domain());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
106 if (ik->adr_host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
107 MarkSweep::mark_and_push(ik->adr_host_klass());
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
108 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
109 MarkSweep::mark_and_push(ik->adr_signers());
a61af66fc99e Initial load
duke
parents:
diff changeset
110 MarkSweep::mark_and_push(ik->adr_class_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
111 MarkSweep::mark_and_push(ik->adr_fields_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
112 MarkSweep::mark_and_push(ik->adr_methods_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
113 MarkSweep::mark_and_push(ik->adr_methods_parameter_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
114 MarkSweep::mark_and_push(ik->adr_methods_default_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
115
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
116 // We do not follow adr_implementor() here. It is followed later
0
a61af66fc99e Initial load
duke
parents:
diff changeset
117 // in instanceKlass::follow_weak_klass_links()
a61af66fc99e Initial load
duke
parents:
diff changeset
118
a61af66fc99e Initial load
duke
parents:
diff changeset
119 klassKlass::oop_follow_contents(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 iterate_c_heap_oops(ik, &MarkSweep::mark_and_push_closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
122 }
a61af66fc99e Initial load
duke
parents:
diff changeset
123
a61af66fc99e Initial load
duke
parents:
diff changeset
124 #ifndef SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
125 void instanceKlassKlass::oop_follow_contents(ParCompactionManager* cm,
a61af66fc99e Initial load
duke
parents:
diff changeset
126 oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
127 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
128 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
129
a61af66fc99e Initial load
duke
parents:
diff changeset
130 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
131 ik->vtable()->oop_follow_contents(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
132 ik->itable()->oop_follow_contents(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
133
a61af66fc99e Initial load
duke
parents:
diff changeset
134 PSParallelCompact::mark_and_push(cm, ik->adr_array_klasses());
a61af66fc99e Initial load
duke
parents:
diff changeset
135 PSParallelCompact::mark_and_push(cm, ik->adr_methods());
a61af66fc99e Initial load
duke
parents:
diff changeset
136 PSParallelCompact::mark_and_push(cm, ik->adr_method_ordering());
a61af66fc99e Initial load
duke
parents:
diff changeset
137 PSParallelCompact::mark_and_push(cm, ik->adr_local_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
138 PSParallelCompact::mark_and_push(cm, ik->adr_transitive_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
139 PSParallelCompact::mark_and_push(cm, ik->adr_fields());
a61af66fc99e Initial load
duke
parents:
diff changeset
140 PSParallelCompact::mark_and_push(cm, ik->adr_constants());
a61af66fc99e Initial load
duke
parents:
diff changeset
141 PSParallelCompact::mark_and_push(cm, ik->adr_class_loader());
a61af66fc99e Initial load
duke
parents:
diff changeset
142 PSParallelCompact::mark_and_push(cm, ik->adr_inner_classes());
a61af66fc99e Initial load
duke
parents:
diff changeset
143 PSParallelCompact::mark_and_push(cm, ik->adr_protection_domain());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
144 if (ik->adr_host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
145 PSParallelCompact::mark_and_push(cm, ik->adr_host_klass());
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
146 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 PSParallelCompact::mark_and_push(cm, ik->adr_signers());
a61af66fc99e Initial load
duke
parents:
diff changeset
148 PSParallelCompact::mark_and_push(cm, ik->adr_class_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
149 PSParallelCompact::mark_and_push(cm, ik->adr_fields_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
150 PSParallelCompact::mark_and_push(cm, ik->adr_methods_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
151 PSParallelCompact::mark_and_push(cm, ik->adr_methods_parameter_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
152 PSParallelCompact::mark_and_push(cm, ik->adr_methods_default_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
153
a61af66fc99e Initial load
duke
parents:
diff changeset
154 // We do not follow adr_implementor() here. It is followed later
a61af66fc99e Initial load
duke
parents:
diff changeset
155 // in instanceKlass::follow_weak_klass_links()
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 klassKlass::oop_follow_contents(cm, obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
158
a61af66fc99e Initial load
duke
parents:
diff changeset
159 PSParallelCompact::MarkAndPushClosure mark_and_push_closure(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
160 iterate_c_heap_oops(ik, &mark_and_push_closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
161 }
a61af66fc99e Initial load
duke
parents:
diff changeset
162 #endif // SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
163
a61af66fc99e Initial load
duke
parents:
diff changeset
164 int instanceKlassKlass::oop_oop_iterate(oop obj, OopClosure* blk) {
a61af66fc99e Initial load
duke
parents:
diff changeset
165 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
166 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
167 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
168 // Get size before changing pointers.
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // Don't call size() or oop_size() since that is a virtual call.
a61af66fc99e Initial load
duke
parents:
diff changeset
170 int size = ik->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
171
a61af66fc99e Initial load
duke
parents:
diff changeset
172 ik->vtable()->oop_oop_iterate(blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
173 ik->itable()->oop_oop_iterate(blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 blk->do_oop(ik->adr_array_klasses());
a61af66fc99e Initial load
duke
parents:
diff changeset
176 blk->do_oop(ik->adr_methods());
a61af66fc99e Initial load
duke
parents:
diff changeset
177 blk->do_oop(ik->adr_method_ordering());
a61af66fc99e Initial load
duke
parents:
diff changeset
178 blk->do_oop(ik->adr_local_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
179 blk->do_oop(ik->adr_transitive_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
180 blk->do_oop(ik->adr_fields());
a61af66fc99e Initial load
duke
parents:
diff changeset
181 blk->do_oop(ik->adr_constants());
a61af66fc99e Initial load
duke
parents:
diff changeset
182 blk->do_oop(ik->adr_class_loader());
a61af66fc99e Initial load
duke
parents:
diff changeset
183 blk->do_oop(ik->adr_protection_domain());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
184 if (ik->adr_host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
185 blk->do_oop(ik->adr_host_klass());
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
186 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
187 blk->do_oop(ik->adr_signers());
a61af66fc99e Initial load
duke
parents:
diff changeset
188 blk->do_oop(ik->adr_inner_classes());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
189 if (ik->adr_implementor() != NULL) {
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
190 blk->do_oop(ik->adr_implementor());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
191 }
a61af66fc99e Initial load
duke
parents:
diff changeset
192 blk->do_oop(ik->adr_class_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
193 blk->do_oop(ik->adr_fields_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
194 blk->do_oop(ik->adr_methods_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
195 blk->do_oop(ik->adr_methods_parameter_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
196 blk->do_oop(ik->adr_methods_default_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
197
a61af66fc99e Initial load
duke
parents:
diff changeset
198 klassKlass::oop_oop_iterate(obj, blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
199
a61af66fc99e Initial load
duke
parents:
diff changeset
200 if(ik->oop_map_cache() != NULL) ik->oop_map_cache()->oop_iterate(blk);
a61af66fc99e Initial load
duke
parents:
diff changeset
201 return size;
a61af66fc99e Initial load
duke
parents:
diff changeset
202 }
a61af66fc99e Initial load
duke
parents:
diff changeset
203
a61af66fc99e Initial load
duke
parents:
diff changeset
204 int instanceKlassKlass::oop_oop_iterate_m(oop obj, OopClosure* blk,
a61af66fc99e Initial load
duke
parents:
diff changeset
205 MemRegion mr) {
a61af66fc99e Initial load
duke
parents:
diff changeset
206 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
207 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
208 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
209 // Get size before changing pointers.
a61af66fc99e Initial load
duke
parents:
diff changeset
210 // Don't call size() or oop_size() since that is a virtual call.
a61af66fc99e Initial load
duke
parents:
diff changeset
211 int size = ik->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 ik->vtable()->oop_oop_iterate_m(blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
214 ik->itable()->oop_oop_iterate_m(blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
215
a61af66fc99e Initial load
duke
parents:
diff changeset
216 oop* adr;
a61af66fc99e Initial load
duke
parents:
diff changeset
217 adr = ik->adr_array_klasses();
a61af66fc99e Initial load
duke
parents:
diff changeset
218 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
219 adr = ik->adr_methods();
a61af66fc99e Initial load
duke
parents:
diff changeset
220 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
221 adr = ik->adr_method_ordering();
a61af66fc99e Initial load
duke
parents:
diff changeset
222 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
223 adr = ik->adr_local_interfaces();
a61af66fc99e Initial load
duke
parents:
diff changeset
224 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
225 adr = ik->adr_transitive_interfaces();
a61af66fc99e Initial load
duke
parents:
diff changeset
226 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
227 adr = ik->adr_fields();
a61af66fc99e Initial load
duke
parents:
diff changeset
228 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
229 adr = ik->adr_constants();
a61af66fc99e Initial load
duke
parents:
diff changeset
230 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
231 adr = ik->adr_class_loader();
a61af66fc99e Initial load
duke
parents:
diff changeset
232 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
233 adr = ik->adr_protection_domain();
a61af66fc99e Initial load
duke
parents:
diff changeset
234 if (mr.contains(adr)) blk->do_oop(adr);
431
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
235 adr = ik->adr_host_klass();
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
236 if (adr != NULL && mr.contains(adr)) blk->do_oop(adr);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
237 adr = ik->adr_signers();
a61af66fc99e Initial load
duke
parents:
diff changeset
238 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
239 adr = ik->adr_inner_classes();
a61af66fc99e Initial load
duke
parents:
diff changeset
240 if (mr.contains(adr)) blk->do_oop(adr);
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
241 adr = ik->adr_implementor();
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
242 if (adr != NULL && mr.contains(adr)) blk->do_oop(adr);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
243 adr = ik->adr_class_annotations();
a61af66fc99e Initial load
duke
parents:
diff changeset
244 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
245 adr = ik->adr_fields_annotations();
a61af66fc99e Initial load
duke
parents:
diff changeset
246 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
247 adr = ik->adr_methods_annotations();
a61af66fc99e Initial load
duke
parents:
diff changeset
248 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
249 adr = ik->adr_methods_parameter_annotations();
a61af66fc99e Initial load
duke
parents:
diff changeset
250 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
251 adr = ik->adr_methods_default_annotations();
a61af66fc99e Initial load
duke
parents:
diff changeset
252 if (mr.contains(adr)) blk->do_oop(adr);
a61af66fc99e Initial load
duke
parents:
diff changeset
253
a61af66fc99e Initial load
duke
parents:
diff changeset
254 klassKlass::oop_oop_iterate_m(obj, blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
255
a61af66fc99e Initial load
duke
parents:
diff changeset
256 if(ik->oop_map_cache() != NULL) ik->oop_map_cache()->oop_iterate(blk, mr);
a61af66fc99e Initial load
duke
parents:
diff changeset
257 return size;
a61af66fc99e Initial load
duke
parents:
diff changeset
258 }
a61af66fc99e Initial load
duke
parents:
diff changeset
259
a61af66fc99e Initial load
duke
parents:
diff changeset
260 int instanceKlassKlass::oop_adjust_pointers(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
261 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
262 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(), "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
263
a61af66fc99e Initial load
duke
parents:
diff changeset
264 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
265 ik->vtable()->oop_adjust_pointers();
a61af66fc99e Initial load
duke
parents:
diff changeset
266 ik->itable()->oop_adjust_pointers();
a61af66fc99e Initial load
duke
parents:
diff changeset
267
a61af66fc99e Initial load
duke
parents:
diff changeset
268 MarkSweep::adjust_pointer(ik->adr_array_klasses());
a61af66fc99e Initial load
duke
parents:
diff changeset
269 MarkSweep::adjust_pointer(ik->adr_methods());
a61af66fc99e Initial load
duke
parents:
diff changeset
270 MarkSweep::adjust_pointer(ik->adr_method_ordering());
a61af66fc99e Initial load
duke
parents:
diff changeset
271 MarkSweep::adjust_pointer(ik->adr_local_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
272 MarkSweep::adjust_pointer(ik->adr_transitive_interfaces());
a61af66fc99e Initial load
duke
parents:
diff changeset
273 MarkSweep::adjust_pointer(ik->adr_fields());
a61af66fc99e Initial load
duke
parents:
diff changeset
274 MarkSweep::adjust_pointer(ik->adr_constants());
a61af66fc99e Initial load
duke
parents:
diff changeset
275 MarkSweep::adjust_pointer(ik->adr_class_loader());
a61af66fc99e Initial load
duke
parents:
diff changeset
276 MarkSweep::adjust_pointer(ik->adr_protection_domain());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
277 if (ik->adr_host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
278 MarkSweep::adjust_pointer(ik->adr_host_klass());
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
279 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
280 MarkSweep::adjust_pointer(ik->adr_signers());
a61af66fc99e Initial load
duke
parents:
diff changeset
281 MarkSweep::adjust_pointer(ik->adr_inner_classes());
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
282 if (ik->adr_implementor() != NULL) {
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
283 MarkSweep::adjust_pointer(ik->adr_implementor());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
284 }
a61af66fc99e Initial load
duke
parents:
diff changeset
285 MarkSweep::adjust_pointer(ik->adr_class_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
286 MarkSweep::adjust_pointer(ik->adr_fields_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
287 MarkSweep::adjust_pointer(ik->adr_methods_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
288 MarkSweep::adjust_pointer(ik->adr_methods_parameter_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
289 MarkSweep::adjust_pointer(ik->adr_methods_default_annotations());
a61af66fc99e Initial load
duke
parents:
diff changeset
290
a61af66fc99e Initial load
duke
parents:
diff changeset
291 iterate_c_heap_oops(ik, &MarkSweep::adjust_root_pointer_closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
292
a61af66fc99e Initial load
duke
parents:
diff changeset
293 return klassKlass::oop_adjust_pointers(obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
294 }
a61af66fc99e Initial load
duke
parents:
diff changeset
295
a61af66fc99e Initial load
duke
parents:
diff changeset
296 #ifndef SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
297 void instanceKlassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
298 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
299
a61af66fc99e Initial load
duke
parents:
diff changeset
300 oop* loader_addr = ik->adr_class_loader();
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
301 if (PSScavenge::should_scavenge(loader_addr)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
302 pm->claim_or_forward_depth(loader_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
303 }
a61af66fc99e Initial load
duke
parents:
diff changeset
304
a61af66fc99e Initial load
duke
parents:
diff changeset
305 oop* pd_addr = ik->adr_protection_domain();
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
306 if (PSScavenge::should_scavenge(pd_addr)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
307 pm->claim_or_forward_depth(pd_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
308 }
a61af66fc99e Initial load
duke
parents:
diff changeset
309
431
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
310 oop* hk_addr = ik->adr_host_klass();
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
311 if (hk_addr != NULL && PSScavenge::should_scavenge(hk_addr)) {
431
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
312 pm->claim_or_forward_depth(hk_addr);
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
313 }
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
314
0
a61af66fc99e Initial load
duke
parents:
diff changeset
315 oop* sg_addr = ik->adr_signers();
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
316 if (PSScavenge::should_scavenge(sg_addr)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
317 pm->claim_or_forward_depth(sg_addr);
a61af66fc99e Initial load
duke
parents:
diff changeset
318 }
a61af66fc99e Initial load
duke
parents:
diff changeset
319
1706
9d7a8ab3736b 6962589: remove breadth first scanning code from parallel gc
tonyp
parents: 1552
diff changeset
320 klassKlass::oop_push_contents(pm, obj);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
321 }
a61af66fc99e Initial load
duke
parents:
diff changeset
322
a61af66fc99e Initial load
duke
parents:
diff changeset
323 int instanceKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
324 assert(obj->is_klass(),"must be a klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
325 assert(klassOop(obj)->klass_part()->oop_is_instance_slow(),
a61af66fc99e Initial load
duke
parents:
diff changeset
326 "must be instance klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
327
a61af66fc99e Initial load
duke
parents:
diff changeset
328 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
329 ik->vtable()->oop_update_pointers(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
330 ik->itable()->oop_update_pointers(cm);
a61af66fc99e Initial load
duke
parents:
diff changeset
331
a61af66fc99e Initial load
duke
parents:
diff changeset
332 oop* const beg_oop = ik->oop_block_beg();
a61af66fc99e Initial load
duke
parents:
diff changeset
333 oop* const end_oop = ik->oop_block_end();
a61af66fc99e Initial load
duke
parents:
diff changeset
334 for (oop* cur_oop = beg_oop; cur_oop < end_oop; ++cur_oop) {
a61af66fc99e Initial load
duke
parents:
diff changeset
335 PSParallelCompact::adjust_pointer(cur_oop);
a61af66fc99e Initial load
duke
parents:
diff changeset
336 }
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
337 // embedded oops
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
338 if (ik->adr_implementor() != NULL) {
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
339 PSParallelCompact::adjust_pointer(ik->adr_implementor());
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
340 }
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
341 if (ik->adr_host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
342 PSParallelCompact::adjust_pointer(ik->adr_host_klass());
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
343 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
344
a61af66fc99e Initial load
duke
parents:
diff changeset
345 OopClosure* closure = PSParallelCompact::adjust_root_pointer_closure();
a61af66fc99e Initial load
duke
parents:
diff changeset
346 iterate_c_heap_oops(ik, closure);
a61af66fc99e Initial load
duke
parents:
diff changeset
347
a61af66fc99e Initial load
duke
parents:
diff changeset
348 klassKlass::oop_update_pointers(cm, obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
349 return ik->object_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
350 }
a61af66fc99e Initial load
duke
parents:
diff changeset
351
a61af66fc99e Initial load
duke
parents:
diff changeset
352 #endif // SERIALGC
a61af66fc99e Initial load
duke
parents:
diff changeset
353
938
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
354 klassOop
2376
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
355 instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int itable_len,
938
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
356 int static_field_size,
939
9eebd3ac74cf 6845368: large objects cause a crash or unexpected exception
jcoomes
parents: 938
diff changeset
357 unsigned nonstatic_oop_map_count,
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
358 AccessFlags access_flags,
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
359 ReferenceType rt,
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
360 KlassHandle host_klass, TRAPS) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
361
938
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
362 const int nonstatic_oop_map_size =
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
363 instanceKlass::nonstatic_oop_map_size(nonstatic_oop_map_count);
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
364 int size = align_object_offset(vtable_len) + align_object_offset(itable_len);
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
365 if (access_flags.is_interface() || !host_klass.is_null()) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
366 size += align_object_offset(nonstatic_oop_map_size);
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
367 } else {
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
368 size += nonstatic_oop_map_size;
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
369 }
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
370 if (access_flags.is_interface()) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
371 size += (int)sizeof(klassOop)/HeapWordSize;
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
372 }
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
373 if (!host_klass.is_null()) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
374 size += (int)sizeof(klassOop)/HeapWordSize;
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
375 }
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
376 size = instanceKlass::object_size(size);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
377
a61af66fc99e Initial load
duke
parents:
diff changeset
378 // Allocation
a61af66fc99e Initial load
duke
parents:
diff changeset
379 KlassHandle h_this_klass(THREAD, as_klassOop());
a61af66fc99e Initial load
duke
parents:
diff changeset
380 KlassHandle k;
a61af66fc99e Initial load
duke
parents:
diff changeset
381 if (rt == REF_NONE) {
2376
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
382 if (name != vmSymbols::java_lang_Class()) {
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
383 // regular klass
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
384 instanceKlass o;
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
385 k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
386 } else {
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
387 // Class
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
388 instanceMirrorKlass o;
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
389 k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
390 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
391 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
392 // reference klass
a61af66fc99e Initial load
duke
parents:
diff changeset
393 instanceRefKlass o;
a61af66fc99e Initial load
duke
parents:
diff changeset
394 k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
395 }
a61af66fc99e Initial load
duke
parents:
diff changeset
396 {
a61af66fc99e Initial load
duke
parents:
diff changeset
397 No_Safepoint_Verifier no_safepoint; // until k becomes parsable
a61af66fc99e Initial load
duke
parents:
diff changeset
398 instanceKlass* ik = (instanceKlass*) k()->klass_part();
a61af66fc99e Initial load
duke
parents:
diff changeset
399 assert(!k()->is_parsable(), "not expecting parsability yet.");
a61af66fc99e Initial load
duke
parents:
diff changeset
400
a61af66fc99e Initial load
duke
parents:
diff changeset
401 // The sizes of these these three variables are used for determining the
a61af66fc99e Initial load
duke
parents:
diff changeset
402 // size of the instanceKlassOop. It is critical that these are set to the right
a61af66fc99e Initial load
duke
parents:
diff changeset
403 // sizes before the first GC, i.e., when we allocate the mirror.
a61af66fc99e Initial load
duke
parents:
diff changeset
404 ik->set_vtable_length(vtable_len);
a61af66fc99e Initial load
duke
parents:
diff changeset
405 ik->set_itable_length(itable_len);
a61af66fc99e Initial load
duke
parents:
diff changeset
406 ik->set_static_field_size(static_field_size);
a61af66fc99e Initial load
duke
parents:
diff changeset
407 ik->set_nonstatic_oop_map_size(nonstatic_oop_map_size);
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
408 ik->set_access_flags(access_flags);
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
409 ik->set_is_anonymous(!host_klass.is_null());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
410 assert(k()->size() == size, "wrong size for object");
a61af66fc99e Initial load
duke
parents:
diff changeset
411
a61af66fc99e Initial load
duke
parents:
diff changeset
412 ik->set_array_klasses(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
413 ik->set_methods(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
414 ik->set_method_ordering(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
415 ik->set_local_interfaces(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
416 ik->set_transitive_interfaces(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
417 ik->init_implementor();
3938
e6b1331a51d2 7086585: make Java field injection more flexible
never
parents: 3245
diff changeset
418 ik->set_fields(NULL, 0);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
419 ik->set_constants(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
420 ik->set_class_loader(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
421 ik->set_protection_domain(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
422 ik->set_signers(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
423 ik->set_source_file_name(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
424 ik->set_source_debug_extension(NULL);
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1972
diff changeset
425 ik->set_source_debug_extension(NULL);
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1972
diff changeset
426 ik->set_array_name(NULL);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
427 ik->set_inner_classes(NULL);
2376
c7f3d0b4570f 7017732: move static fields into Class to prepare for perm gen removal
never
parents: 2227
diff changeset
428 ik->set_static_oop_field_count(0);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
429 ik->set_nonstatic_field_size(0);
4772
8f8b94305aff 7129240: backout fix for 7102776 until 7128770 is resolved
dcubed
parents: 4737
diff changeset
430 ik->set_is_marked_dependent(false);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
431 ik->set_init_state(instanceKlass::allocated);
a61af66fc99e Initial load
duke
parents:
diff changeset
432 ik->set_init_thread(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
433 ik->set_reference_type(rt);
a61af66fc99e Initial load
duke
parents:
diff changeset
434 ik->set_oop_map_cache(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
435 ik->set_jni_ids(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
436 ik->set_osr_nmethods_head(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
437 ik->set_breakpoints(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
438 ik->init_previous_versions();
a61af66fc99e Initial load
duke
parents:
diff changeset
439 ik->set_generic_signature(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
440 ik->release_set_methods_jmethod_ids(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
441 ik->release_set_methods_cached_itable_indices(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
442 ik->set_class_annotations(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
443 ik->set_fields_annotations(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
444 ik->set_methods_annotations(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
445 ik->set_methods_parameter_annotations(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
446 ik->set_methods_default_annotations(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
447 ik->set_jvmti_cached_class_field_map(NULL);
a61af66fc99e Initial load
duke
parents:
diff changeset
448 ik->set_initial_method_idnum(0);
a61af66fc99e Initial load
duke
parents:
diff changeset
449 assert(k()->is_parsable(), "should be parsable here.");
a61af66fc99e Initial load
duke
parents:
diff changeset
450
a61af66fc99e Initial load
duke
parents:
diff changeset
451 // initialize the non-header words to zero
a61af66fc99e Initial load
duke
parents:
diff changeset
452 intptr_t* p = (intptr_t*)k();
a61af66fc99e Initial load
duke
parents:
diff changeset
453 for (int index = instanceKlass::header_size(); index < size; index++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
454 p[index] = NULL_WORD;
a61af66fc99e Initial load
duke
parents:
diff changeset
455 }
a61af66fc99e Initial load
duke
parents:
diff changeset
456
a61af66fc99e Initial load
duke
parents:
diff changeset
457 // To get verify to work - must be set to partial loaded before first GC point.
a61af66fc99e Initial load
duke
parents:
diff changeset
458 k()->set_partially_loaded();
a61af66fc99e Initial load
duke
parents:
diff changeset
459 }
a61af66fc99e Initial load
duke
parents:
diff changeset
460 return k();
a61af66fc99e Initial load
duke
parents:
diff changeset
461 }
a61af66fc99e Initial load
duke
parents:
diff changeset
462
a61af66fc99e Initial load
duke
parents:
diff changeset
463
a61af66fc99e Initial load
duke
parents:
diff changeset
464
a61af66fc99e Initial load
duke
parents:
diff changeset
465 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
466
a61af66fc99e Initial load
duke
parents:
diff changeset
467 // Printing
a61af66fc99e Initial load
duke
parents:
diff changeset
468
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
469 #define BULLET " - "
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
470
0
a61af66fc99e Initial load
duke
parents:
diff changeset
471 static const char* state_names[] = {
a61af66fc99e Initial load
duke
parents:
diff changeset
472 "unparseable_by_gc", "allocated", "loaded", "linked", "being_initialized", "fully_initialized", "initialization_error"
a61af66fc99e Initial load
duke
parents:
diff changeset
473 };
a61af66fc99e Initial load
duke
parents:
diff changeset
474
a61af66fc99e Initial load
duke
parents:
diff changeset
475
a61af66fc99e Initial load
duke
parents:
diff changeset
476 void instanceKlassKlass::oop_print_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
477 assert(obj->is_klass(), "must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
478 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
479 klassKlass::oop_print_on(obj, st);
a61af66fc99e Initial load
duke
parents:
diff changeset
480
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
481 st->print(BULLET"instance size: %d", ik->size_helper()); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
482 st->print(BULLET"klass size: %d", ik->object_size()); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
483 st->print(BULLET"access: "); ik->access_flags().print_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
484 st->print(BULLET"state: "); st->print_cr(state_names[ik->_init_state]);
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
485 st->print(BULLET"name: "); ik->name()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
486 st->print(BULLET"super: "); ik->super()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
487 st->print(BULLET"sub: ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
488 Klass* sub = ik->subklass();
a61af66fc99e Initial load
duke
parents:
diff changeset
489 int n;
a61af66fc99e Initial load
duke
parents:
diff changeset
490 for (n = 0; sub != NULL; n++, sub = sub->next_sibling()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
491 if (n < MaxSubklassPrintSize) {
a61af66fc99e Initial load
duke
parents:
diff changeset
492 sub->as_klassOop()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
493 st->print(" ");
a61af66fc99e Initial load
duke
parents:
diff changeset
494 }
a61af66fc99e Initial load
duke
parents:
diff changeset
495 }
a61af66fc99e Initial load
duke
parents:
diff changeset
496 if (n >= MaxSubklassPrintSize) st->print("(%d more klasses...)", n - MaxSubklassPrintSize);
a61af66fc99e Initial load
duke
parents:
diff changeset
497 st->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
498
a61af66fc99e Initial load
duke
parents:
diff changeset
499 if (ik->is_interface()) {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
500 st->print_cr(BULLET"nof implementors: %d", ik->nof_implementors());
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
501 if (ik->nof_implementors() == 1) {
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
502 st->print_cr(BULLET"implementor: ");
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
503 st->print(" ");
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
504 ik->implementor()->print_value_on(st);
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
505 st->cr();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
506 }
a61af66fc99e Initial load
duke
parents:
diff changeset
507 }
a61af66fc99e Initial load
duke
parents:
diff changeset
508
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
509 st->print(BULLET"arrays: "); ik->array_klasses()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
510 st->print(BULLET"methods: "); ik->methods()->print_value_on(st); st->cr();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
511 if (Verbose) {
a61af66fc99e Initial load
duke
parents:
diff changeset
512 objArrayOop methods = ik->methods();
a61af66fc99e Initial load
duke
parents:
diff changeset
513 for(int i = 0; i < methods->length(); i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
514 tty->print("%d : ", i); methods->obj_at(i)->print_value(); tty->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
515 }
a61af66fc99e Initial load
duke
parents:
diff changeset
516 }
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
517 st->print(BULLET"method ordering: "); ik->method_ordering()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
518 st->print(BULLET"local interfaces: "); ik->local_interfaces()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
519 st->print(BULLET"trans. interfaces: "); ik->transitive_interfaces()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
520 st->print(BULLET"constants: "); ik->constants()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
521 st->print(BULLET"class loader: "); ik->class_loader()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
522 st->print(BULLET"protection domain: "); ik->protection_domain()->print_value_on(st); st->cr();
6038
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
523 if (ik->host_klass() != NULL) {
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
524 st->print(BULLET"host class: "); ik->host_klass()->print_value_on(st); st->cr();
8bafad97cd26 7158552: The instanceKlsss::_host_klass is only needed for anonymous class for JSR 292 support.
jiangli
parents: 5998
diff changeset
525 }
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
526 st->print(BULLET"signers: "); ik->signers()->print_value_on(st); st->cr();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
527 if (ik->source_file_name() != NULL) {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
528 st->print(BULLET"source file: ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
529 ik->source_file_name()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
530 st->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
531 }
a61af66fc99e Initial load
duke
parents:
diff changeset
532 if (ik->source_debug_extension() != NULL) {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
533 st->print(BULLET"source debug extension: ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
534 ik->source_debug_extension()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
535 st->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
536 }
a61af66fc99e Initial load
duke
parents:
diff changeset
537
a61af66fc99e Initial load
duke
parents:
diff changeset
538 {
a61af66fc99e Initial load
duke
parents:
diff changeset
539 ResourceMark rm;
a61af66fc99e Initial load
duke
parents:
diff changeset
540 // PreviousVersionInfo objects returned via PreviousVersionWalker
a61af66fc99e Initial load
duke
parents:
diff changeset
541 // contain a GrowableArray of handles. We have to clean up the
a61af66fc99e Initial load
duke
parents:
diff changeset
542 // GrowableArray _after_ the PreviousVersionWalker destructor
a61af66fc99e Initial load
duke
parents:
diff changeset
543 // has destroyed the handles.
a61af66fc99e Initial load
duke
parents:
diff changeset
544 {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
545 bool have_pv = false;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
546 PreviousVersionWalker pvw(ik);
a61af66fc99e Initial load
duke
parents:
diff changeset
547 for (PreviousVersionInfo * pv_info = pvw.next_previous_version();
a61af66fc99e Initial load
duke
parents:
diff changeset
548 pv_info != NULL; pv_info = pvw.next_previous_version()) {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
549 if (!have_pv)
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
550 st->print(BULLET"previous version: ");
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
551 have_pv = true;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
552 pv_info->prev_constant_pool_handle()()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
553 }
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
554 if (have_pv) st->cr();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
555 } // pvw is cleaned up
a61af66fc99e Initial load
duke
parents:
diff changeset
556 } // rm is cleaned up
a61af66fc99e Initial load
duke
parents:
diff changeset
557
a61af66fc99e Initial load
duke
parents:
diff changeset
558 if (ik->generic_signature() != NULL) {
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
559 st->print(BULLET"generic signature: ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
560 ik->generic_signature()->print_value_on(st);
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
561 st->cr();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
562 }
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
563 st->print(BULLET"inner classes: "); ik->inner_classes()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
564 st->print(BULLET"java mirror: "); ik->java_mirror()->print_value_on(st); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
565 st->print(BULLET"vtable length %d (start addr: " INTPTR_FORMAT ")", ik->vtable_length(), ik->start_of_vtable()); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
566 st->print(BULLET"itable length %d (start addr: " INTPTR_FORMAT ")", ik->itable_length(), ik->start_of_itable()); st->cr();
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
567 st->print_cr(BULLET"---- static fields (%d words):", ik->static_field_size());
0
a61af66fc99e Initial load
duke
parents:
diff changeset
568 FieldPrinter print_static_field(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
569 ik->do_local_static_fields(&print_static_field);
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
570 st->print_cr(BULLET"---- non-static fields (%d words):", ik->nonstatic_field_size());
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
571 FieldPrinter print_nonstatic_field(st);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
572 ik->do_nonstatic_fields(&print_nonstatic_field);
a61af66fc99e Initial load
duke
parents:
diff changeset
573
665
c89f86385056 6814659: separable cleanups and subroutines for 6655638
jrose
parents: 431
diff changeset
574 st->print(BULLET"non-static oop maps: ");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
575 OopMapBlock* map = ik->start_of_nonstatic_oop_maps();
938
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
576 OopMapBlock* end_map = map + ik->nonstatic_oop_map_count();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
577 while (map < end_map) {
938
b37c246bf7ce 6861660: OopMapBlock count/size confusion
jcoomes
parents: 726
diff changeset
578 st->print("%d-%d ", map->offset(), map->offset() + heapOopSize*(map->count() - 1));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
579 map++;
a61af66fc99e Initial load
duke
parents:
diff changeset
580 }
a61af66fc99e Initial load
duke
parents:
diff changeset
581 st->cr();
a61af66fc99e Initial load
duke
parents:
diff changeset
582 }
a61af66fc99e Initial load
duke
parents:
diff changeset
583
1155
4e6abf09f540 6912062: disassembler plugin needs to produce symbolic information in product mode
jrose
parents: 1059
diff changeset
584 #endif //PRODUCT
0
a61af66fc99e Initial load
duke
parents:
diff changeset
585
a61af66fc99e Initial load
duke
parents:
diff changeset
586 void instanceKlassKlass::oop_print_value_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
587 assert(obj->is_klass(), "must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
588 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
589 ik->name()->print_value_on(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
590 }
a61af66fc99e Initial load
duke
parents:
diff changeset
591
a61af66fc99e Initial load
duke
parents:
diff changeset
592 const char* instanceKlassKlass::internal_name() const {
a61af66fc99e Initial load
duke
parents:
diff changeset
593 return "{instance class}";
a61af66fc99e Initial load
duke
parents:
diff changeset
594 }
a61af66fc99e Initial load
duke
parents:
diff changeset
595
a61af66fc99e Initial load
duke
parents:
diff changeset
596 // Verification
a61af66fc99e Initial load
duke
parents:
diff changeset
597
a61af66fc99e Initial load
duke
parents:
diff changeset
598 class VerifyFieldClosure: public OopClosure {
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
599 protected:
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
600 template <class T> void do_oop_work(T* p) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
601 guarantee(Universe::heap()->is_in(p), "should be in heap");
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
602 oop obj = oopDesc::load_decode_heap_oop(p);
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
603 guarantee(obj->is_oop_or_null(), "should be in heap");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
604 }
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
605 public:
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
606 virtual void do_oop(oop* p) { VerifyFieldClosure::do_oop_work(p); }
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
607 virtual void do_oop(narrowOop* p) { VerifyFieldClosure::do_oop_work(p); }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
608 };
a61af66fc99e Initial load
duke
parents:
diff changeset
609
a61af66fc99e Initial load
duke
parents:
diff changeset
610 void instanceKlassKlass::oop_verify_on(oop obj, outputStream* st) {
a61af66fc99e Initial load
duke
parents:
diff changeset
611 klassKlass::oop_verify_on(obj, st);
a61af66fc99e Initial load
duke
parents:
diff changeset
612 if (!obj->partially_loaded()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
613 Thread *thread = Thread::current();
a61af66fc99e Initial load
duke
parents:
diff changeset
614 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
615
a61af66fc99e Initial load
duke
parents:
diff changeset
616 #ifndef PRODUCT
a61af66fc99e Initial load
duke
parents:
diff changeset
617 // Avoid redundant verifies
a61af66fc99e Initial load
duke
parents:
diff changeset
618 if (ik->_verify_count == Universe::verify_count()) return;
a61af66fc99e Initial load
duke
parents:
diff changeset
619 ik->_verify_count = Universe::verify_count();
a61af66fc99e Initial load
duke
parents:
diff changeset
620 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
621 // Verify that klass is present in SystemDictionary
431
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
622 if (ik->is_loaded() && !ik->is_anonymous()) {
2177
3582bf76420e 6990754: Use native memory and reference counting to implement SymbolTable
coleenp
parents: 1972
diff changeset
623 Symbol* h_name = ik->name();
0
a61af66fc99e Initial load
duke
parents:
diff changeset
624 Handle h_loader (thread, ik->class_loader());
a61af66fc99e Initial load
duke
parents:
diff changeset
625 Handle h_obj(thread, obj);
a61af66fc99e Initial load
duke
parents:
diff changeset
626 SystemDictionary::verify_obj_klass_present(h_obj, h_name, h_loader);
a61af66fc99e Initial load
duke
parents:
diff changeset
627 }
a61af66fc99e Initial load
duke
parents:
diff changeset
628
a61af66fc99e Initial load
duke
parents:
diff changeset
629 // Verify static fields
a61af66fc99e Initial load
duke
parents:
diff changeset
630 VerifyFieldClosure blk;
a61af66fc99e Initial load
duke
parents:
diff changeset
631
a61af66fc99e Initial load
duke
parents:
diff changeset
632 // Verify vtables
a61af66fc99e Initial load
duke
parents:
diff changeset
633 if (ik->is_linked()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
634 ResourceMark rm(thread);
a61af66fc99e Initial load
duke
parents:
diff changeset
635 // $$$ This used to be done only for m/s collections. Doing it
a61af66fc99e Initial load
duke
parents:
diff changeset
636 // always seemed a valid generalization. (DLD -- 6/00)
a61af66fc99e Initial load
duke
parents:
diff changeset
637 ik->vtable()->verify(st);
a61af66fc99e Initial load
duke
parents:
diff changeset
638 }
a61af66fc99e Initial load
duke
parents:
diff changeset
639
a61af66fc99e Initial load
duke
parents:
diff changeset
640 // Verify oop map cache
a61af66fc99e Initial load
duke
parents:
diff changeset
641 if (ik->oop_map_cache() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
642 ik->oop_map_cache()->verify();
a61af66fc99e Initial load
duke
parents:
diff changeset
643 }
a61af66fc99e Initial load
duke
parents:
diff changeset
644
a61af66fc99e Initial load
duke
parents:
diff changeset
645 // Verify first subklass
a61af66fc99e Initial load
duke
parents:
diff changeset
646 if (ik->subklass_oop() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
647 guarantee(ik->subklass_oop()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
648 guarantee(ik->subklass_oop()->is_klass(), "should be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
649 }
a61af66fc99e Initial load
duke
parents:
diff changeset
650
a61af66fc99e Initial load
duke
parents:
diff changeset
651 // Verify siblings
a61af66fc99e Initial load
duke
parents:
diff changeset
652 klassOop super = ik->super();
a61af66fc99e Initial load
duke
parents:
diff changeset
653 Klass* sib = ik->next_sibling();
a61af66fc99e Initial load
duke
parents:
diff changeset
654 int sib_count = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
655 while (sib != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
656 if (sib == ik) {
1490
f03d0a26bf83 6888954: argument formatting for assert() and friends
jcoomes
parents: 1155
diff changeset
657 fatal(err_msg("subclass cycle of length %d", sib_count));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
658 }
a61af66fc99e Initial load
duke
parents:
diff changeset
659 if (sib_count >= 100000) {
1490
f03d0a26bf83 6888954: argument formatting for assert() and friends
jcoomes
parents: 1155
diff changeset
660 fatal(err_msg("suspiciously long subclass list %d", sib_count));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
661 }
a61af66fc99e Initial load
duke
parents:
diff changeset
662 guarantee(sib->as_klassOop()->is_klass(), "should be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
663 guarantee(sib->as_klassOop()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
664 guarantee(sib->super() == super, "siblings should have same superklass");
a61af66fc99e Initial load
duke
parents:
diff changeset
665 sib = sib->next_sibling();
a61af66fc99e Initial load
duke
parents:
diff changeset
666 }
a61af66fc99e Initial load
duke
parents:
diff changeset
667
a61af66fc99e Initial load
duke
parents:
diff changeset
668 // Verify implementor fields
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
669 klassOop im = ik->implementor();
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
670 if (im != NULL) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
671 guarantee(ik->is_interface(), "only interfaces should have implementor set");
a61af66fc99e Initial load
duke
parents:
diff changeset
672 guarantee(im->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
673 guarantee(im->is_klass(), "should be klass");
5998
49036505ab5f 7154670: The instanceKlass _implementors[] and _nof_implementors are not needed for non-interface klass.
jiangli
parents: 5967
diff changeset
674 guarantee(!Klass::cast(klassOop(im))->is_interface() || im == ik->as_klassOop(), "implementors cannot be interfaces");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
675 }
a61af66fc99e Initial load
duke
parents:
diff changeset
676
a61af66fc99e Initial load
duke
parents:
diff changeset
677 // Verify local interfaces
a61af66fc99e Initial load
duke
parents:
diff changeset
678 objArrayOop local_interfaces = ik->local_interfaces();
a61af66fc99e Initial load
duke
parents:
diff changeset
679 guarantee(local_interfaces->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
680 guarantee(local_interfaces->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
681 int j;
a61af66fc99e Initial load
duke
parents:
diff changeset
682 for (j = 0; j < local_interfaces->length(); j++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
683 oop e = local_interfaces->obj_at(j);
a61af66fc99e Initial load
duke
parents:
diff changeset
684 guarantee(e->is_klass() && Klass::cast(klassOop(e))->is_interface(), "invalid local interface");
a61af66fc99e Initial load
duke
parents:
diff changeset
685 }
a61af66fc99e Initial load
duke
parents:
diff changeset
686
a61af66fc99e Initial load
duke
parents:
diff changeset
687 // Verify transitive interfaces
a61af66fc99e Initial load
duke
parents:
diff changeset
688 objArrayOop transitive_interfaces = ik->transitive_interfaces();
a61af66fc99e Initial load
duke
parents:
diff changeset
689 guarantee(transitive_interfaces->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
690 guarantee(transitive_interfaces->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
691 for (j = 0; j < transitive_interfaces->length(); j++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
692 oop e = transitive_interfaces->obj_at(j);
a61af66fc99e Initial load
duke
parents:
diff changeset
693 guarantee(e->is_klass() && Klass::cast(klassOop(e))->is_interface(), "invalid transitive interface");
a61af66fc99e Initial load
duke
parents:
diff changeset
694 }
a61af66fc99e Initial load
duke
parents:
diff changeset
695
a61af66fc99e Initial load
duke
parents:
diff changeset
696 // Verify methods
a61af66fc99e Initial load
duke
parents:
diff changeset
697 objArrayOop methods = ik->methods();
a61af66fc99e Initial load
duke
parents:
diff changeset
698 guarantee(methods->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
699 guarantee(methods->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
700 for (j = 0; j < methods->length(); j++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
701 guarantee(methods->obj_at(j)->is_method(), "non-method in methods array");
a61af66fc99e Initial load
duke
parents:
diff changeset
702 }
a61af66fc99e Initial load
duke
parents:
diff changeset
703 for (j = 0; j < methods->length() - 1; j++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
704 methodOop m1 = methodOop(methods->obj_at(j));
a61af66fc99e Initial load
duke
parents:
diff changeset
705 methodOop m2 = methodOop(methods->obj_at(j + 1));
a61af66fc99e Initial load
duke
parents:
diff changeset
706 guarantee(m1->name()->fast_compare(m2->name()) <= 0, "methods not sorted correctly");
a61af66fc99e Initial load
duke
parents:
diff changeset
707 }
a61af66fc99e Initial load
duke
parents:
diff changeset
708
a61af66fc99e Initial load
duke
parents:
diff changeset
709 // Verify method ordering
a61af66fc99e Initial load
duke
parents:
diff changeset
710 typeArrayOop method_ordering = ik->method_ordering();
a61af66fc99e Initial load
duke
parents:
diff changeset
711 guarantee(method_ordering->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
712 guarantee(method_ordering->is_typeArray(), "should be type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
713 int length = method_ordering->length();
3245
8ce625481709 7032407: Crash in LinkResolver::runtime_resolve_virtual_method()
coleenp
parents: 2460
diff changeset
714 if (JvmtiExport::can_maintain_original_method_order() ||
8ce625481709 7032407: Crash in LinkResolver::runtime_resolve_virtual_method()
coleenp
parents: 2460
diff changeset
715 (UseSharedSpaces && length != 0)) {
0
a61af66fc99e Initial load
duke
parents:
diff changeset
716 guarantee(length == methods->length(), "invalid method ordering length");
a61af66fc99e Initial load
duke
parents:
diff changeset
717 jlong sum = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
718 for (j = 0; j < length; j++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
719 int original_index = method_ordering->int_at(j);
a61af66fc99e Initial load
duke
parents:
diff changeset
720 guarantee(original_index >= 0 && original_index < length, "invalid method ordering index");
a61af66fc99e Initial load
duke
parents:
diff changeset
721 sum += original_index;
a61af66fc99e Initial load
duke
parents:
diff changeset
722 }
a61af66fc99e Initial load
duke
parents:
diff changeset
723 // Verify sum of indices 0,1,...,length-1
a61af66fc99e Initial load
duke
parents:
diff changeset
724 guarantee(sum == ((jlong)length*(length-1))/2, "invalid method ordering sum");
a61af66fc99e Initial load
duke
parents:
diff changeset
725 } else {
a61af66fc99e Initial load
duke
parents:
diff changeset
726 guarantee(length == 0, "invalid method ordering length");
a61af66fc99e Initial load
duke
parents:
diff changeset
727 }
a61af66fc99e Initial load
duke
parents:
diff changeset
728
a61af66fc99e Initial load
duke
parents:
diff changeset
729 // Verify JNI static field identifiers
a61af66fc99e Initial load
duke
parents:
diff changeset
730 if (ik->jni_ids() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
731 ik->jni_ids()->verify(ik->as_klassOop());
a61af66fc99e Initial load
duke
parents:
diff changeset
732 }
a61af66fc99e Initial load
duke
parents:
diff changeset
733
a61af66fc99e Initial load
duke
parents:
diff changeset
734 // Verify other fields
a61af66fc99e Initial load
duke
parents:
diff changeset
735 if (ik->array_klasses() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
736 guarantee(ik->array_klasses()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
737 guarantee(ik->array_klasses()->is_klass(), "should be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
738 }
a61af66fc99e Initial load
duke
parents:
diff changeset
739 guarantee(ik->fields()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
740 guarantee(ik->fields()->is_typeArray(), "should be type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
741 guarantee(ik->constants()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
742 guarantee(ik->constants()->is_constantPool(), "should be constant pool");
a61af66fc99e Initial load
duke
parents:
diff changeset
743 guarantee(ik->inner_classes()->is_perm(), "should be in permspace");
a61af66fc99e Initial load
duke
parents:
diff changeset
744 guarantee(ik->inner_classes()->is_typeArray(), "should be type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
745 if (ik->protection_domain() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
746 guarantee(ik->protection_domain()->is_oop(), "should be oop");
a61af66fc99e Initial load
duke
parents:
diff changeset
747 }
431
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
748 if (ik->host_klass() != NULL) {
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
749 guarantee(ik->host_klass()->is_oop(), "should be oop");
a45484ea312d 6653858: dynamic languages need to be able to load anonymous classes
jrose
parents: 196
diff changeset
750 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
751 if (ik->signers() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
752 guarantee(ik->signers()->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
753 }
a61af66fc99e Initial load
duke
parents:
diff changeset
754 if (ik->class_annotations() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
755 guarantee(ik->class_annotations()->is_typeArray(), "should be type array");
a61af66fc99e Initial load
duke
parents:
diff changeset
756 }
a61af66fc99e Initial load
duke
parents:
diff changeset
757 if (ik->fields_annotations() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
758 guarantee(ik->fields_annotations()->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
759 }
a61af66fc99e Initial load
duke
parents:
diff changeset
760 if (ik->methods_annotations() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
761 guarantee(ik->methods_annotations()->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
762 }
a61af66fc99e Initial load
duke
parents:
diff changeset
763 if (ik->methods_parameter_annotations() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
764 guarantee(ik->methods_parameter_annotations()->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
765 }
a61af66fc99e Initial load
duke
parents:
diff changeset
766 if (ik->methods_default_annotations() != NULL) {
a61af66fc99e Initial load
duke
parents:
diff changeset
767 guarantee(ik->methods_default_annotations()->is_objArray(), "should be obj array");
a61af66fc99e Initial load
duke
parents:
diff changeset
768 }
a61af66fc99e Initial load
duke
parents:
diff changeset
769 }
a61af66fc99e Initial load
duke
parents:
diff changeset
770 }
a61af66fc99e Initial load
duke
parents:
diff changeset
771
a61af66fc99e Initial load
duke
parents:
diff changeset
772
a61af66fc99e Initial load
duke
parents:
diff changeset
773 bool instanceKlassKlass::oop_partially_loaded(oop obj) const {
a61af66fc99e Initial load
duke
parents:
diff changeset
774 assert(obj->is_klass(), "object must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
775 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
776 assert(ik->oop_is_instance(), "object must be instanceKlass");
a61af66fc99e Initial load
duke
parents:
diff changeset
777 return ik->transitive_interfaces() == (objArrayOop) obj; // Check whether transitive_interfaces points to self
a61af66fc99e Initial load
duke
parents:
diff changeset
778 }
a61af66fc99e Initial load
duke
parents:
diff changeset
779
a61af66fc99e Initial load
duke
parents:
diff changeset
780
a61af66fc99e Initial load
duke
parents:
diff changeset
781 // The transitive_interfaces is the last field set when loading an object.
a61af66fc99e Initial load
duke
parents:
diff changeset
782 void instanceKlassKlass::oop_set_partially_loaded(oop obj) {
a61af66fc99e Initial load
duke
parents:
diff changeset
783 assert(obj->is_klass(), "object must be klass");
a61af66fc99e Initial load
duke
parents:
diff changeset
784 instanceKlass* ik = instanceKlass::cast(klassOop(obj));
a61af66fc99e Initial load
duke
parents:
diff changeset
785 // Set the layout helper to a place-holder value, until fuller initialization.
a61af66fc99e Initial load
duke
parents:
diff changeset
786 // (This allows asserts in oop_is_instance to succeed.)
a61af66fc99e Initial load
duke
parents:
diff changeset
787 ik->set_layout_helper(Klass::instance_layout_helper(0, true));
a61af66fc99e Initial load
duke
parents:
diff changeset
788 assert(ik->oop_is_instance(), "object must be instanceKlass");
a61af66fc99e Initial load
duke
parents:
diff changeset
789 assert(ik->transitive_interfaces() == NULL, "just checking");
a61af66fc99e Initial load
duke
parents:
diff changeset
790 ik->set_transitive_interfaces((objArrayOop) obj); // Temporarily set transitive_interfaces to point to self
a61af66fc99e Initial load
duke
parents:
diff changeset
791 }