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