1 /*
2 * Copyright (c) 2017, 2026, 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 "cds/archiveUtils.hpp"
26 #include "cds/cdsConfig.hpp"
27 #include "classfile/vmSymbols.hpp"
28 #include "code/codeCache.hpp"
29 #include "gc/shared/barrierSet.hpp"
30 #include "gc/shared/collectedHeap.inline.hpp"
31 #include "gc/shared/gcLocker.inline.hpp"
32 #include "interpreter/interpreter.hpp"
33 #include "logging/log.hpp"
34 #include "memory/metadataFactory.hpp"
35 #include "memory/metaspaceClosure.hpp"
36 #include "oops/access.hpp"
37 #include "oops/arrayKlass.hpp"
38 #include "oops/compressedOops.inline.hpp"
39 #include "oops/fieldStreams.inline.hpp"
40 #include "oops/flatArrayKlass.hpp"
41 #include "oops/inlineKlass.inline.hpp"
42 #include "oops/instanceKlass.inline.hpp"
43 #include "oops/layoutKind.hpp"
44 #include "oops/method.hpp"
45 #include "oops/objArrayKlass.hpp"
46 #include "oops/oop.inline.hpp"
47 #include "oops/oopsHierarchy.hpp"
48 #include "oops/refArrayKlass.hpp"
49 #include "runtime/fieldDescriptor.inline.hpp"
50 #include "runtime/handles.inline.hpp"
51 #include "runtime/interfaceSupport.inline.hpp"
52 #include "runtime/registerMap.hpp"
53 #include "runtime/safepointVerifiers.hpp"
54 #include "runtime/sharedRuntime.hpp"
55 #include "runtime/signature.hpp"
56 #include "runtime/thread.inline.hpp"
57 #include "utilities/copy.hpp"
58 #include "utilities/stringUtils.hpp"
59
60 InlineKlass::Members::Members()
61 : _extended_sig(nullptr),
62 _return_regs(nullptr),
63 _pack_handler(nullptr),
64 _pack_handler_jobject(nullptr),
65 _unpack_handler(nullptr),
66 _null_reset_value_offset(0),
67 _payload_offset(-1),
68 _payload_size_in_bytes(-1),
69 _payload_alignment(-1),
70 _null_free_non_atomic_size_in_bytes(-1),
71 _null_free_non_atomic_alignment(-1),
72 _null_free_atomic_size_in_bytes(-1),
73 _nullable_atomic_size_in_bytes(-1),
74 _nullable_non_atomic_size_in_bytes(-1),
75 _null_marker_offset(-1),
76 _fast_acmp_offset(-1),
77 _fast_acmp_mask(0) {
78 }
79
80 InlineKlass::InlineKlass() {
81 assert(CDSConfig::is_dumping_archive() || UseSharedSpaces, "only for CDS");
82 }
83
84 // Constructor
85 InlineKlass::InlineKlass(const ClassFileParser& parser)
86 : InstanceKlass(parser, InlineKlass::Kind, markWord::inline_type_prototype()) {
87 assert(is_inline_klass(), "sanity");
88 assert(prototype_header().is_inline_type(), "sanity");
89
90 // Set up the offset to the members of this klass
91 _adr_inline_klass_members = calculate_members_address();
92
93 // Placement install the members
94 new (_adr_inline_klass_members) Members();
95
96 // Sanity check construction of the members
97 assert(pack_handler() == nullptr, "pack handler not null");
98 }
99
100 address InlineKlass::calculate_members_address() const {
101 // The members are placed after all other contents inherited from the InstanceKlass
102 return end_of_instance_klass();
103 }
104
105 oop InlineKlass::null_reset_value() const {
106 assert(is_initialized() || is_being_initialized() || is_in_error_state(), "null reset value is set at the beginning of initialization");
107 oop val = java_mirror()->obj_field_acquire(null_reset_value_offset());
108 assert(val != nullptr, "Sanity check");
109 return val;
110 }
111
112 void InlineKlass::set_null_reset_value(oop val) {
113 assert(val != nullptr, "Sanity check");
114 assert(oopDesc::is_oop(val), "Sanity check");
115 assert(val->is_inline_type(), "Sanity check");
116 assert(val->klass() == this, "sanity check");
117 java_mirror()->obj_field_put(null_reset_value_offset(), val);
118 }
119
120 inlineOop InlineKlass::allocate_instance(TRAPS) {
121 inlineOop oop = (inlineOop)InstanceKlass::allocate_instance(CHECK_NULL);
122 assert(oop->mark().is_inline_type(), "Expected inline type");
123 return oop;
124 }
125
126 int InlineKlass::nonstatic_oop_count() {
127 int oops = 0;
128 int map_count = nonstatic_oop_map_count();
129 OopMapBlock* block = start_of_nonstatic_oop_maps();
130 OopMapBlock* end = block + map_count;
131 while (block != end) {
132 oops += block->count();
133 block++;
134 }
135 return oops;
136 }
137
138 // Arrays of...
139
140 bool InlineKlass::maybe_flat_in_array() {
141 if (!UseArrayFlattening) {
142 return false;
143 }
144 // Too many embedded oops
145 if ((FlatArrayElementMaxOops >= 0) && (nonstatic_oop_count() > FlatArrayElementMaxOops)) {
146 return false;
147 }
148 // No flat layout?
149 if (!has_nullable_atomic_layout() && !has_null_free_atomic_layout() && !has_null_free_non_atomic_layout()) {
150 return false;
151 }
152 return true;
153 }
154
155 bool InlineKlass::is_always_flat_in_array() {
156 if (!UseArrayFlattening) {
157 return false;
158 }
159 // Too many embedded oops
160 if ((FlatArrayElementMaxOops >= 0) && (nonstatic_oop_count() > FlatArrayElementMaxOops)) {
161 return false;
162 }
163
164 // An instance is always flat in an array if we have all layouts. Note that this could change in the future when the
165 // flattening policies are updated or if new APIs are added that allow the creation of reference arrays directly.
166 return has_nullable_atomic_layout() && has_null_free_atomic_layout() && has_null_free_non_atomic_layout();
167 }
168
169 // Inline type arguments are not passed by reference, instead each
170 // field of the inline type is passed as an argument. This helper
171 // function collects the flat field (recursively)
172 // in a list. Included with the field's type is
173 // the offset of each field in the inline type: i2c and c2i adapters
174 // need that to load or store fields. Finally, the list of fields is
175 // sorted in order of increasing offsets: the adapters and the
176 // compiled code need to agree upon the order of fields.
177 //
178 // The list of basic types that is returned starts with a T_METADATA
179 // and ends with an extra T_VOID. T_METADATA/T_VOID pairs are used as
180 // delimiters. Every entry between the two is a field of the inline
181 // type. If there's an embedded inline type in the list, it also starts
182 // with a T_METADATA and ends with a T_VOID. This is so we can
183 // generate a unique fingerprint for the method's adapters and we can
184 // generate the list of basic types from the interpreter point of view
185 // (inline types passed as reference: iterate on the list until a
186 // T_METADATA, drop everything until and including the closing
187 // T_VOID) or the compiler point of view (each field of the inline
188 // types is an argument: drop all T_METADATA/T_VOID from the list).
189 //
190 // Value classes could also have fields in abstract super value classes.
191 // Use a HierarchicalFieldStream to get them as well.
192 int InlineKlass::collect_fields(GrowableArray<SigEntry>* sig, int base_off, int null_marker_offset) {
193 int count = 0;
194 SigEntry::add_entry(sig, T_METADATA, name(), base_off);
195 for (TopDownHierarchicalNonStaticFieldStreamBase fs(this); !fs.done(); fs.next()) {
196 assert(!fs.access_flags().is_static(), "TopDownHierarchicalNonStaticFieldStreamBase should not let static fields pass.");
197 int offset = base_off + fs.offset() - (base_off > 0 ? payload_offset() : 0);
198 InstanceKlass* field_holder = fs.field_descriptor().field_holder();
199 if (fs.is_flat()) {
200 // Resolve klass of flat field and recursively collect fields
201 int field_null_marker_offset = -1;
202 if (!fs.is_null_free_inline_type()) {
203 field_null_marker_offset = base_off + fs.null_marker_offset() - (base_off > 0 ? payload_offset() : 0);
204 }
205 Klass* vk = field_holder->get_inline_type_field_klass(fs.index());
206 count += InlineKlass::cast(vk)->collect_fields(sig, offset, field_null_marker_offset);
207 } else {
208 BasicType bt = Signature::basic_type(fs.signature());
209 SigEntry::add_entry(sig, bt, fs.name(), offset);
210 count += type2size[bt];
211 }
212 }
213 int offset = base_off + size_helper()*HeapWordSize - (base_off > 0 ? payload_offset() : 0);
214 // Null markers are no real fields, add them manually at the end (C2 relies on this) of the flat fields
215 if (null_marker_offset != -1) {
216 SigEntry::add_null_marker(sig, name(), null_marker_offset);
217 count++;
218 }
219 SigEntry::add_entry(sig, T_VOID, name(), offset);
220 assert(sig->at(0)._bt == T_METADATA && sig->at(sig->length()-1)._bt == T_VOID, "broken structure");
221 return count;
222 }
223
224 // Support for the scalarized calling convention.
225 //
226 // For arguments, an inline type can be passed in scalarized form instead of as a single
227 // oop: the calling convention uses an optional buffer oop together with a null marker,
228 // followed by the field values, assigned to the normal argument registers and stack slots.
229 // See CompiledEntrySignature::compute_calling_conventions.
230 //
231 // For returns, an inline type is returned in scalarized form via multiple return registers:
232 // the first word is a tri-state value (null, tagged InlineKlass*, or oop) and the remaining
233 // registers carry the field values.
234 void InlineKlass::initialize_calling_convention(TRAPS) {
235 // Because the pack and unpack handler addresses need to be loadable from generated code,
236 // they are stored at a fixed offset in the klass metadata. Since inline type klasses do
237 // not have a vtable, the vtable offset is used to store these addresses.
238 if (InlineTypeReturnedAsFields || InlineTypePassFieldsAsArgs) {
239 ResourceMark rm;
240 GrowableArray<SigEntry> sig_vk;
241 int nb_fields = collect_fields(&sig_vk);
242 if (*PrintInlineKlassFields != '\0') {
243 const char* class_name_str = _name->as_C_string();
244 if (StringUtils::class_list_match(PrintInlineKlassFields, class_name_str)) {
245 ttyLocker ttyl;
246 tty->print_cr("Fields of InlineKlass: %s", class_name_str);
247 for (const SigEntry& entry : sig_vk) {
248 tty->print(" %s: %s+%d", entry._name->as_C_string(), type2name(entry._bt), entry._offset);
249 if (entry._null_marker) {
250 tty->print(" (null marker)");
251 }
252 if (entry._vt_oop) {
253 tty->print(" (VT OOP)");
254 }
255 tty->print_cr("");
256 }
257 }
258 }
259 Array<SigEntry>* extended_sig = MetadataFactory::new_array<SigEntry>(class_loader_data(), sig_vk.length(), CHECK);
260 set_extended_sig(extended_sig);
261 for (int i = 0; i < sig_vk.length(); i++) {
262 extended_sig->at_put(i, sig_vk.at(i));
263 }
264 if (can_be_returned_as_fields(/* init= */ true)) {
265 nb_fields++;
266 BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, nb_fields);
267 sig_bt[0] = T_METADATA;
268 SigEntry::fill_sig_bt(&sig_vk, sig_bt+1);
269 VMRegPair* regs = NEW_RESOURCE_ARRAY(VMRegPair, nb_fields);
270 int total = SharedRuntime::java_return_convention(sig_bt, regs, nb_fields);
271
272 if (total > 0) {
273 Array<VMRegPair>* return_regs = MetadataFactory::new_array<VMRegPair>(class_loader_data(), nb_fields, CHECK);
274 set_return_regs(return_regs);
275 for (int i = 0; i < nb_fields; i++) {
276 return_regs->at_put(i, regs[i]);
277 }
278
279 BufferedInlineTypeBlob* buffered_blob = SharedRuntime::generate_buffered_inline_type_adapter(this);
280 if (buffered_blob == nullptr) {
281 THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), "Out of space in CodeCache for adapters");
282 }
283 set_pack_handler(buffered_blob->pack_fields());
284 set_pack_handler_jobject(buffered_blob->pack_fields_jobject());
285 set_unpack_handler(buffered_blob->unpack_fields());
286 assert(CodeCache::find_blob(pack_handler()) == buffered_blob, "lost track of blob");
287 assert(can_be_returned_as_fields(), "sanity");
288 }
289 }
290 if (!can_be_returned_as_fields() && !can_be_passed_as_fields()) {
291 MetadataFactory::free_array<SigEntry>(class_loader_data(), extended_sig);
292 assert(return_regs() == nullptr, "sanity");
293 }
294 }
295 }
296
297 void InlineKlass::deallocate_contents(ClassLoaderData* loader_data) {
298 if (extended_sig() != nullptr) {
299 MetadataFactory::free_array<SigEntry>(loader_data, members()._extended_sig);
300 set_extended_sig(nullptr);
301 }
302 if (return_regs() != nullptr) {
303 MetadataFactory::free_array<VMRegPair>(loader_data, members()._return_regs);
304 set_return_regs(nullptr);
305 }
306 cleanup_blobs();
307 InstanceKlass::deallocate_contents(loader_data);
308 }
309
310 void InlineKlass::cleanup(InlineKlass* ik) {
311 ik->cleanup_blobs();
312 }
313
314 void InlineKlass::cleanup_blobs() {
315 if (pack_handler() != nullptr) {
316 CodeBlob* buffered_blob = CodeCache::find_blob(pack_handler());
317 assert(buffered_blob->is_buffered_inline_type_blob(), "bad blob type");
318 BufferBlob::free((BufferBlob*)buffered_blob);
319 set_pack_handler(nullptr);
320 set_pack_handler_jobject(nullptr);
321 set_unpack_handler(nullptr);
322 }
323 }
324
325 // Can this inline type be passed as multiple values?
326 bool InlineKlass::can_be_passed_as_fields() const {
327 return InlineTypePassFieldsAsArgs;
328 }
329
330 // Can this inline type be returned as multiple values?
331 bool InlineKlass::can_be_returned_as_fields(bool init) const {
332 return InlineTypeReturnedAsFields && (init || return_regs() != nullptr);
333 }
334
335 // Create handles for all oop fields returned in registers that are going to be live across a safepoint
336 void InlineKlass::save_oop_fields(const RegisterMap& reg_map, GrowableArray<Handle>& handles) const {
337 Thread* thread = Thread::current();
338 const Array<SigEntry>* sig_vk = extended_sig();
339 const Array<VMRegPair>* regs = return_regs();
340 int j = 1;
341
342 for (int i = 0; i < sig_vk->length(); i++) {
343 BasicType bt = sig_vk->at(i)._bt;
344 if (bt == T_OBJECT || bt == T_ARRAY) {
345 VMRegPair pair = regs->at(j);
346 oop* loc = (oop*)reg_map.location(pair.first(), nullptr);
347 guarantee(loc != nullptr, "bad register save location");
348 oop o = *loc;
349 assert(oopDesc::is_oop_or_null(o), "Bad oop value: " PTR_FORMAT, p2i(o));
350 handles.push(Handle(thread, o));
351 }
352 if (bt == T_METADATA) {
353 continue;
354 }
355 if (bt == T_VOID &&
356 sig_vk->at(i-1)._bt != T_LONG &&
357 sig_vk->at(i-1)._bt != T_DOUBLE) {
358 continue;
359 }
360 j++;
361 }
362 assert(j == regs->length(), "missed a field?");
363 }
364
365 // Update oop fields in registers from handles after a safepoint
366 void InlineKlass::restore_oop_results(RegisterMap& reg_map, GrowableArray<Handle>& handles) const {
367 assert(InlineTypeReturnedAsFields, "Inline types should never be returned as fields");
368 const Array<SigEntry>* sig_vk = extended_sig();
369 const Array<VMRegPair>* regs = return_regs();
370 assert(regs != nullptr, "inconsistent");
371
372 int j = 1;
373 int k = 0;
374 for (int i = 0; i < sig_vk->length(); i++) {
375 BasicType bt = sig_vk->at(i)._bt;
376 if (bt == T_OBJECT || bt == T_ARRAY) {
377 VMRegPair pair = regs->at(j);
378 oop* loc = (oop*)reg_map.location(pair.first(), nullptr);
379 guarantee(loc != nullptr, "bad register save location");
380 *loc = handles.at(k++)();
381 }
382 if (bt == T_METADATA) {
383 continue;
384 }
385 if (bt == T_VOID &&
386 sig_vk->at(i-1)._bt != T_LONG &&
387 sig_vk->at(i-1)._bt != T_DOUBLE) {
388 continue;
389 }
390 j++;
391 }
392 assert(k == handles.length(), "missed a handle?");
393 assert(j == regs->length(), "missed a field?");
394 }
395
396 // Fields are in registers. Create an instance of the inline type and
397 // initialize it with the values of the fields.
398 oop InlineKlass::realloc_result(const RegisterMap& reg_map, const GrowableArray<Handle>& handles, TRAPS) {
399 oop new_vt = allocate_instance(CHECK_NULL);
400 const Array<SigEntry>* sig_vk = extended_sig();
401 const Array<VMRegPair>* regs = return_regs();
402
403 int j = 1;
404 int k = 0;
405 for (int i = 0; i < sig_vk->length(); i++) {
406 BasicType bt = sig_vk->at(i)._bt;
407 if (bt == T_METADATA) {
408 continue;
409 }
410 if (bt == T_VOID) {
411 if (sig_vk->at(i-1)._bt == T_LONG ||
412 sig_vk->at(i-1)._bt == T_DOUBLE) {
413 j++;
414 }
415 continue;
416 }
417 int off = sig_vk->at(i)._offset;
418 assert(off > 0, "offset in object should be positive");
419 VMRegPair pair = regs->at(j);
420 address loc = reg_map.location(pair.first(), nullptr);
421 guarantee(loc != nullptr, "bad register save location");
422 switch(bt) {
423 case T_BOOLEAN: {
424 new_vt->bool_field_put(off, *(jboolean*)loc);
425 break;
426 }
427 case T_CHAR: {
428 new_vt->char_field_put(off, *(jchar*)loc);
429 break;
430 }
431 case T_BYTE: {
432 new_vt->byte_field_put(off, *(jbyte*)loc);
433 break;
434 }
435 case T_SHORT: {
436 new_vt->short_field_put(off, *(jshort*)loc);
437 break;
438 }
439 case T_INT: {
440 new_vt->int_field_put(off, *(jint*)loc);
441 break;
442 }
443 case T_LONG: {
444 new_vt->long_field_put(off, *(jlong*)loc);
445 break;
446 }
447 case T_OBJECT:
448 case T_ARRAY: {
449 Handle handle = handles.at(k++);
450 new_vt->obj_field_put(off, handle());
451 break;
452 }
453 case T_FLOAT: {
454 new_vt->float_field_put(off, *(jfloat*)loc);
455 break;
456 }
457 case T_DOUBLE: {
458 new_vt->double_field_put(off, *(jdouble*)loc);
459 break;
460 }
461 default:
462 ShouldNotReachHere();
463 }
464 *(intptr_t*)loc = 0xDEAD;
465 j++;
466 }
467 assert(j == regs->length(), "missed a field?");
468 assert(k == handles.length(), "missed an oop?");
469 return new_vt;
470 }
471
472 // Check if we return an inline type in scalarized form, i.e. check if either
473 // - The return value is a tagged InlineKlass pointer, or
474 // - The return value is an inline type oop that is also returned in scalarized form
475 InlineKlass* InlineKlass::returned_inline_klass(const RegisterMap& map, bool* return_oop, Method* method) {
476 BasicType bt = T_METADATA;
477 VMRegPair pair;
478 int nb = SharedRuntime::java_return_convention(&bt, &pair, 1);
479 assert(nb == 1, "broken");
480
481 intptr_t* loc = (intptr_t*)map.location(pair.first(), nullptr);
482 guarantee(loc != nullptr, "bad register save location");
483 intptr_t ptr = *loc;
484 if (is_set_nth_bit(ptr, 0)) {
485 // Return value is tagged, must be an InlineKlass pointer
486 clear_nth_bit(ptr, 0);
487 assert(Metaspace::contains((void*)ptr), "should be klass");
488 InlineKlass* vk = (InlineKlass*)ptr;
489 assert(vk->can_be_returned_as_fields(), "must be able to return as fields");
490 if (return_oop != nullptr) {
491 // Not returning an oop
492 *return_oop = false;
493 }
494 return vk;
495 }
496 // Return value is not tagged, must be a valid oop
497 oop o = cast_to_oop(ptr);
498 assert(oopDesc::is_oop_or_null(o), "Bad oop return: " PTR_FORMAT, ptr);
499 if (return_oop != nullptr && o != nullptr && o->is_inline_type()) {
500 // Check if inline type is also returned in scalarized form
501 InlineKlass* vk_val = InlineKlass::cast(o->klass());
502 InlineKlass* vk_sig = method->returns_inline_type();
503 if (vk_val->can_be_returned_as_fields() && vk_sig != nullptr) {
504 assert(vk_val == vk_sig, "Unexpected return value");
505 return vk_val;
506 }
507 }
508 return nullptr;
509 }
510
511 // CDS support
512 #if INCLUDE_CDS
513
514 void InlineKlass::remove_unshareable_info() {
515 InstanceKlass::remove_unshareable_info();
516
517 // update it to point to the "buffered" copy of this class.
518 _adr_inline_klass_members = calculate_members_address();
519 ArchivePtrMarker::mark_pointer(&_adr_inline_klass_members);
520
521 set_extended_sig(nullptr);
522 set_return_regs(nullptr);
523 set_pack_handler(nullptr);
524 set_pack_handler_jobject(nullptr);
525 set_unpack_handler(nullptr);
526
527 assert(pack_handler() == nullptr, "pack handler not null");
528 }
529
530 #endif // CDS
531
532 #define BULLET " - "
533
534 void InlineKlass::print_on(outputStream* st) const {
535 InstanceKlass::print_on(st);
536 members().print_on(st);
537 st->print_cr(BULLET"---- LayoutKinds:");
538 auto print_layout_kind = [&](LayoutKind lk) {
539 if (is_layout_supported(lk)) {
540 st->print_cr(BULLET"%s layout: %d/%d",
541 LayoutKindHelper::layout_kind_as_string(lk),
542 layout_size_in_bytes(lk), layout_alignment(lk));
543 } else {
544 st->print_cr(BULLET"%s layout: -/-",
545 LayoutKindHelper::layout_kind_as_string(lk));
546 }
547 };
548 print_layout_kind(LayoutKind::BUFFERED);
549 print_layout_kind(LayoutKind::NULL_FREE_NON_ATOMIC_FLAT);
550 print_layout_kind(LayoutKind::NULL_FREE_ATOMIC_FLAT);
551 print_layout_kind(LayoutKind::NULLABLE_ATOMIC_FLAT);
552 print_layout_kind(LayoutKind::NULLABLE_NON_ATOMIC_FLAT);
553 }
554
555 // Verification
556
557 void InlineKlass::verify_on(outputStream* st) {
558 InstanceKlass::verify_on(st);
559 guarantee(prototype_header().is_inline_type(), "Prototype header is not inline type");
560 }
561
562 void InlineKlass::oop_verify_on(oop obj, outputStream* st) {
563 InstanceKlass::oop_verify_on(obj, st);
564 guarantee(obj->mark().is_inline_type(), "Header is not inline type");
565 }
566
567 void InlineKlass::Members::print_on(outputStream* st) const {
568 st->print_cr(BULLET"---- inline type members:");
569 st->print(BULLET"extended signature registers: ");
570 InstanceKlass::print_array_on(st, _extended_sig, [](outputStream* ost, SigEntry pair){
571 pair.print_on(ost);
572 });
573 st->print(BULLET"return registers: ");
574 InstanceKlass::print_array_on(st, _return_regs, [](outputStream* ost, VMRegPair pair) {
575 pair.print_on(ost);
576 });
577 st->print_cr(BULLET"pack handler: " PTR_FORMAT, p2i(_pack_handler));
578 st->print_cr(BULLET"pack handler (jobject): " PTR_FORMAT, p2i(_pack_handler_jobject));
579 st->print_cr(BULLET"unpack handler: " PTR_FORMAT, p2i(_unpack_handler));
580 st->print_cr(BULLET"null reset offset: %d", _null_reset_value_offset);
581 st->print_cr(BULLET"payload offset: %d", _payload_offset);
582 st->print_cr(BULLET"payload size (bytes): %d", _payload_size_in_bytes);
583 st->print_cr(BULLET"payload alignment: %d", _payload_alignment);
584 st->print_cr(BULLET"null-free non-atomic size (bytes): %d", _null_free_non_atomic_size_in_bytes);
585 st->print_cr(BULLET"null-free non-atomic alignment: %d", _null_free_non_atomic_alignment);
586 st->print_cr(BULLET"null-free atomic size (bytes): %d", _null_free_atomic_size_in_bytes);
587 st->print_cr(BULLET"nullable atomic size (bytes): %d", _nullable_atomic_size_in_bytes);
588 st->print_cr(BULLET"nullable non-atomic size (bytes): %d", _nullable_non_atomic_size_in_bytes);
589 st->print_cr(BULLET"null marker offset: %d", _null_marker_offset);
590 st->print_cr(BULLET"fast acmp offset: %d", _fast_acmp_offset);
591 st->print_cr(BULLET"fast acmp mask: " INT64_FORMAT_X_0, _fast_acmp_mask);
592 }
593
594 #undef BULLET