1 /*
2 * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "code/codeCache.hpp"
27 #include "gc/shared/barrierSet.hpp"
28 #include "gc/shared/collectedHeap.inline.hpp"
29 #include "gc/shared/gcLocker.inline.hpp"
30 #include "interpreter/interpreter.hpp"
31 #include "logging/log.hpp"
32 #include "memory/metaspaceClosure.hpp"
33 #include "memory/metadataFactory.hpp"
34 #include "oops/access.hpp"
35 #include "oops/compressedOops.inline.hpp"
36 #include "oops/fieldStreams.inline.hpp"
37 #include "oops/flatArrayKlass.hpp"
38 #include "oops/inlineKlass.inline.hpp"
39 #include "oops/instanceKlass.inline.hpp"
40 #include "oops/method.hpp"
41 #include "oops/oop.inline.hpp"
42 #include "oops/objArrayKlass.hpp"
43 #include "runtime/fieldDescriptor.inline.hpp"
44 #include "runtime/handles.inline.hpp"
45 #include "runtime/safepointVerifiers.hpp"
46 #include "runtime/sharedRuntime.hpp"
47 #include "runtime/signature.hpp"
48 #include "runtime/thread.inline.hpp"
49 #include "utilities/copy.hpp"
50
51 // Constructor
52 InlineKlass::InlineKlass(const ClassFileParser& parser)
53 : InstanceKlass(parser, InstanceKlass::_kind_inline_type, InstanceKlass::ID) {
54 _adr_inlineklass_fixed_block = inlineklass_static_block();
55 // Addresses used for inline type calling convention
56 *((Array<SigEntry>**)adr_extended_sig()) = NULL;
57 *((Array<VMRegPair>**)adr_return_regs()) = NULL;
58 *((address*)adr_pack_handler()) = NULL;
59 *((address*)adr_pack_handler_jobject()) = NULL;
60 *((address*)adr_unpack_handler()) = NULL;
61 assert(pack_handler() == NULL, "pack handler not null");
62 *((int*)adr_default_value_offset()) = 0;
63 *((Klass**)adr_flat_array_klass()) = NULL;
64 set_prototype_header(markWord::always_locked_prototype());
65 assert(is_inline_type_klass(), "invariant");
66 }
67
68 oop InlineKlass::default_value() {
69 oop val = java_mirror()->obj_field_acquire(default_value_offset());
70 assert(oopDesc::is_oop(val), "Sanity check");
71 assert(val->is_inline_type(), "Sanity check");
72 assert(val->klass() == this, "sanity check");
73 return val;
74 }
75
76 int InlineKlass::first_field_offset_old() {
77 #ifdef ASSERT
78 int first_offset = INT_MAX;
79 for (AllFieldStream fs(this); !fs.done(); fs.next()) {
80 if (fs.offset() < first_offset) first_offset= fs.offset();
81 }
82 #endif
83 int base_offset = instanceOopDesc::base_offset_in_bytes();
84 // The first field of line types is aligned on a long boundary
85 base_offset = align_up(base_offset, BytesPerLong);
86 assert(base_offset == first_offset, "inconsistent offsets");
87 return base_offset;
88 }
89
90 int InlineKlass::raw_value_byte_size() {
91 int heapOopAlignedSize = nonstatic_field_size() << LogBytesPerHeapOop;
92 // If bigger than 64 bits or needs oop alignment, then use jlong aligned
93 // which for values should be jlong aligned, asserts in raw_field_copy otherwise
94 if (heapOopAlignedSize >= longSize || contains_oops()) {
95 return heapOopAlignedSize;
96 }
97 // Small primitives...
98 // If a few small basic type fields, return the actual size, i.e.
99 // 1 byte = 1
100 // 2 byte = 2
101 // 3 byte = 4, because pow2 needed for element stores
102 int first_offset = first_field_offset();
103 int last_offset = 0; // find the last offset, add basic type size
104 int last_tsz = 0;
105 for (AllFieldStream fs(this); !fs.done(); fs.next()) {
106 if (fs.access_flags().is_static()) {
107 continue;
108 } else if (fs.offset() > last_offset) {
109 BasicType type = Signature::basic_type(fs.signature());
110 if (is_java_primitive(type)) {
111 last_tsz = type2aelembytes(type);
112 } else if (type == T_INLINE_TYPE) {
113 // Not just primitives. Layout aligns embedded value, so use jlong aligned it is
114 return heapOopAlignedSize;
115 } else {
116 guarantee(0, "Unknown type %d", type);
117 }
118 assert(last_tsz != 0, "Invariant");
119 last_offset = fs.offset();
120 }
121 }
122 // Assumes VT with no fields are meaningless and illegal
123 last_offset += last_tsz;
124 assert(last_offset > first_offset && last_tsz, "Invariant");
125 return 1 << upper_log2(last_offset - first_offset);
126 }
127
128 instanceOop InlineKlass::allocate_instance(TRAPS) {
129 int size = size_helper(); // Query before forming handle.
130
131 instanceOop oop = (instanceOop)Universe::heap()->obj_allocate(this, size, CHECK_NULL);
132 assert(oop->mark().is_always_locked(), "Unlocked inline type");
133 return oop;
134 }
135
136 instanceOop InlineKlass::allocate_instance_buffer(TRAPS) {
137 int size = size_helper(); // Query before forming handle.
138
139 instanceOop oop = (instanceOop)Universe::heap()->obj_buffer_allocate(this, size, CHECK_NULL);
140 assert(oop->mark().is_always_locked(), "Unlocked inline type");
141 return oop;
142 }
143
144 int InlineKlass::nonstatic_oop_count() {
145 int oops = 0;
146 int map_count = nonstatic_oop_map_count();
147 OopMapBlock* block = start_of_nonstatic_oop_maps();
148 OopMapBlock* end = block + map_count;
149 while (block != end) {
150 oops += block->count();
151 block++;
152 }
153 return oops;
154 }
155
156 oop InlineKlass::read_inlined_field(oop obj, int offset, TRAPS) {
157 oop res = NULL;
158 this->initialize(CHECK_NULL); // will throw an exception if in error state
159 if (is_empty_inline_type()) {
160 res = (instanceOop)default_value();
161 } else {
162 Handle obj_h(THREAD, obj);
163 res = allocate_instance_buffer(CHECK_NULL);
164 inline_copy_payload_to_new_oop(((char*)(oopDesc*)obj_h()) + offset, res);
165 }
166 assert(res != NULL, "Must be set in one of two paths above");
167 return res;
168 }
169
170 void InlineKlass::write_inlined_field(oop obj, int offset, oop value, TRAPS) {
171 if (value == NULL) {
172 THROW(vmSymbols::java_lang_NullPointerException());
173 }
174 if (!is_empty_inline_type()) {
175 inline_copy_oop_to_payload(value, ((char*)(oopDesc*)obj) + offset);
176 }
177 }
178
179 // Arrays of...
180
181 bool InlineKlass::flatten_array() {
182 if (!UseFlatArray) {
183 return false;
184 }
185 // Too big
186 int elem_bytes = raw_value_byte_size();
187 if ((FlatArrayElementMaxSize >= 0) && (elem_bytes > FlatArrayElementMaxSize)) {
188 return false;
189 }
190 // Too many embedded oops
191 if ((FlatArrayElementMaxOops >= 0) && (nonstatic_oop_count() > FlatArrayElementMaxOops)) {
192 return false;
193 }
194 // Declared atomic but not naturally atomic.
195 if (is_declared_atomic() && !is_naturally_atomic()) {
196 return false;
197 }
198 // VM enforcing InlineArrayAtomicAccess only...
199 if (InlineArrayAtomicAccess && (!is_naturally_atomic())) {
200 return false;
201 }
202 return true;
203 }
204
205 void InlineKlass::remove_unshareable_info() {
206 InstanceKlass::remove_unshareable_info();
207
208 *((Array<SigEntry>**)adr_extended_sig()) = NULL;
209 *((Array<VMRegPair>**)adr_return_regs()) = NULL;
210 *((address*)adr_pack_handler()) = NULL;
211 *((address*)adr_pack_handler_jobject()) = NULL;
212 *((address*)adr_unpack_handler()) = NULL;
213 assert(pack_handler() == NULL, "pack handler not null");
214 *((Klass**)adr_flat_array_klass()) = NULL;
215 }
216
217 void InlineKlass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, PackageEntry* pkg_entry, TRAPS) {
218 InstanceKlass::restore_unshareable_info(loader_data, protection_domain, pkg_entry, CHECK);
219 }
220
221
222 Klass* InlineKlass::array_klass_impl(bool or_null, int n, TRAPS) {
223 if (flatten_array()) {
224 return flat_array_klass(or_null, n, THREAD);
225 } else {
226 return InstanceKlass::array_klass_impl(or_null, n, THREAD);
227 }
228 }
229
230 Klass* InlineKlass::array_klass_impl(bool or_null, TRAPS) {
231 return array_klass_impl(or_null, 1, THREAD);
232 }
233
234 Klass* InlineKlass::flat_array_klass(bool or_null, int rank, TRAPS) {
235 Klass* vak = acquire_flat_array_klass();
236 if (vak == NULL) {
237 if (or_null) return NULL;
238 ResourceMark rm;
239 {
240 // Atomic creation of array_klasses
241 MutexLocker ma(THREAD, MultiArray_lock);
242 if (get_flat_array_klass() == NULL) {
243 vak = allocate_flat_array_klass(CHECK_NULL);
244 Atomic::release_store((Klass**)adr_flat_array_klass(), vak);
245 }
246 }
247 }
248 if (or_null) {
249 return vak->array_klass_or_null(rank);
250 }
251 return vak->array_klass(rank, THREAD);
252 }
253
254 Klass* InlineKlass::allocate_flat_array_klass(TRAPS) {
255 if (flatten_array()) {
256 return FlatArrayKlass::allocate_klass(this, THREAD);
257 }
258 return ObjArrayKlass::allocate_objArray_klass(class_loader_data(), 1, this, THREAD);
259 }
260
261 void InlineKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) {
262 InstanceKlass::array_klasses_do(f, THREAD);
263 if (get_flat_array_klass() != NULL)
264 ArrayKlass::cast(get_flat_array_klass())->array_klasses_do(f, THREAD);
265 }
266
267 void InlineKlass::array_klasses_do(void f(Klass* k)) {
268 InstanceKlass::array_klasses_do(f);
269 if (get_flat_array_klass() != NULL)
270 ArrayKlass::cast(get_flat_array_klass())->array_klasses_do(f);
271 }
272
273 // Inline type arguments are not passed by reference, instead each
274 // field of the inline type is passed as an argument. This helper
275 // function collects the inlined field (recursively)
276 // in a list. Included with the field's type is
277 // the offset of each field in the inline type: i2c and c2i adapters
278 // need that to load or store fields. Finally, the list of fields is
279 // sorted in order of increasing offsets: the adapters and the
280 // compiled code need to agree upon the order of fields.
281 //
282 // The list of basic types that is returned starts with a T_INLINE_TYPE
283 // and ends with an extra T_VOID. T_INLINE_TYPE/T_VOID pairs are used as
284 // delimiters. Every entry between the two is a field of the inline
285 // type. If there's an embedded inline type in the list, it also starts
286 // with a T_INLINE_TYPE and ends with a T_VOID. This is so we can
287 // generate a unique fingerprint for the method's adapters and we can
288 // generate the list of basic types from the interpreter point of view
289 // (inline types passed as reference: iterate on the list until a
290 // T_INLINE_TYPE, drop everything until and including the closing
291 // T_VOID) or the compiler point of view (each field of the inline
292 // types is an argument: drop all T_INLINE_TYPE/T_VOID from the list).
293 int InlineKlass::collect_fields(GrowableArray<SigEntry>* sig, int base_off) {
294 int count = 0;
295 SigEntry::add_entry(sig, T_INLINE_TYPE, base_off);
296 for (AllFieldStream fs(this); !fs.done(); fs.next()) {
297 if (fs.access_flags().is_static()) continue;
298 int offset = base_off + fs.offset() - (base_off > 0 ? first_field_offset() : 0);
299 if (fs.is_inlined()) {
300 // Resolve klass of inlined field and recursively collect fields
301 Klass* vk = get_inline_type_field_klass(fs.index());
302 count += InlineKlass::cast(vk)->collect_fields(sig, offset);
303 } else {
304 BasicType bt = Signature::basic_type(fs.signature());
305 if (bt == T_INLINE_TYPE) {
306 bt = T_OBJECT;
307 }
308 SigEntry::add_entry(sig, bt, offset);
309 count += type2size[bt];
310 }
311 }
312 int offset = base_off + size_helper()*HeapWordSize - (base_off > 0 ? first_field_offset() : 0);
313 SigEntry::add_entry(sig, T_VOID, offset);
314 if (base_off == 0) {
315 sig->sort(SigEntry::compare);
316 }
317 assert(sig->at(0)._bt == T_INLINE_TYPE && sig->at(sig->length()-1)._bt == T_VOID, "broken structure");
318 return count;
319 }
320
321 void InlineKlass::initialize_calling_convention(TRAPS) {
322 // Because the pack and unpack handler addresses need to be loadable from generated code,
323 // they are stored at a fixed offset in the klass metadata. Since inline type klasses do
324 // not have a vtable, the vtable offset is used to store these addresses.
325 if (InlineTypeReturnedAsFields || InlineTypePassFieldsAsArgs) {
326 ResourceMark rm;
327 GrowableArray<SigEntry> sig_vk;
328 int nb_fields = collect_fields(&sig_vk);
329 Array<SigEntry>* extended_sig = MetadataFactory::new_array<SigEntry>(class_loader_data(), sig_vk.length(), CHECK);
330 *((Array<SigEntry>**)adr_extended_sig()) = extended_sig;
331 for (int i = 0; i < sig_vk.length(); i++) {
332 extended_sig->at_put(i, sig_vk.at(i));
333 }
334 if (can_be_returned_as_fields(/* init= */ true)) {
335 nb_fields++;
336 BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, nb_fields);
337 sig_bt[0] = T_METADATA;
338 SigEntry::fill_sig_bt(&sig_vk, sig_bt+1);
339 VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, nb_fields);
340 int total = SharedRuntime::java_return_convention(sig_bt, regs, nb_fields);
341
342 if (total > 0) {
343 Array<VMRegPair>* return_regs = MetadataFactory::new_array<VMRegPair>(class_loader_data(), nb_fields, CHECK);
344 *((Array<VMRegPair>**)adr_return_regs()) = return_regs;
345 for (int i = 0; i < nb_fields; i++) {
346 return_regs->at_put(i, regs[i]);
347 }
348
349 BufferedInlineTypeBlob* buffered_blob = SharedRuntime::generate_buffered_inline_type_adapter(this);
350 *((address*)adr_pack_handler()) = buffered_blob->pack_fields();
351 *((address*)adr_pack_handler_jobject()) = buffered_blob->pack_fields_jobject();
352 *((address*)adr_unpack_handler()) = buffered_blob->unpack_fields();
353 assert(CodeCache::find_blob(pack_handler()) == buffered_blob, "lost track of blob");
354 assert(can_be_returned_as_fields(), "sanity");
355 }
356 }
357 if (!can_be_returned_as_fields() && !can_be_passed_as_fields()) {
358 MetadataFactory::free_array<SigEntry>(class_loader_data(), extended_sig);
359 assert(return_regs() == NULL, "sanity");
360 }
361 }
362 }
363
364 void InlineKlass::deallocate_contents(ClassLoaderData* loader_data) {
365 if (extended_sig() != NULL) {
366 MetadataFactory::free_array<SigEntry>(loader_data, extended_sig());
367 }
368 if (return_regs() != NULL) {
369 MetadataFactory::free_array<VMRegPair>(loader_data, return_regs());
370 }
371 cleanup_blobs();
372 InstanceKlass::deallocate_contents(loader_data);
373 }
374
375 void InlineKlass::cleanup(InlineKlass* ik) {
376 ik->cleanup_blobs();
377 }
378
379 void InlineKlass::cleanup_blobs() {
380 if (pack_handler() != NULL) {
381 CodeBlob* buffered_blob = CodeCache::find_blob(pack_handler());
382 assert(buffered_blob->is_buffered_inline_type_blob(), "bad blob type");
383 BufferBlob::free((BufferBlob*)buffered_blob);
384 *((address*)adr_pack_handler()) = NULL;
385 *((address*)adr_pack_handler_jobject()) = NULL;
386 *((address*)adr_unpack_handler()) = NULL;
387 }
388 }
389
390 // Can this inline type be scalarized?
391 bool InlineKlass::is_scalarizable() const {
392 return ScalarizeInlineTypes;
393 }
394
395 // Can this inline type be passed as multiple values?
396 bool InlineKlass::can_be_passed_as_fields() const {
397 return InlineTypePassFieldsAsArgs && is_scalarizable() && !is_empty_inline_type();
398 }
399
400 // Can this inline type be returned as multiple values?
401 bool InlineKlass::can_be_returned_as_fields(bool init) const {
402 return InlineTypeReturnedAsFields && is_scalarizable() && !is_empty_inline_type() && (init || return_regs() != NULL);
403 }
404
405 // Create handles for all oop fields returned in registers that are going to be live across a safepoint
406 void InlineKlass::save_oop_fields(const RegisterMap& reg_map, GrowableArray<Handle>& handles) const {
407 Thread* thread = Thread::current();
408 const Array<SigEntry>* sig_vk = extended_sig();
409 const Array<VMRegPair>* regs = return_regs();
410 int j = 1;
411
412 for (int i = 0; i < sig_vk->length(); i++) {
413 BasicType bt = sig_vk->at(i)._bt;
414 if (bt == T_OBJECT || bt == T_ARRAY) {
415 VMRegPair pair = regs->at(j);
416 address loc = reg_map.location(pair.first());
417 oop v = *(oop*)loc;
418 assert(v == NULL || oopDesc::is_oop(v), "not an oop?");
419 assert(Universe::heap()->is_in_or_null(v), "must be heap pointer");
420 handles.push(Handle(thread, v));
421 }
422 if (bt == T_INLINE_TYPE) {
423 continue;
424 }
425 if (bt == T_VOID &&
426 sig_vk->at(i-1)._bt != T_LONG &&
427 sig_vk->at(i-1)._bt != T_DOUBLE) {
428 continue;
429 }
430 j++;
431 }
432 assert(j == regs->length(), "missed a field?");
433 }
434
435 // Update oop fields in registers from handles after a safepoint
436 void InlineKlass::restore_oop_results(RegisterMap& reg_map, GrowableArray<Handle>& handles) const {
437 assert(InlineTypeReturnedAsFields, "inconsistent");
438 const Array<SigEntry>* sig_vk = extended_sig();
439 const Array<VMRegPair>* regs = return_regs();
440 assert(regs != NULL, "inconsistent");
441
442 int j = 1;
443 for (int i = 0, k = 0; i < sig_vk->length(); i++) {
444 BasicType bt = sig_vk->at(i)._bt;
445 if (bt == T_OBJECT || bt == T_ARRAY) {
446 VMRegPair pair = regs->at(j);
447 address loc = reg_map.location(pair.first());
448 *(oop*)loc = handles.at(k++)();
449 }
450 if (bt == T_INLINE_TYPE) {
451 continue;
452 }
453 if (bt == T_VOID &&
454 sig_vk->at(i-1)._bt != T_LONG &&
455 sig_vk->at(i-1)._bt != T_DOUBLE) {
456 continue;
457 }
458 j++;
459 }
460 assert(j == regs->length(), "missed a field?");
461 }
462
463 // Fields are in registers. Create an instance of the inline type and
464 // initialize it with the values of the fields.
465 oop InlineKlass::realloc_result(const RegisterMap& reg_map, const GrowableArray<Handle>& handles, TRAPS) {
466 oop new_vt = allocate_instance(CHECK_NULL);
467 const Array<SigEntry>* sig_vk = extended_sig();
468 const Array<VMRegPair>* regs = return_regs();
469
470 int j = 1;
471 int k = 0;
472 for (int i = 0; i < sig_vk->length(); i++) {
473 BasicType bt = sig_vk->at(i)._bt;
474 if (bt == T_INLINE_TYPE) {
475 continue;
476 }
477 if (bt == T_VOID) {
478 if (sig_vk->at(i-1)._bt == T_LONG ||
479 sig_vk->at(i-1)._bt == T_DOUBLE) {
480 j++;
481 }
482 continue;
483 }
484 int off = sig_vk->at(i)._offset;
485 assert(off > 0, "offset in object should be positive");
486 VMRegPair pair = regs->at(j);
487 address loc = reg_map.location(pair.first());
488 switch(bt) {
489 case T_BOOLEAN: {
490 new_vt->bool_field_put(off, *(jboolean*)loc);
491 break;
492 }
493 case T_CHAR: {
494 new_vt->char_field_put(off, *(jchar*)loc);
495 break;
496 }
497 case T_BYTE: {
498 new_vt->byte_field_put(off, *(jbyte*)loc);
499 break;
500 }
501 case T_SHORT: {
502 new_vt->short_field_put(off, *(jshort*)loc);
503 break;
504 }
505 case T_INT: {
506 new_vt->int_field_put(off, *(jint*)loc);
507 break;
508 }
509 case T_LONG: {
510 #ifdef _LP64
511 new_vt->double_field_put(off, *(jdouble*)loc);
512 #else
513 Unimplemented();
514 #endif
515 break;
516 }
517 case T_OBJECT:
518 case T_ARRAY: {
519 Handle handle = handles.at(k++);
520 new_vt->obj_field_put(off, handle());
521 break;
522 }
523 case T_FLOAT: {
524 new_vt->float_field_put(off, *(jfloat*)loc);
525 break;
526 }
527 case T_DOUBLE: {
528 new_vt->double_field_put(off, *(jdouble*)loc);
529 break;
530 }
531 default:
532 ShouldNotReachHere();
533 }
534 *(intptr_t*)loc = 0xDEAD;
535 j++;
536 }
537 assert(j == regs->length(), "missed a field?");
538 assert(k == handles.length(), "missed an oop?");
539 return new_vt;
540 }
541
542 // Check the return register for an InlineKlass oop
543 InlineKlass* InlineKlass::returned_inline_klass(const RegisterMap& map) {
544 BasicType bt = T_METADATA;
545 VMRegPair pair;
546 int nb = SharedRuntime::java_return_convention(&bt, &pair, 1);
547 assert(nb == 1, "broken");
548
549 address loc = map.location(pair.first());
550 intptr_t ptr = *(intptr_t*)loc;
551 if (is_set_nth_bit(ptr, 0)) {
552 // Oop is tagged, must be an InlineKlass oop
553 clear_nth_bit(ptr, 0);
554 assert(Metaspace::contains((void*)ptr), "should be klass");
555 InlineKlass* vk = (InlineKlass*)ptr;
556 assert(vk->can_be_returned_as_fields(), "must be able to return as fields");
557 return vk;
558 }
559 #ifdef ASSERT
560 // Oop is not tagged, must be a valid oop
561 if (VerifyOops) {
562 oopDesc::verify(oop((HeapWord*)ptr));
563 }
564 #endif
565 return NULL;
566 }
567
568 void InlineKlass::verify_on(outputStream* st) {
569 InstanceKlass::verify_on(st);
570 guarantee(prototype_header().is_always_locked(), "Prototype header is not always locked");
571 }
572
573 void InlineKlass::oop_verify_on(oop obj, outputStream* st) {
574 InstanceKlass::oop_verify_on(obj, st);
575 guarantee(obj->mark().is_always_locked(), "Header is not always locked");
576 }
577
578 void InlineKlass::metaspace_pointers_do(MetaspaceClosure* it) {
579 InstanceKlass::metaspace_pointers_do(it);
580
581 InlineKlass* this_ptr = this;
582 it->push_internal_pointer(&this_ptr, (intptr_t*)&_adr_inlineklass_fixed_block);
583 }