< prev index next >

src/hotspot/share/code/aotCodeCache.cpp

Print this page

1259     assert(type##_length <= type##_max, "increase size"); \
1260   }
1261 
1262 static bool initializing_extrs = false;
1263 
1264 void AOTCodeAddressTable::init_extrs() {
1265   if (_extrs_complete || initializing_extrs) return; // Done already
1266 
1267   assert(_blobs_end <= _all_max, "AOTCodeAddress table ranges need adjusting");
1268 
1269   initializing_extrs = true;
1270   _extrs_addr = NEW_C_HEAP_ARRAY(address, _extrs_max, mtCode);
1271 
1272   _extrs_length = 0;
1273 
1274   // Record addresses of VM runtime methods
1275   SET_ADDRESS(_extrs, SharedRuntime::fixup_callers_callsite);
1276   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method);
1277   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_abstract);
1278   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_ic_miss);

1279 #if defined(AARCH64) && !defined(ZERO)
1280   SET_ADDRESS(_extrs, JavaThread::aarch64_get_thread_helper);
1281 #endif
1282   {
1283     // Required by Shared blobs
1284     SET_ADDRESS(_extrs, Deoptimization::fetch_unroll_info);
1285     SET_ADDRESS(_extrs, Deoptimization::unpack_frames);
1286     SET_ADDRESS(_extrs, SafepointSynchronize::handle_polling_page_exception);
1287     SET_ADDRESS(_extrs, SharedRuntime::resolve_opt_virtual_call_C);
1288     SET_ADDRESS(_extrs, SharedRuntime::resolve_virtual_call_C);
1289     SET_ADDRESS(_extrs, SharedRuntime::resolve_static_call_C);
1290     SET_ADDRESS(_extrs, SharedRuntime::throw_StackOverflowError);
1291     SET_ADDRESS(_extrs, SharedRuntime::throw_delayed_StackOverflowError);
1292     SET_ADDRESS(_extrs, SharedRuntime::throw_AbstractMethodError);
1293     SET_ADDRESS(_extrs, SharedRuntime::throw_IncompatibleClassChangeError);
1294     SET_ADDRESS(_extrs, SharedRuntime::throw_NullPointerException_at_call);
1295   }
1296 
1297 #ifdef COMPILER1
1298   {

1308     SET_ADDRESS(_extrs, Runtime1::new_type_array);
1309     SET_ADDRESS(_extrs, Runtime1::new_object_array);
1310     SET_ADDRESS(_extrs, Runtime1::new_multi_array);
1311     SET_ADDRESS(_extrs, Runtime1::throw_range_check_exception);
1312     SET_ADDRESS(_extrs, Runtime1::throw_index_exception);
1313     SET_ADDRESS(_extrs, Runtime1::throw_div0_exception);
1314     SET_ADDRESS(_extrs, Runtime1::throw_null_pointer_exception);
1315     SET_ADDRESS(_extrs, Runtime1::throw_array_store_exception);
1316     SET_ADDRESS(_extrs, Runtime1::throw_class_cast_exception);
1317     SET_ADDRESS(_extrs, Runtime1::throw_incompatible_class_change_error);
1318     SET_ADDRESS(_extrs, Runtime1::is_instance_of);
1319     SET_ADDRESS(_extrs, Runtime1::monitorenter);
1320     SET_ADDRESS(_extrs, Runtime1::monitorexit);
1321     SET_ADDRESS(_extrs, Runtime1::deoptimize);
1322     SET_ADDRESS(_extrs, Runtime1::access_field_patching);
1323     SET_ADDRESS(_extrs, Runtime1::move_klass_patching);
1324     SET_ADDRESS(_extrs, Runtime1::move_mirror_patching);
1325     SET_ADDRESS(_extrs, Runtime1::move_appendix_patching);
1326     SET_ADDRESS(_extrs, Runtime1::predicate_failed_trap);
1327     SET_ADDRESS(_extrs, Runtime1::unimplemented_entry);








1328     SET_ADDRESS(_extrs, Thread::current);
1329     SET_ADDRESS(_extrs, CompressedKlassPointers::base_addr());
1330 #ifndef PRODUCT
1331     SET_ADDRESS(_extrs, os::breakpoint);
1332 #endif
1333   }
1334 #endif
1335 
1336 #ifdef COMPILER2
1337   {
1338     // Required by C2 blobs
1339     SET_ADDRESS(_extrs, Deoptimization::uncommon_trap);
1340     SET_ADDRESS(_extrs, OptoRuntime::handle_exception_C);
1341     SET_ADDRESS(_extrs, OptoRuntime::new_instance_C);
1342     SET_ADDRESS(_extrs, OptoRuntime::new_array_C);
1343     SET_ADDRESS(_extrs, OptoRuntime::new_array_nozero_C);
1344     SET_ADDRESS(_extrs, OptoRuntime::multianewarray2_C);
1345     SET_ADDRESS(_extrs, OptoRuntime::multianewarray3_C);
1346     SET_ADDRESS(_extrs, OptoRuntime::multianewarray4_C);
1347     SET_ADDRESS(_extrs, OptoRuntime::multianewarray5_C);
1348     SET_ADDRESS(_extrs, OptoRuntime::multianewarrayN_C);
1349 #if INCLUDE_JVMTI
1350     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_start);
1351     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_end);
1352     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_mount);
1353     SET_ADDRESS(_extrs, SharedRuntime::notify_jvmti_vthread_unmount);
1354 #endif
1355     SET_ADDRESS(_extrs, OptoRuntime::complete_monitor_locking_C);
1356     SET_ADDRESS(_extrs, OptoRuntime::monitor_notify_C);
1357     SET_ADDRESS(_extrs, OptoRuntime::monitor_notifyAll_C);
1358     SET_ADDRESS(_extrs, OptoRuntime::rethrow_C);
1359     SET_ADDRESS(_extrs, OptoRuntime::slow_arraycopy_C);
1360     SET_ADDRESS(_extrs, OptoRuntime::register_finalizer_C);


