< prev index next >

src/hotspot/share/code/aotCodeCache.cpp

Print this page

1241     assert(type##_length <= type##_max, "increase size"); \
1242   }
1243 
1244 static bool initializing_extrs = false;
1245 
1246 void AOTCodeAddressTable::init_extrs() {
1247   if (_extrs_complete || initializing_extrs) return; // Done already
1248 
1249   assert(_blobs_end <= _all_max, "AOTCodeAddress table ranges need adjusting");
1250 
1251   initializing_extrs = true;
1252   _extrs_addr = NEW_C_HEAP_ARRAY(address, _extrs_max, mtCode);
1253 
1254   _extrs_length = 0;
1255 
1256   // Record addresses of VM runtime methods
1257   SET_ADDRESS(_extrs, SharedRuntime::fixup_callers_callsite);
1258   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method);
1259   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_abstract);
1260   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_ic_miss);

1261 #if defined(AARCH64) && !defined(ZERO)
1262   SET_ADDRESS(_extrs, JavaThread::aarch64_get_thread_helper);
1263 #endif
1264   {
1265     // Required by Shared blobs
1266     SET_ADDRESS(_extrs, Deoptimization::fetch_unroll_info);
1267     SET_ADDRESS(_extrs, Deoptimization::unpack_frames);
1268     SET_ADDRESS(_extrs, SafepointSynchronize::handle_polling_page_exception);
1269     SET_ADDRESS(_extrs, SharedRuntime::resolve_opt_virtual_call_C);
1270     SET_ADDRESS(_extrs, SharedRuntime::resolve_virtual_call_C);
1271     SET_ADDRESS(_extrs, SharedRuntime::resolve_static_call_C);
1272     SET_ADDRESS(_extrs, SharedRuntime::throw_delayed_StackOverflowError);
1273     SET_ADDRESS(_extrs, SharedRuntime::throw_AbstractMethodError);
1274     SET_ADDRESS(_extrs, SharedRuntime::throw_IncompatibleClassChangeError);
1275     SET_ADDRESS(_extrs, SharedRuntime::throw_NullPointerException_at_call);
1276   }
1277 
1278 #ifdef COMPILER1
1279   {
1280     // Required by C1 blobs

1289     SET_ADDRESS(_extrs, Runtime1::new_type_array);
1290     SET_ADDRESS(_extrs, Runtime1::new_object_array);
1291     SET_ADDRESS(_extrs, Runtime1::new_multi_array);
1292     SET_ADDRESS(_extrs, Runtime1::throw_range_check_exception);
1293     SET_ADDRESS(_extrs, Runtime1::throw_index_exception);
1294     SET_ADDRESS(_extrs, Runtime1::throw_div0_exception);
1295     SET_ADDRESS(_extrs, Runtime1::throw_null_pointer_exception);
1296     SET_ADDRESS(_extrs, Runtime1::throw_array_store_exception);
1297     SET_ADDRESS(_extrs, Runtime1::throw_class_cast_exception);
1298     SET_ADDRESS(_extrs, Runtime1::throw_incompatible_class_change_error);
1299     SET_ADDRESS(_extrs, Runtime1::is_instance_of);
1300     SET_ADDRESS(_extrs, Runtime1::monitorenter);
1301     SET_ADDRESS(_extrs, Runtime1::monitorexit);
1302     SET_ADDRESS(_extrs, Runtime1::deoptimize);
1303     SET_ADDRESS(_extrs, Runtime1::access_field_patching);
1304     SET_ADDRESS(_extrs, Runtime1::move_klass_patching);
1305     SET_ADDRESS(_extrs, Runtime1::move_mirror_patching);
1306     SET_ADDRESS(_extrs, Runtime1::move_appendix_patching);
1307     SET_ADDRESS(_extrs, Runtime1::predicate_failed_trap);
1308     SET_ADDRESS(_extrs, Runtime1::unimplemented_entry);








1309     SET_ADDRESS(_extrs, Thread::current);
1310     SET_ADDRESS(_extrs, CompressedKlassPointers::base_addr());
1311 #ifndef PRODUCT
1312     SET_ADDRESS(_extrs, os::breakpoint);
1313 #endif
1314   }
1315 #endif
1316 
1317 #ifdef COMPILER2
1318   {
1319     // Required by C2 blobs
1320     SET_ADDRESS(_extrs, Deoptimization::uncommon_trap);
1321     SET_ADDRESS(_extrs, OptoRuntime::handle_exception_C);
1322     SET_ADDRESS(_extrs, OptoRuntime::new_instance_C);
1323     SET_ADDRESS(_extrs, OptoRuntime::new_array_C);
1324     SET_ADDRESS(_extrs, OptoRuntime::new_array_nozero_C);
1325     SET_ADDRESS(_extrs, OptoRuntime::multianewarray2_C);
1326     SET_ADDRESS(_extrs, OptoRuntime::multianewarray3_C);
1327     SET_ADDRESS(_extrs, OptoRuntime::multianewarray4_C);
1328     SET_ADDRESS(_extrs, OptoRuntime::multianewarray5_C);
1329     SET_ADDRESS(_extrs, OptoRuntime::multianewarrayN_C);
1330 #if INCLUDE_JVMTI
1331     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_start);
1332     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_end);
1333     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_mount);
1334     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_unmount);
1335 #endif
1336     SET_ADDRESS(_extrs, OptoRuntime::complete_monitor_locking_C);
1337     SET_ADDRESS(_extrs, OptoRuntime::monitor_notify_C);
1338     SET_ADDRESS(_extrs, OptoRuntime::monitor_notifyAll_C);
1339     SET_ADDRESS(_extrs, OptoRuntime::rethrow_C);
1340     SET_ADDRESS(_extrs, OptoRuntime::slow_arraycopy_C);
1341     SET_ADDRESS(_extrs, OptoRuntime::register_finalizer_C);


