< 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     SET_ADDRESS(_extrs, OptoRuntime::complete_monitor_locking_C);
1350     SET_ADDRESS(_extrs, OptoRuntime::monitor_notify_C);
1351     SET_ADDRESS(_extrs, OptoRuntime::monitor_notifyAll_C);
1352     SET_ADDRESS(_extrs, OptoRuntime::rethrow_C);
1353     SET_ADDRESS(_extrs, OptoRuntime::slow_arraycopy_C);
1354     SET_ADDRESS(_extrs, OptoRuntime::register_finalizer_C);


1355     SET_ADDRESS(_extrs, OptoRuntime::vthread_end_first_transition_C);
1356     SET_ADDRESS(_extrs, OptoRuntime::vthread_start_final_transition_C);
1357     SET_ADDRESS(_extrs, OptoRuntime::vthread_start_transition_C);
1358     SET_ADDRESS(_extrs, OptoRuntime::vthread_end_transition_C);
1359 #if defined(AARCH64)
1360     SET_ADDRESS(_extrs, JavaThread::verify_cross_modify_fence_failure);
1361 #endif // AARCH64
1362   }
1363 #endif // COMPILER2
1364 
1365 #if INCLUDE_G1GC
1366   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_pre_entry);
1367 #endif
1368 #if INCLUDE_SHENANDOAHGC
1369   SET_ADDRESS(_extrs, ShenandoahRuntime::write_barrier_pre);
1370   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom);
1371   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom_narrow);
1372 #endif
1373 #if INCLUDE_ZGC
1374   SET_ADDRESS(_extrs, ZBarrierSetRuntime::load_barrier_on_phantom_oop_field_preloaded_addr());
1375 #if defined(AMD64)
1376   SET_ADDRESS(_extrs, &ZPointerLoadShift);
1377 #endif
1378 #endif
1379 #ifndef ZERO
1380 #if defined(AMD64) || defined(AARCH64) || defined(RISCV64)
1381   SET_ADDRESS(_extrs, MacroAssembler::debug64);
1382 #endif
1383 #endif // ZERO
1384 




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

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     SET_ADDRESS(_extrs, OptoRuntime::complete_monitor_locking_C);
1359     SET_ADDRESS(_extrs, OptoRuntime::monitor_notify_C);
1360     SET_ADDRESS(_extrs, OptoRuntime::monitor_notifyAll_C);
1361     SET_ADDRESS(_extrs, OptoRuntime::rethrow_C);
1362     SET_ADDRESS(_extrs, OptoRuntime::slow_arraycopy_C);
1363     SET_ADDRESS(_extrs, OptoRuntime::register_finalizer_C);
1364     SET_ADDRESS(_extrs, OptoRuntime::load_unknown_inline_C);
1365     SET_ADDRESS(_extrs, OptoRuntime::store_unknown_inline_C);
1366     SET_ADDRESS(_extrs, OptoRuntime::vthread_end_first_transition_C);
1367     SET_ADDRESS(_extrs, OptoRuntime::vthread_start_final_transition_C);
1368     SET_ADDRESS(_extrs, OptoRuntime::vthread_start_transition_C);
1369     SET_ADDRESS(_extrs, OptoRuntime::vthread_end_transition_C);
1370 #if defined(AARCH64)
1371     SET_ADDRESS(_extrs, JavaThread::verify_cross_modify_fence_failure);
1372 #endif // AARCH64
1373   }
1374 #endif // COMPILER2
1375 
1376 #if INCLUDE_G1GC
1377   SET_ADDRESS(_extrs, G1BarrierSetRuntime::write_ref_field_pre_entry);
1378 #endif
1379 #if INCLUDE_SHENANDOAHGC
1380   SET_ADDRESS(_extrs, ShenandoahRuntime::write_barrier_pre);
1381   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom);
1382   SET_ADDRESS(_extrs, ShenandoahRuntime::load_reference_barrier_phantom_narrow);
1383 #endif
1384 #if INCLUDE_ZGC
1385   SET_ADDRESS(_extrs, ZBarrierSetRuntime::load_barrier_on_phantom_oop_field_preloaded_addr());
1386 #if defined(AMD64)
1387   SET_ADDRESS(_extrs, &ZPointerLoadShift);
1388 #endif
1389 #endif
1390 #ifndef ZERO
1391 #if defined(AMD64) || defined(AARCH64) || defined(RISCV64)
1392   SET_ADDRESS(_extrs, MacroAssembler::debug64);
1393 #endif
1394 #endif // ZERO
1395 
1396   if (UseCompressedOops) {
1397     SET_ADDRESS(_extrs, CompressedOops::base_addr());
1398   }
1399 
1400   _extrs_complete = true;
1401   log_debug(aot, codecache, init)("External addresses recorded");
1402 }
1403 
1404 static bool initializing_early_stubs = false;
1405 
1406 void AOTCodeAddressTable::init_early_stubs() {
1407   if (_complete || initializing_early_stubs) return; // Done already
1408   initializing_early_stubs = true;
1409   _stubs_addr = NEW_C_HEAP_ARRAY(address, _stubs_max, mtCode);
1410   _stubs_length = 0;
1411   SET_ADDRESS(_stubs, StubRoutines::forward_exception_entry());
1412 
1413   {
1414     // Required by C1 blobs
1415 #if defined(AMD64) && !defined(ZERO)
1416     SET_ADDRESS(_stubs, StubRoutines::x86::double_sign_flip());
1417     SET_ADDRESS(_stubs, StubRoutines::x86::d2l_fixup());
1418 #endif // AMD64
1419   }
< prev index next >