1361 #if defined(AARCH64)
1362     SET_ADDRESS(_extrs, JavaThread::verify_cross_modify_fence_failure);
1363 #endif // AARCH64
1364   }
1365 #endif // COMPILER2
1366 
1367 #if INCLUDE_G1GC
1368   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_post_entry);
1369   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_pre_entry);
1370 #endif
1371 #if INCLUDE_SHENANDOAHGC
1372   SET_ADDRESS(_extrs, ShenandoahRuntime::write_ref_field_pre);
1373   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom);
1374   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom_narrow);
1375 #endif
1376 #if INCLUDE_ZGC
1377   SET_ADDRESS(_extrs, ZBarrierSetRuntime::load_barrier_on_phantom_oop_field_preloaded_addr());
1378 #if defined(AMD64)
1379   SET_ADDRESS(_extrs, &ZPointerLoadShift);
1380 #endif
1381 #endif
1382 #ifndef ZERO
1383 #if defined(AMD64) || defined(AARCH64) || defined(RISCV64)
1384   SET_ADDRESS(_extrs, MacroAssembler::debug64);
1385 #endif
1386 #endif // ZERO
1387 




1388   _extrs_complete = true;
1389   log_debug(aot, codecache, init)("External addresses recorded");
1390 }
1391 
1392 static bool initializing_early_stubs = false;
1393 
1394 void AOTCodeAddressTable::init_early_stubs() {
1395   if (_complete || initializing_early_stubs) return; // Done already
1396   initializing_early_stubs = true;
1397   _stubs_addr = NEW_C_HEAP_ARRAY(address, _stubs_max, mtCode);
1398   _stubs_length = 0;
1399   SET_ADDRESS(_stubs, StubRoutines::forward_exception_entry());
1400 
1401   {
1402     // Required by C1 blobs
1403 #if defined(AMD64) && !defined(ZERO)
1404     SET_ADDRESS(_stubs, StubRoutines::x86::double_sign_flip());
1405     SET_ADDRESS(_stubs, StubRoutines::x86::d2l_fixup());
1406 #endif // AMD64
1407   }

1259     assert(type##_length <= type##_max, "increase size"); \
1260   }
1261 
1262 static bool initializing_extrs = false;
1263 
1264 void AOTCodeAddressTable::init_extrs() {
1265   if (_extrs_complete || initializing_extrs) return; // Done already
1266 
1267   assert(_blobs_end <= _all_max, "AOTCodeAddress table ranges need adjusting");
1268 
1269   initializing_extrs = true;
1270   _extrs_addr = NEW_C_HEAP_ARRAY(address, _extrs_max, mtCode);
1271 
1272   _extrs_length = 0;
1273 
1274   // Record addresses of VM runtime methods
1275   SET_ADDRESS(_extrs, SharedRuntime::fixup_callers_callsite);
1276   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method);
1277   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_abstract);
1278   SET_ADDRESS(_extrs, SharedRuntime::handle_wrong_method_ic_miss);
1279   SET_ADDRESS(_extrs, SharedRuntime::allocate_inline_types);
1280 #if defined(AARCH64) && !defined(ZERO)
1281   SET_ADDRESS(_extrs, JavaThread::aarch64_get_thread_helper);
1282 #endif
1283   {
1284     // Required by Shared blobs
1285     SET_ADDRESS(_extrs, Deoptimization::fetch_unroll_info);
1286     SET_ADDRESS(_extrs, Deoptimization::unpack_frames);
1287     SET_ADDRESS(_extrs, SafepointSynchronize::handle_polling_page_exception);
1288     SET_ADDRESS(_extrs, SharedRuntime::resolve_opt_virtual_call_C);
1289     SET_ADDRESS(_extrs, SharedRuntime::resolve_virtual_call_C);
1290     SET_ADDRESS(_extrs, SharedRuntime::resolve_static_call_C);
1291     SET_ADDRESS(_extrs, SharedRuntime::throw_StackOverflowError);
1292     SET_ADDRESS(_extrs, SharedRuntime::throw_delayed_StackOverflowError);
1293     SET_ADDRESS(_extrs, SharedRuntime::throw_AbstractMethodError);
1294     SET_ADDRESS(_extrs, SharedRuntime::throw_IncompatibleClassChangeError);
1295     SET_ADDRESS(_extrs, SharedRuntime::throw_NullPointerException_at_call);
1296   }
1297 
1298 #ifdef COMPILER1
1299   {

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