1342 #if defined(AARCH64)
1343     SET_ADDRESS(_extrs, JavaThread::verify_cross_modify_fence_failure);
1344 #endif // AARCH64
1345   }
1346 #endif // COMPILER2
1347 
1348 #if INCLUDE_G1GC
1349   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_post_entry);
1350   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_pre_entry);
1351 #endif
1352 #if INCLUDE_SHENANDOAHGC
1353   SET_ADDRESS(_extrs, ShenandoahRuntime::write_ref_field_pre);
1354   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom);
1355   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom_narrow);
1356 #endif
1357 #if INCLUDE_ZGC
1358   SET_ADDRESS(_extrs, ZBarrierSetRuntime::load_barrier_on_phantom_oop_field_preloaded_addr());
1359 #if defined(AMD64)
1360   SET_ADDRESS(_extrs, &ZPointerLoadShift);
1361 #endif
1362 #endif
1363 #ifndef ZERO
1364 #if defined(AMD64) || defined(AARCH64) || defined(RISCV64)
1365   SET_ADDRESS(_extrs, MacroAssembler::debug64);
1366 #endif
1367 #endif // ZERO
1368 




1369   _extrs_complete = true;
1370   log_debug(aot, codecache, init)("External addresses recorded");
1371 }
1372 
1373 static bool initializing_early_stubs = false;
1374 
1375 void AOTCodeAddressTable::init_early_stubs() {
1376   if (_complete || initializing_early_stubs) return; // Done already
1377   initializing_early_stubs = true;
1378   _stubs_addr = NEW_C_HEAP_ARRAY(address, _stubs_max, mtCode);
1379   _stubs_length = 0;
1380   SET_ADDRESS(_stubs, StubRoutines::forward_exception_entry());
1381 
1382   {
1383     // Required by C1 blobs
1384 #if defined(AMD64) && !defined(ZERO)
1385     SET_ADDRESS(_stubs, StubRoutines::x86::double_sign_flip());
1386     SET_ADDRESS(_stubs, StubRoutines::x86::d2l_fixup());
1387 #endif // AMD64
1388   }

1241     assert(type##_length <= type##_max, "increase size"); \
1242   }
1243 
1244 static bool initializing_extrs = false;
1245 
1246 void AOTCodeAddressTable::init_extrs() {
1247   if (_extrs_complete || initializing_extrs) return; // Done already
1248 
1249   assert(_blobs_end <= _all_max, "AOTCodeAddress table ranges need adjusting");
1250 
1251   initializing_extrs = true;
1252   _extrs_addr = NEW_C_HEAP_ARRAY(address, _extrs_max, mtCode);
1253 
1254   _extrs_length = 0;
1255 
1256   // Record addresses of VM runtime methods
1257   SET_ADDRESS(_extrs, SharedRuntime::fixup_callers_callsite);
1258   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method);
1259   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_abstract);
1260   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_ic_miss);
1261   SET_ADDRESS(_extrs, SharedRuntime::allocate_inline_types);
1262 #if defined(AARCH64) && !defined(ZERO)
1263   SET_ADDRESS(_extrs, JavaThread::aarch64_get_thread_helper);
1264 #endif
1265   {
1266     // Required by Shared blobs
1267     SET_ADDRESS(_extrs, Deoptimization::fetch_unroll_info);
1268     SET_ADDRESS(_extrs, Deoptimization::unpack_frames);
1269     SET_ADDRESS(_extrs, SafepointSynchronize::handle_polling_page_exception);
1270     SET_ADDRESS(_extrs, SharedRuntime::resolve_opt_virtual_call_C);
1271     SET_ADDRESS(_extrs, SharedRuntime::resolve_virtual_call_C);
1272     SET_ADDRESS(_extrs, SharedRuntime::resolve_static_call_C);
1273     SET_ADDRESS(_extrs, SharedRuntime::throw_delayed_StackOverflowError);
1274     SET_ADDRESS(_extrs, SharedRuntime::throw_AbstractMethodError);
1275     SET_ADDRESS(_extrs, SharedRuntime::throw_IncompatibleClassChangeError);
1276     SET_ADDRESS(_extrs, SharedRuntime::throw_NullPointerException_at_call);
1277   }
1278 
1279 #ifdef COMPILER1
1280   {
1281     // Required by C1 blobs

1290     SET_ADDRESS(_extrs, Runtime1::new_type_array);
1291     SET_ADDRESS(_extrs, Runtime1::new_object_array);
1292     SET_ADDRESS(_extrs, Runtime1::new_multi_array);
1293     SET_ADDRESS(_extrs, Runtime1::throw_range_check_exception);
1294     SET_ADDRESS(_extrs, Runtime1::throw_index_exception);
1295     SET_ADDRESS(_extrs, Runtime1::throw_div0_exception);
1296     SET_ADDRESS(_extrs, Runtime1::throw_null_pointer_exception);
1297     SET_ADDRESS(_extrs, Runtime1::throw_array_store_exception);
1298     SET_ADDRESS(_extrs, Runtime1::throw_class_cast_exception);
1299     SET_ADDRESS(_extrs, Runtime1::throw_incompatible_class_change_error);
1300     SET_ADDRESS(_extrs, Runtime1::is_instance_of);
1301     SET_ADDRESS(_extrs, Runtime1::monitorenter);
1302     SET_ADDRESS(_extrs, Runtime1::monitorexit);
1303     SET_ADDRESS(_extrs, Runtime1::deoptimize);
1304     SET_ADDRESS(_extrs, Runtime1::access_field_patching);
1305     SET_ADDRESS(_extrs, Runtime1::move_klass_patching);
1306     SET_ADDRESS(_extrs, Runtime1::move_mirror_patching);
1307     SET_ADDRESS(_extrs, Runtime1::move_appendix_patching);
1308     SET_ADDRESS(_extrs, Runtime1::predicate_failed_trap);
1309     SET_ADDRESS(_extrs, Runtime1::unimplemented_entry);
1310     SET_ADDRESS(_extrs, Runtime1::new_null_free_array);
1311     SET_ADDRESS(_extrs, Runtime1::load_flat_array);
1312     SET_ADDRESS(_extrs, Runtime1::store_flat_array);
1313     SET_ADDRESS(_extrs, Runtime1::substitutability_check);
1314     SET_ADDRESS(_extrs, Runtime1::buffer_inline_args);
1315     SET_ADDRESS(_extrs, Runtime1::buffer_inline_args_no_receiver);
1316     SET_ADDRESS(_extrs, Runtime1::throw_identity_exception);
1317     SET_ADDRESS(_extrs, Runtime1::throw_illegal_monitor_state_exception);
1318     SET_ADDRESS(_extrs, Thread::current);
1319     SET_ADDRESS(_extrs, CompressedKlassPointers::base_addr());
1320 #ifndef PRODUCT
1321     SET_ADDRESS(_extrs, os::breakpoint);
1322 #endif
1323   }
1324 #endif
1325 
1326 #ifdef COMPILER2
1327   {
1328     // Required by C2 blobs
1329     SET_ADDRESS(_extrs, Deoptimization::uncommon_trap);
1330     SET_ADDRESS(_extrs, OptoRuntime::handle_exception_C);
1331     SET_ADDRESS(_extrs, OptoRuntime::new_instance_C);
1332     SET_ADDRESS(_extrs, OptoRuntime::new_array_C);
1333     SET_ADDRESS(_extrs, OptoRuntime::new_array_nozero_C);
1334     SET_ADDRESS(_extrs, OptoRuntime::multianewarray2_C);
1335     SET_ADDRESS(_extrs, OptoRuntime::multianewarray3_C);
1336     SET_ADDRESS(_extrs, OptoRuntime::multianewarray4_C);
1337     SET_ADDRESS(_extrs, OptoRuntime::multianewarray5_C);
1338     SET_ADDRESS(_extrs, OptoRuntime::multianewarrayN_C);
1339 #if INCLUDE_JVMTI
1340     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_start);
1341     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_end);
1342     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_mount);
1343     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_unmount);
1344 #endif
1345     SET_ADDRESS(_extrs, OptoRuntime::complete_monitor_locking_C);
1346     SET_ADDRESS(_extrs, OptoRuntime::monitor_notify_C);
1347     SET_ADDRESS(_extrs, OptoRuntime::monitor_notifyAll_C);
1348     SET_ADDRESS(_extrs, OptoRuntime::rethrow_C);
1349     SET_ADDRESS(_extrs, OptoRuntime::slow_arraycopy_C);
1350     SET_ADDRESS(_extrs, OptoRuntime::register_finalizer_C);
1351     SET_ADDRESS(_extrs, OptoRuntime::load_unknown_inline_C);
1352     SET_ADDRESS(_extrs, OptoRuntime::store_unknown_inline_C);
1353 #if defined(AARCH64)
1354     SET_ADDRESS(_extrs, JavaThread::verify_cross_modify_fence_failure);
1355 #endif // AARCH64
1356   }
1357 #endif // COMPILER2
1358 
1359 #if INCLUDE_G1GC
1360   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_post_entry);
1361   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_pre_entry);
1362 #endif
1363 #if INCLUDE_SHENANDOAHGC
1364   SET_ADDRESS(_extrs, ShenandoahRuntime::write_ref_field_pre);
1365   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom);
1366   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom_narrow);
1367 #endif
1368 #if INCLUDE_ZGC
1369   SET_ADDRESS(_extrs, ZBarrierSetRuntime::load_barrier_on_phantom_oop_field_preloaded_addr());
1370 #if defined(AMD64)
1371   SET_ADDRESS(_extrs, &ZPointerLoadShift);
1372 #endif
1373 #endif
1374 #ifndef ZERO
1375 #if defined(AMD64) || defined(AARCH64) || defined(RISCV64)
1376   SET_ADDRESS(_extrs, MacroAssembler::debug64);
1377 #endif
1378 #endif // ZERO
1379 
1380   if (UseCompressedOops) {
1381     SET_ADDRESS(_extrs, CompressedOops::base_addr());
1382   }
1383 
1384   _extrs_complete = true;
1385   log_debug(aot, codecache, init)("External addresses recorded");
1386 }
1387 
1388 static bool initializing_early_stubs = false;
1389 
1390 void AOTCodeAddressTable::init_early_stubs() {
1391   if (_complete || initializing_early_stubs) return; // Done already
1392   initializing_early_stubs = true;
1393   _stubs_addr = NEW_C_HEAP_ARRAY(address, _stubs_max, mtCode);
1394   _stubs_length = 0;
1395   SET_ADDRESS(_stubs, StubRoutines::forward_exception_entry());
1396 
1397   {
1398     // Required by C1 blobs
1399 #if defined(AMD64) && !defined(ZERO)
1400     SET_ADDRESS(_stubs, StubRoutines::x86::double_sign_flip());
1401     SET_ADDRESS(_stubs, StubRoutines::x86::d2l_fixup());
1402 #endif // AMD64
1403   }
< prev index next >