1 /*
  2  * Copyright (c) 2011, 2022, 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 // no precompiled headers
 25 #include "ci/ciUtilities.hpp"
 26 #include "compiler/compiler_globals.hpp"
 27 #include "compiler/oopMap.hpp"
 28 #include "gc/shared/barrierSet.hpp"
 29 #include "gc/shared/cardTable.hpp"
 30 #include "gc/shared/collectedHeap.hpp"
 31 #include "gc/shared/gc_globals.hpp"
 32 #include "gc/shared/tlab_globals.hpp"
 33 #include "jvmci/jvmciEnv.hpp"
 34 #include "jvmci/jvmciCompilerToVM.hpp"
 35 #include "jvmci/vmStructs_jvmci.hpp"
 36 #include "memory/universe.hpp"
 37 #include "oops/compressedOops.hpp"
 38 #include "oops/klass.inline.hpp"
 39 #include "runtime/flags/jvmFlag.hpp"
 40 #include "runtime/sharedRuntime.hpp"
 41 #include "runtime/stubRoutines.hpp"
 42 #include "utilities/resourceHash.hpp"
 43 
 44 
 45 int CompilerToVM::Data::Klass_vtable_start_offset;
 46 int CompilerToVM::Data::Klass_vtable_length_offset;
 47 
 48 int CompilerToVM::Data::Method_extra_stack_entries;
 49 
 50 address CompilerToVM::Data::SharedRuntime_ic_miss_stub;
 51 address CompilerToVM::Data::SharedRuntime_handle_wrong_method_stub;
 52 address CompilerToVM::Data::SharedRuntime_deopt_blob_unpack;
 53 address CompilerToVM::Data::SharedRuntime_deopt_blob_unpack_with_exception_in_tls;
 54 address CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap;
 55 
 56 size_t CompilerToVM::Data::ThreadLocalAllocBuffer_alignment_reserve;
 57 
 58 CollectedHeap* CompilerToVM::Data::Universe_collectedHeap;
 59 int CompilerToVM::Data::Universe_base_vtable_size;
 60 address CompilerToVM::Data::Universe_narrow_oop_base;
 61 int CompilerToVM::Data::Universe_narrow_oop_shift;
 62 address CompilerToVM::Data::Universe_narrow_klass_base;
 63 int CompilerToVM::Data::Universe_narrow_klass_shift;
 64 void* CompilerToVM::Data::Universe_non_oop_bits;
 65 uintptr_t CompilerToVM::Data::Universe_verify_oop_mask;
 66 uintptr_t CompilerToVM::Data::Universe_verify_oop_bits;
 67 
 68 bool       CompilerToVM::Data::_supports_inline_contig_alloc;
 69 HeapWord** CompilerToVM::Data::_heap_end_addr;
 70 HeapWord* volatile* CompilerToVM::Data::_heap_top_addr;
 71 int CompilerToVM::Data::_max_oop_map_stack_offset;
 72 int CompilerToVM::Data::_fields_annotations_base_offset;
 73 
 74 CardTable::CardValue* CompilerToVM::Data::cardtable_start_address;
 75 int CompilerToVM::Data::cardtable_shift;
 76 
 77 int CompilerToVM::Data::vm_page_size;
 78 
 79 int CompilerToVM::Data::sizeof_vtableEntry = sizeof(vtableEntry);
 80 int CompilerToVM::Data::sizeof_ExceptionTableElement = sizeof(ExceptionTableElement);
 81 int CompilerToVM::Data::sizeof_LocalVariableTableElement = sizeof(LocalVariableTableElement);
 82 int CompilerToVM::Data::sizeof_ConstantPool = sizeof(ConstantPool);
 83 int CompilerToVM::Data::sizeof_narrowKlass = sizeof(narrowKlass);
 84 int CompilerToVM::Data::sizeof_arrayOopDesc = sizeof(arrayOopDesc);
 85 
 86 address CompilerToVM::Data::dsin;
 87 address CompilerToVM::Data::dcos;
 88 address CompilerToVM::Data::dtan;
 89 address CompilerToVM::Data::dexp;
 90 address CompilerToVM::Data::dlog;
 91 address CompilerToVM::Data::dlog10;
 92 address CompilerToVM::Data::dpow;
 93 
 94 address CompilerToVM::Data::symbol_init;
 95 address CompilerToVM::Data::symbol_clinit;
 96 
 97 int CompilerToVM::Data::data_section_item_alignment;
 98 
 99 void CompilerToVM::Data::initialize(JVMCI_TRAPS) {
100   Klass_vtable_start_offset = in_bytes(Klass::vtable_start_offset());
101   Klass_vtable_length_offset = in_bytes(Klass::vtable_length_offset());
102 
103   Method_extra_stack_entries = Method::extra_stack_entries();
104 
105   SharedRuntime_ic_miss_stub = SharedRuntime::get_ic_miss_stub();
106   SharedRuntime_handle_wrong_method_stub = SharedRuntime::get_handle_wrong_method_stub();
107   SharedRuntime_deopt_blob_unpack = SharedRuntime::deopt_blob()->unpack();
108   SharedRuntime_deopt_blob_unpack_with_exception_in_tls = SharedRuntime::deopt_blob()->unpack_with_exception_in_tls();
109   SharedRuntime_deopt_blob_uncommon_trap = SharedRuntime::deopt_blob()->uncommon_trap();
110 
111   ThreadLocalAllocBuffer_alignment_reserve = ThreadLocalAllocBuffer::alignment_reserve();
112 
113   Universe_collectedHeap = Universe::heap();
114   Universe_base_vtable_size = Universe::base_vtable_size();
115   Universe_narrow_oop_base = CompressedOops::base();
116   Universe_narrow_oop_shift = CompressedOops::shift();
117   Universe_narrow_klass_base = CompressedKlassPointers::base();
118   Universe_narrow_klass_shift = CompressedKlassPointers::shift();
119   Universe_non_oop_bits = Universe::non_oop_word();
120   Universe_verify_oop_mask = Universe::verify_oop_mask();
121   Universe_verify_oop_bits = Universe::verify_oop_bits();
122 
123   _supports_inline_contig_alloc = false;
124   _heap_end_addr = (HeapWord**) -1;
125   _heap_top_addr = (HeapWord* volatile*) -1;
126 
127   _max_oop_map_stack_offset = (OopMapValue::register_mask - VMRegImpl::stack2reg(0)->value()) * VMRegImpl::stack_slot_size;
128   int max_oop_map_stack_index = _max_oop_map_stack_offset / VMRegImpl::stack_slot_size;
129   assert(OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index)), "should be valid");
130   assert(!OopMapValue::legal_vm_reg_name(VMRegImpl::stack2reg(max_oop_map_stack_index + 1)), "should be invalid");
131 
132   symbol_init = (address) vmSymbols::object_initializer_name();
133   symbol_clinit = (address) vmSymbols::class_initializer_name();
134 
135   _fields_annotations_base_offset = Array<AnnotationArray*>::base_offset_in_bytes();
136 
137   data_section_item_alignment = relocInfo::addr_unit();
138 
139   BarrierSet* bs = BarrierSet::barrier_set();
140   if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
141     CardTable::CardValue* base = ci_card_table_address();
142     assert(base != NULL, "unexpected byte_map_base");
143     cardtable_start_address = base;
144     cardtable_shift = CardTable::card_shift();
145   } else {
146     // No card mark barriers
147     cardtable_start_address = 0;
148     cardtable_shift = 0;
149   }
150 
151   vm_page_size = os::vm_page_size();
152 
153 #define SET_TRIGFUNC(name)                                      \
154   if (StubRoutines::name() != NULL) {                           \
155     name = StubRoutines::name();                                \
156   } else {                                                      \
157     name = CAST_FROM_FN_PTR(address, SharedRuntime::name);      \
158   }
159 
160   SET_TRIGFUNC(dsin);
161   SET_TRIGFUNC(dcos);
162   SET_TRIGFUNC(dtan);
163   SET_TRIGFUNC(dexp);
164   SET_TRIGFUNC(dlog10);
165   SET_TRIGFUNC(dlog);
166   SET_TRIGFUNC(dpow);
167 
168 #undef SET_TRIGFUNC
169 }
170 
171 JVMCIObjectArray CompilerToVM::initialize_intrinsics(JVMCI_TRAPS) {
172   int len = vmIntrinsics::number_of_intrinsics() - 1; // Exclude vmIntrinsics::_none, which is 0
173   JVMCIObjectArray vmIntrinsics = JVMCIENV->new_VMIntrinsicMethod_array(len, JVMCI_CHECK_NULL);
174   int index = 0;
175   vmSymbolID kls_sid = vmSymbolID::NO_SID;
176   JVMCIObject kls_str;
177 #define VM_SYMBOL_TO_STRING(s) \
178   JVMCIENV->create_string(vmSymbols::symbol_at(VM_SYMBOL_ENUM_NAME(s)), JVMCI_CHECK_NULL)
179 #define VM_INTRINSIC_INFO(id, kls, name, sig, ignore_fcode) {            \
180     vmSymbolID sid = VM_SYMBOL_ENUM_NAME(kls);                           \
181     if (kls_sid != sid) {                                                \
182       kls_str = VM_SYMBOL_TO_STRING(kls);                                \
183       kls_sid = sid;                                                     \
184     }                                                                    \
185     JVMCIObject name_str = VM_SYMBOL_TO_STRING(name);                    \
186     JVMCIObject sig_str = VM_SYMBOL_TO_STRING(sig);                      \
187     JVMCIObject vmIntrinsicMethod = JVMCIENV->new_VMIntrinsicMethod(kls_str, name_str, sig_str, (jint) vmIntrinsics::id, JVMCI_CHECK_NULL); \
188     JVMCIENV->put_object_at(vmIntrinsics, index++, vmIntrinsicMethod);   \
189   }
190 
191   // VM_INTRINSICS_DO does *not* iterate over vmIntrinsics::_none
192   VM_INTRINSICS_DO(VM_INTRINSIC_INFO, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_SYMBOL_IGNORE, VM_ALIAS_IGNORE)
193 #undef VM_SYMBOL_TO_STRING
194 #undef VM_INTRINSIC_INFO
195 
196   assert(index == len, "must be");
197   return vmIntrinsics;
198 }
199 
200 #define PREDEFINED_CONFIG_FLAGS(do_bool_flag, do_int_flag, do_intx_flag, do_uintx_flag) \
201   do_intx_flag(AllocateInstancePrefetchLines)                              \
202   do_intx_flag(AllocatePrefetchDistance)                                   \
203   do_intx_flag(AllocatePrefetchInstr)                                      \
204   do_intx_flag(AllocatePrefetchLines)                                      \
205   do_intx_flag(AllocatePrefetchStepSize)                                   \
206   do_intx_flag(AllocatePrefetchStyle)                                      \
207   do_intx_flag(BciProfileWidth)                                            \
208   do_bool_flag(BootstrapJVMCI)                                             \
209   do_bool_flag(CITime)                                                     \
210   do_bool_flag(CITimeEach)                                                 \
211   do_uintx_flag(CodeCacheSegmentSize)                                      \
212   do_intx_flag(CodeEntryAlignment)                                         \
213   do_intx_flag(ContendedPaddingWidth)                                      \
214   do_bool_flag(DontCompileHugeMethods)                                     \
215   do_bool_flag(EagerJVMCI)                                                 \
216   do_bool_flag(EnableContended)                                            \
217   do_bool_flag(FoldStableValues)                                           \
218   do_bool_flag(ForceUnreachable)                                           \
219   do_intx_flag(HugeMethodLimit)                                            \
220   do_bool_flag(Inline)                                                     \
221   do_intx_flag(JVMCICounterSize)                                           \
222   do_bool_flag(JVMCIPrintProperties)                                       \
223   do_bool_flag(JVMCIUseFastLocking)                                        \
224   do_int_flag(ObjectAlignmentInBytes)                                      \
225   do_bool_flag(PrintInlining)                                              \
226   do_bool_flag(ReduceInitialCardMarks)                                     \
227   do_bool_flag(RestrictContended)                                          \
228   do_intx_flag(StackReservedPages)                                         \
229   do_intx_flag(StackShadowPages)                                           \
230   do_bool_flag(TLABStats)                                                  \
231   do_uintx_flag(TLABWasteIncrement)                                        \
232   do_intx_flag(TypeProfileWidth)                                           \
233   do_bool_flag(UseAESIntrinsics)                                           \
234   X86_ONLY(do_intx_flag(UseAVX))                                           \
235   do_bool_flag(UseCRC32Intrinsics)                                         \
236   do_bool_flag(UseAdler32Intrinsics)                                       \
237   do_bool_flag(UseCompressedClassPointers)                                 \
238   do_bool_flag(UseCompressedOops)                                          \
239   X86_ONLY(do_bool_flag(UseCountLeadingZerosInstruction))                  \
240   X86_ONLY(do_bool_flag(UseCountTrailingZerosInstruction))                 \
241   do_bool_flag(UseG1GC)                                                    \
242   do_bool_flag(UseParallelGC)                                              \
243   do_bool_flag(UseSerialGC)                                                \
244   do_bool_flag(UseZGC)                                                     \
245   do_bool_flag(UseEpsilonGC)                                               \
246   COMPILER2_PRESENT(do_bool_flag(UseMontgomeryMultiplyIntrinsic))          \
247   COMPILER2_PRESENT(do_bool_flag(UseMontgomerySquareIntrinsic))            \
248   COMPILER2_PRESENT(do_bool_flag(UseMulAddIntrinsic))                      \
249   COMPILER2_PRESENT(do_bool_flag(UseMultiplyToLenIntrinsic))               \
250   do_bool_flag(UsePopCountInstruction)                                     \
251   do_bool_flag(UseSHA1Intrinsics)                                          \
252   do_bool_flag(UseSHA256Intrinsics)                                        \
253   do_bool_flag(UseSHA512Intrinsics)                                        \
254   X86_ONLY(do_intx_flag(UseSSE))                                           \
255   COMPILER2_PRESENT(do_bool_flag(UseSquareToLenIntrinsic))                 \
256   do_bool_flag(UseTLAB)                                                    \
257   do_bool_flag(VerifyOops)                                                 \
258 
259 #define BOXED_BOOLEAN(name, value) name = ((jboolean)(value) ? boxedTrue : boxedFalse)
260 #define BOXED_DOUBLE(name, value) do { jvalue p; p.d = (jdouble) (value); name = JVMCIENV->create_box(T_DOUBLE, &p, JVMCI_CHECK_NULL);} while(0)
261 #define BOXED_LONG(name, value) \
262   do { \
263     jvalue p; p.j = (jlong) (value); \
264     JVMCIObject* e = longs.get(p.j); \
265     if (e == NULL) { \
266       JVMCIObject h = JVMCIENV->create_box(T_LONG, &p, JVMCI_CHECK_NULL); \
267       longs.put(p.j, h); \
268       name = h; \
269     } else { \
270       name = (*e); \
271     } \
272   } while (0)
273 
274 #define CSTRING_TO_JSTRING(name, value) \
275   JVMCIObject name; \
276   do { \
277     if (value != NULL) { \
278       JVMCIObject* e = strings.get(value); \
279       if (e == NULL) { \
280         JVMCIObject h = JVMCIENV->create_string(value, JVMCI_CHECK_NULL); \
281         strings.put(value, h); \
282         name = h; \
283       } else { \
284         name = (*e); \
285       } \
286     } \
287   } while (0)
288 
289 jobjectArray readConfiguration0(JNIEnv *env, JVMCI_TRAPS) {
290   JavaThread* THREAD = JavaThread::current(); // For exception macros.
291   ResourceHashtable<jlong, JVMCIObject> longs;
292   ResourceHashtable<const char*, JVMCIObject,
293                     256, ResourceObj::RESOURCE_AREA, mtInternal,
294                     &CompilerToVM::cstring_hash, &CompilerToVM::cstring_equals> strings;
295 
296   jvalue prim;
297   prim.z = true;  JVMCIObject boxedTrue =  JVMCIENV->create_box(T_BOOLEAN, &prim, JVMCI_CHECK_NULL);
298   prim.z = false; JVMCIObject boxedFalse = JVMCIENV->create_box(T_BOOLEAN, &prim, JVMCI_CHECK_NULL);
299 
300   CompilerToVM::Data::initialize(JVMCI_CHECK_NULL);
301 
302   JVMCIENV->VMField_initialize(JVMCI_CHECK_NULL);
303   JVMCIENV->VMFlag_initialize(JVMCI_CHECK_NULL);
304   JVMCIENV->VMIntrinsicMethod_initialize(JVMCI_CHECK_NULL);
305 
306   int len = JVMCIVMStructs::localHotSpotVMStructs_count();
307   JVMCIObjectArray vmFields = JVMCIENV->new_VMField_array(len, JVMCI_CHECK_NULL);
308   for (int i = 0; i < len ; i++) {
309     VMStructEntry vmField = JVMCIVMStructs::localHotSpotVMStructs[i];
310     size_t name_buf_len = strlen(vmField.typeName) + strlen(vmField.fieldName) + 2 /* "::" */;
311     char* name_buf = NEW_RESOURCE_ARRAY_IN_THREAD(THREAD, char, name_buf_len + 1);
312     sprintf(name_buf, "%s::%s", vmField.typeName, vmField.fieldName);
313     CSTRING_TO_JSTRING(name, name_buf);
314     CSTRING_TO_JSTRING(type, vmField.typeString);
315     JVMCIObject box;
316     if (vmField.isStatic && vmField.typeString != NULL) {
317       if (strcmp(vmField.typeString, "bool") == 0) {
318         BOXED_BOOLEAN(box, *(jbyte*) vmField.address);
319         assert(box.is_non_null(), "must have a box");
320       } else if (strcmp(vmField.typeString, "int") == 0 ||
321                  strcmp(vmField.typeString, "jint") == 0 ||
322                  strcmp(vmField.typeString, "uint32_t") == 0) {
323         BOXED_LONG(box, *(jint*) vmField.address);
324         assert(box.is_non_null(), "must have a box");
325       } else if (strcmp(vmField.typeString, "uint64_t") == 0) {
326         BOXED_LONG(box, *(uint64_t*) vmField.address);
327         assert(box.is_non_null(), "must have a box");
328       } else if (strcmp(vmField.typeString, "address") == 0 ||
329                  strcmp(vmField.typeString, "intptr_t") == 0 ||
330                  strcmp(vmField.typeString, "uintptr_t") == 0 ||
331                  strcmp(vmField.typeString, "OopHandle") == 0 ||
332                  strcmp(vmField.typeString, "size_t") == 0 ||
333                  // All foo* types are addresses.
334                  vmField.typeString[strlen(vmField.typeString) - 1] == '*') {
335         BOXED_LONG(box, *((address*) vmField.address));
336         assert(box.is_non_null(), "must have a box");
337       } else {
338         JVMCI_ERROR_NULL("VM field %s has unsupported type %s", name_buf, vmField.typeString);
339       }
340     }
341     JVMCIObject vmFieldObj = JVMCIENV->new_VMField(name, type, vmField.offset, (jlong) vmField.address, box, JVMCI_CHECK_NULL);
342     JVMCIENV->put_object_at(vmFields, i, vmFieldObj);
343   }
344 
345   int ints_len = JVMCIVMStructs::localHotSpotVMIntConstants_count();
346   int longs_len = JVMCIVMStructs::localHotSpotVMLongConstants_count();
347   len = ints_len + longs_len;
348   JVMCIObjectArray vmConstants = JVMCIENV->new_Object_array(len * 2, JVMCI_CHECK_NULL);
349   int insert = 0;
350   for (int i = 0; i < ints_len ; i++) {
351     VMIntConstantEntry c = JVMCIVMStructs::localHotSpotVMIntConstants[i];
352     CSTRING_TO_JSTRING(name, c.name);
353     JVMCIObject value;
354     BOXED_LONG(value, c.value);
355     JVMCIENV->put_object_at(vmConstants, insert++, name);
356     JVMCIENV->put_object_at(vmConstants, insert++, value);
357   }
358   for (int i = 0; i < longs_len ; i++) {
359     VMLongConstantEntry c = JVMCIVMStructs::localHotSpotVMLongConstants[i];
360     CSTRING_TO_JSTRING(name, c.name);
361     JVMCIObject value;
362     BOXED_LONG(value, c.value);
363     JVMCIENV->put_object_at(vmConstants, insert++, name);
364     JVMCIENV->put_object_at(vmConstants, insert++, value);
365   }
366   assert(insert == len * 2, "must be");
367 
368   len = JVMCIVMStructs::localHotSpotVMAddresses_count();
369   JVMCIObjectArray vmAddresses = JVMCIENV->new_Object_array(len * 2, JVMCI_CHECK_NULL);
370   for (int i = 0; i < len ; i++) {
371     VMAddressEntry a = JVMCIVMStructs::localHotSpotVMAddresses[i];
372     CSTRING_TO_JSTRING(name, a.name);
373     JVMCIObject value;
374     BOXED_LONG(value, a.value);
375     JVMCIENV->put_object_at(vmAddresses, i * 2, name);
376     JVMCIENV->put_object_at(vmAddresses, i * 2 + 1, value);
377   }
378 
379 #define COUNT_FLAG(ignore) +1
380 #ifdef ASSERT
381 #define CHECK_FLAG(type, name) { \
382   const JVMFlag* flag = JVMFlag::find_declared_flag(#name); \
383   assert(flag != NULL, "No such flag named " #name); \
384   assert(flag->is_##type(), "JVMFlag " #name " is not of type " #type); \
385 }
386 #else
387 #define CHECK_FLAG(type, name)
388 #endif
389 
390 #define ADD_FLAG(type, name, convert) {                                                \
391   CHECK_FLAG(type, name)                                                               \
392   CSTRING_TO_JSTRING(fname, #name);                                                    \
393   CSTRING_TO_JSTRING(ftype, #type);                                                    \
394   convert(value, name);                                                                \
395   JVMCIObject vmFlagObj = JVMCIENV->new_VMFlag(fname, ftype, value, JVMCI_CHECK_NULL); \
396   JVMCIENV->put_object_at(vmFlags, i++, vmFlagObj);                                    \
397 }
398 #define ADD_BOOL_FLAG(name)  ADD_FLAG(bool, name, BOXED_BOOLEAN)
399 #define ADD_INT_FLAG(name)   ADD_FLAG(int, name, BOXED_LONG)
400 #define ADD_INTX_FLAG(name)  ADD_FLAG(intx, name, BOXED_LONG)
401 #define ADD_UINTX_FLAG(name) ADD_FLAG(uintx, name, BOXED_LONG)
402 
403   len = 0 + PREDEFINED_CONFIG_FLAGS(COUNT_FLAG, COUNT_FLAG, COUNT_FLAG, COUNT_FLAG);
404   JVMCIObjectArray vmFlags = JVMCIENV->new_VMFlag_array(len, JVMCI_CHECK_NULL);
405   int i = 0;
406   JVMCIObject value;
407   PREDEFINED_CONFIG_FLAGS(ADD_BOOL_FLAG, ADD_INT_FLAG, ADD_INTX_FLAG, ADD_UINTX_FLAG)
408 
409   JVMCIObjectArray vmIntrinsics = CompilerToVM::initialize_intrinsics(JVMCI_CHECK_NULL);
410 
411   JVMCIObjectArray data = JVMCIENV->new_Object_array(5, JVMCI_CHECK_NULL);
412   JVMCIENV->put_object_at(data, 0, vmFields);
413   JVMCIENV->put_object_at(data, 1, vmConstants);
414   JVMCIENV->put_object_at(data, 2, vmAddresses);
415   JVMCIENV->put_object_at(data, 3, vmFlags);
416   JVMCIENV->put_object_at(data, 4, vmIntrinsics);
417 
418   return JVMCIENV->get_jobjectArray(data);
419 }