diff options
-rw-r--r-- | compiler/oat_test.cc | 2 | ||||
-rw-r--r-- | runtime/arch/arm/quick_entrypoints_arm.S | 5 | ||||
-rw-r--r-- | runtime/arch/arm64/quick_entrypoints_arm64.S | 5 | ||||
-rw-r--r-- | runtime/arch/mips/entrypoints_init_mips.cc | 2 | ||||
-rw-r--r-- | runtime/arch/mips/quick_entrypoints_mips.S | 11 | ||||
-rw-r--r-- | runtime/arch/mips64/quick_entrypoints_mips64.S | 11 | ||||
-rw-r--r-- | runtime/arch/x86/quick_entrypoints_x86.S | 5 | ||||
-rw-r--r-- | runtime/arch/x86_64/quick_entrypoints_x86_64.S | 5 | ||||
-rw-r--r-- | runtime/asm_support.h | 12 | ||||
-rw-r--r-- | runtime/common_throws.cc | 10 | ||||
-rw-r--r-- | runtime/common_throws.h | 3 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_default_externs.h | 1 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_default_init_entrypoints.h | 1 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_entrypoints_list.h | 1 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_throw_entrypoints.cc | 7 | ||||
-rw-r--r-- | runtime/entrypoints_order_test.cc | 9 | ||||
-rw-r--r-- | runtime/thread.cc | 1 | ||||
-rw-r--r-- | runtime/thread.h | 14 |
18 files changed, 18 insertions, 87 deletions
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc index 78e9ca91b7..24d102d4c0 100644 --- a/compiler/oat_test.cc +++ b/compiler/oat_test.cc @@ -453,7 +453,7 @@ TEST_F(OatTest, OatHeaderSizeCheck) { EXPECT_EQ(72U, sizeof(OatHeader)); EXPECT_EQ(4U, sizeof(OatMethodOffsets)); EXPECT_EQ(20U, sizeof(OatQuickMethodHeader)); - EXPECT_EQ(164 * static_cast<size_t>(GetInstructionSetPointerSize(kRuntimeISA)), + EXPECT_EQ(163 * static_cast<size_t>(GetInstructionSetPointerSize(kRuntimeISA)), sizeof(QuickEntryPoints)); } diff --git a/runtime/arch/arm/quick_entrypoints_arm.S b/runtime/arch/arm/quick_entrypoints_arm.S index 3fc83ba7d1..0416988e06 100644 --- a/runtime/arch/arm/quick_entrypoints_arm.S +++ b/runtime/arch/arm/quick_entrypoints_arm.S @@ -418,11 +418,6 @@ TWO_ARG_RUNTIME_EXCEPTION art_quick_throw_string_bounds, artThrowStringBoundsFro NO_ARG_RUNTIME_EXCEPTION art_quick_throw_stack_overflow, artThrowStackOverflowFromCode /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ -ONE_ARG_RUNTIME_EXCEPTION art_quick_throw_no_such_method, artThrowNoSuchMethodFromCode - - /* * All generated callsites for interface invokes and invocation slow paths will load arguments * as usual - except instead of loading arg0/r0 with the target Method*, arg0/r0 will contain * the method_idx. This wrapper will save arg1-arg3, and call the appropriate C helper. diff --git a/runtime/arch/arm64/quick_entrypoints_arm64.S b/runtime/arch/arm64/quick_entrypoints_arm64.S index 5a92659b1d..1a8a2b27fa 100644 --- a/runtime/arch/arm64/quick_entrypoints_arm64.S +++ b/runtime/arch/arm64/quick_entrypoints_arm64.S @@ -511,11 +511,6 @@ TWO_ARG_RUNTIME_EXCEPTION art_quick_throw_string_bounds, artThrowStringBoundsFro NO_ARG_RUNTIME_EXCEPTION art_quick_throw_stack_overflow, artThrowStackOverflowFromCode /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ -ONE_ARG_RUNTIME_EXCEPTION art_quick_throw_no_such_method, artThrowNoSuchMethodFromCode - - /* * All generated callsites for interface invokes and invocation slow paths will load arguments * as usual - except instead of loading arg0/x0 with the target Method*, arg0/x0 will contain * the method_idx. This wrapper will save arg1-arg3, and call the appropriate C helper. diff --git a/runtime/arch/mips/entrypoints_init_mips.cc b/runtime/arch/mips/entrypoints_init_mips.cc index 38aa67c12f..e10d4e6a74 100644 --- a/runtime/arch/mips/entrypoints_init_mips.cc +++ b/runtime/arch/mips/entrypoints_init_mips.cc @@ -264,8 +264,6 @@ void InitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) { static_assert(!IsDirectEntrypoint(kQuickThrowArrayBounds), "Non-direct C stub marked direct."); qpoints->pThrowDivZero = art_quick_throw_div_zero; static_assert(!IsDirectEntrypoint(kQuickThrowDivZero), "Non-direct C stub marked direct."); - qpoints->pThrowNoSuchMethod = art_quick_throw_no_such_method; - static_assert(!IsDirectEntrypoint(kQuickThrowNoSuchMethod), "Non-direct C stub marked direct."); qpoints->pThrowNullPointer = art_quick_throw_null_pointer_exception; static_assert(!IsDirectEntrypoint(kQuickThrowNullPointer), "Non-direct C stub marked direct."); qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow; diff --git a/runtime/arch/mips/quick_entrypoints_mips.S b/runtime/arch/mips/quick_entrypoints_mips.S index 71b8ae281d..4563004e86 100644 --- a/runtime/arch/mips/quick_entrypoints_mips.S +++ b/runtime/arch/mips/quick_entrypoints_mips.S @@ -777,17 +777,6 @@ ENTRY art_quick_throw_stack_overflow END art_quick_throw_stack_overflow /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ - .extern artThrowNoSuchMethodFromCode -ENTRY art_quick_throw_no_such_method - SETUP_SAVE_ALL_CALLEE_SAVES_FRAME - la $t9, artThrowNoSuchMethodFromCode - jalr $zero, $t9 # artThrowNoSuchMethodFromCode(method_idx, Thread*) - move $a1, rSELF # pass Thread::Current -END art_quick_throw_no_such_method - - /* * All generated callsites for interface invokes and invocation slow paths will load arguments * as usual - except instead of loading arg0/$a0 with the target Method*, arg0/$a0 will contain * the method_idx. This wrapper will save arg1-arg3, and call the appropriate C helper. diff --git a/runtime/arch/mips64/quick_entrypoints_mips64.S b/runtime/arch/mips64/quick_entrypoints_mips64.S index 61c9019f38..c16e85543d 100644 --- a/runtime/arch/mips64/quick_entrypoints_mips64.S +++ b/runtime/arch/mips64/quick_entrypoints_mips64.S @@ -887,17 +887,6 @@ ENTRY art_quick_throw_stack_overflow END art_quick_throw_stack_overflow /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ - .extern artThrowNoSuchMethodFromCode -ENTRY art_quick_throw_no_such_method - SETUP_SAVE_ALL_CALLEE_SAVES_FRAME - dla $t9, artThrowNoSuchMethodFromCode - jalr $zero, $t9 # artThrowNoSuchMethodFromCode(method_idx, Thread*) - move $a1, rSELF # pass Thread::Current -END art_quick_throw_no_such_method - - /* * All generated callsites for interface invokes and invocation slow paths will load arguments * as usual - except instead of loading arg0/$a0 with the target Method*, arg0/$a0 will contain * the method_idx. This wrapper will save arg1-arg3, load the caller's Method*, align the diff --git a/runtime/arch/x86/quick_entrypoints_x86.S b/runtime/arch/x86/quick_entrypoints_x86.S index 0beb2a47b7..f3793e15a7 100644 --- a/runtime/arch/x86/quick_entrypoints_x86.S +++ b/runtime/arch/x86/quick_entrypoints_x86.S @@ -398,11 +398,6 @@ NO_ARG_RUNTIME_EXCEPTION art_quick_throw_stack_overflow, artThrowStackOverflowFr ONE_ARG_RUNTIME_EXCEPTION art_quick_deliver_exception, artDeliverExceptionFromCode /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ -ONE_ARG_RUNTIME_EXCEPTION art_quick_throw_no_such_method, artThrowNoSuchMethodFromCode - - /* * Called by managed code to create and deliver an ArrayIndexOutOfBoundsException. Arg1 holds * index, arg2 holds limit. */ diff --git a/runtime/arch/x86_64/quick_entrypoints_x86_64.S b/runtime/arch/x86_64/quick_entrypoints_x86_64.S index 089ed7517e..bfba543d93 100644 --- a/runtime/arch/x86_64/quick_entrypoints_x86_64.S +++ b/runtime/arch/x86_64/quick_entrypoints_x86_64.S @@ -454,11 +454,6 @@ NO_ARG_RUNTIME_EXCEPTION art_quick_throw_stack_overflow, artThrowStackOverflowFr ONE_ARG_RUNTIME_EXCEPTION art_quick_deliver_exception, artDeliverExceptionFromCode /* - * Called by managed code to create and deliver a NoSuchMethodError. - */ -ONE_ARG_RUNTIME_EXCEPTION art_quick_throw_no_such_method, artThrowNoSuchMethodFromCode - - /* * Called by managed code to create and deliver an ArrayIndexOutOfBoundsException. Arg1 holds * index, arg2 holds limit. */ diff --git a/runtime/asm_support.h b/runtime/asm_support.h index f4addf72a0..b8f72725c6 100644 --- a/runtime/asm_support.h +++ b/runtime/asm_support.h @@ -89,20 +89,20 @@ ADD_TEST_EQ(THREAD_TOP_QUICK_FRAME_OFFSET, ADD_TEST_EQ(THREAD_SELF_OFFSET, art::Thread::SelfOffset<POINTER_SIZE>().Int32Value()) -// Offset of field Thread::tlsPtr_.thread_local_objects. -#define THREAD_LOCAL_OBJECTS_OFFSET (THREAD_CARD_TABLE_OFFSET + 199 * __SIZEOF_POINTER__) -ADD_TEST_EQ(THREAD_LOCAL_OBJECTS_OFFSET, - art::Thread::ThreadLocalObjectsOffset<POINTER_SIZE>().Int32Value()) // Offset of field Thread::tlsPtr_.thread_local_pos. -#define THREAD_LOCAL_POS_OFFSET (THREAD_LOCAL_OBJECTS_OFFSET + __SIZEOF_SIZE_T__) +#define THREAD_LOCAL_POS_OFFSET (THREAD_CARD_TABLE_OFFSET + 198 * __SIZEOF_POINTER__) ADD_TEST_EQ(THREAD_LOCAL_POS_OFFSET, art::Thread::ThreadLocalPosOffset<POINTER_SIZE>().Int32Value()) // Offset of field Thread::tlsPtr_.thread_local_end. #define THREAD_LOCAL_END_OFFSET (THREAD_LOCAL_POS_OFFSET + __SIZEOF_POINTER__) ADD_TEST_EQ(THREAD_LOCAL_END_OFFSET, art::Thread::ThreadLocalEndOffset<POINTER_SIZE>().Int32Value()) +// Offset of field Thread::tlsPtr_.thread_local_objects. +#define THREAD_LOCAL_OBJECTS_OFFSET (THREAD_LOCAL_END_OFFSET + __SIZEOF_POINTER__) +ADD_TEST_EQ(THREAD_LOCAL_OBJECTS_OFFSET, + art::Thread::ThreadLocalObjectsOffset<POINTER_SIZE>().Int32Value()) // Offset of field Thread::tlsPtr_.mterp_current_ibase. -#define THREAD_CURRENT_IBASE_OFFSET (THREAD_LOCAL_END_OFFSET + __SIZEOF_POINTER__) +#define THREAD_CURRENT_IBASE_OFFSET (THREAD_LOCAL_OBJECTS_OFFSET + __SIZEOF_SIZE_T__) ADD_TEST_EQ(THREAD_CURRENT_IBASE_OFFSET, art::Thread::MterpCurrentIBaseOffset<POINTER_SIZE>().Int32Value()) // Offset of field Thread::tlsPtr_.mterp_default_ibase. diff --git a/runtime/common_throws.cc b/runtime/common_throws.cc index 77362a51be..1e4c7725b7 100644 --- a/runtime/common_throws.cc +++ b/runtime/common_throws.cc @@ -357,16 +357,6 @@ void ThrowNoSuchMethodError(InvokeType type, mirror::Class* c, const StringPiece ThrowException("Ljava/lang/NoSuchMethodError;", c, msg.str().c_str()); } -void ThrowNoSuchMethodError(uint32_t method_idx) { - ArtMethod* method = Thread::Current()->GetCurrentMethod(nullptr); - mirror::DexCache* dex_cache = method->GetDeclaringClass()->GetDexCache(); - const DexFile& dex_file = *dex_cache->GetDexFile(); - std::ostringstream msg; - msg << "No method '" << PrettyMethod(method_idx, dex_file, true) << "'"; - ThrowException("Ljava/lang/NoSuchMethodError;", - method->GetDeclaringClass(), msg.str().c_str()); -} - // NullPointerException void ThrowNullPointerExceptionForFieldAccess(ArtField* field, bool is_read) { diff --git a/runtime/common_throws.h b/runtime/common_throws.h index ab25543ec6..945dc2daba 100644 --- a/runtime/common_throws.h +++ b/runtime/common_throws.h @@ -178,9 +178,6 @@ void ThrowNoSuchMethodError(InvokeType type, mirror::Class* c, const StringPiece const Signature& signature) REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR; -void ThrowNoSuchMethodError(uint32_t method_idx) - REQUIRES_SHARED(Locks::mutator_lock_) COLD_ATTR; - // NullPointerException void ThrowNullPointerExceptionForFieldAccess(ArtField* field, diff --git a/runtime/entrypoints/quick/quick_default_externs.h b/runtime/entrypoints/quick/quick_default_externs.h index 86fb8818ec..cfa5325e45 100644 --- a/runtime/entrypoints/quick/quick_default_externs.h +++ b/runtime/entrypoints/quick/quick_default_externs.h @@ -118,7 +118,6 @@ extern "C" void art_quick_test_suspend(); extern "C" void art_quick_deliver_exception(art::mirror::Object*); extern "C" void art_quick_throw_array_bounds(int32_t index, int32_t limit); extern "C" void art_quick_throw_div_zero(); -extern "C" void art_quick_throw_no_such_method(int32_t method_idx); extern "C" void art_quick_throw_null_pointer_exception(); extern "C" void art_quick_throw_null_pointer_exception_from_signal(uintptr_t address); extern "C" void art_quick_throw_stack_overflow(void*); diff --git a/runtime/entrypoints/quick/quick_default_init_entrypoints.h b/runtime/entrypoints/quick/quick_default_init_entrypoints.h index 2a206c286a..1ee1f818b6 100644 --- a/runtime/entrypoints/quick/quick_default_init_entrypoints.h +++ b/runtime/entrypoints/quick/quick_default_init_entrypoints.h @@ -113,7 +113,6 @@ void DefaultInitEntryPoints(JniEntryPoints* jpoints, QuickEntryPoints* qpoints) qpoints->pDeliverException = art_quick_deliver_exception; qpoints->pThrowArrayBounds = art_quick_throw_array_bounds; qpoints->pThrowDivZero = art_quick_throw_div_zero; - qpoints->pThrowNoSuchMethod = art_quick_throw_no_such_method; qpoints->pThrowNullPointer = art_quick_throw_null_pointer_exception; qpoints->pThrowStackOverflow = art_quick_throw_stack_overflow; qpoints->pThrowStringBounds = art_quick_throw_string_bounds; diff --git a/runtime/entrypoints/quick/quick_entrypoints_list.h b/runtime/entrypoints/quick/quick_entrypoints_list.h index 74c928ad8d..e4029191d6 100644 --- a/runtime/entrypoints/quick/quick_entrypoints_list.h +++ b/runtime/entrypoints/quick/quick_entrypoints_list.h @@ -139,7 +139,6 @@ V(DeliverException, void, mirror::Object*) \ V(ThrowArrayBounds, void, int32_t, int32_t) \ V(ThrowDivZero, void, void) \ - V(ThrowNoSuchMethod, void, int32_t) \ V(ThrowNullPointer, void, void) \ V(ThrowStackOverflow, void, void*) \ V(ThrowStringBounds, void, int32_t, int32_t) \ diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc index 67cae8a7d9..a205b17f1b 100644 --- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc @@ -101,13 +101,6 @@ extern "C" NO_RETURN void artThrowStackOverflowFromCode(Thread* self) self->QuickDeliverException(); } -extern "C" NO_RETURN void artThrowNoSuchMethodFromCode(int32_t method_idx, Thread* self) - REQUIRES_SHARED(Locks::mutator_lock_) { - ScopedQuickEntrypointChecks sqec(self); - ThrowNoSuchMethodError(method_idx); - self->QuickDeliverException(); -} - extern "C" NO_RETURN void artThrowClassCastException(mirror::Class* dest_type, mirror::Class* src_type, Thread* self) diff --git a/runtime/entrypoints_order_test.cc b/runtime/entrypoints_order_test.cc index b102334418..03254ab8d4 100644 --- a/runtime/entrypoints_order_test.cc +++ b/runtime/entrypoints_order_test.cc @@ -122,10 +122,10 @@ class EntrypointsOrderTest : public CommonRuntimeTest { // Skip across the entrypoints structures. - EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_start, thread_local_objects, sizeof(void*)); - EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_objects, thread_local_pos, sizeof(size_t)); + EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_start, thread_local_pos, sizeof(void*)); EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_pos, thread_local_end, sizeof(void*)); - EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_end, mterp_current_ibase, sizeof(void*)); + EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_end, thread_local_objects, sizeof(void*)); + EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, thread_local_objects, mterp_current_ibase, sizeof(size_t)); EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, mterp_current_ibase, mterp_default_ibase, sizeof(void*)); EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, mterp_default_ibase, mterp_alt_ibase, sizeof(void*)); EXPECT_OFFSET_DIFFP(Thread, tlsPtr_, mterp_alt_ibase, rosalloc_runs, sizeof(void*)); @@ -288,8 +288,7 @@ class EntrypointsOrderTest : public CommonRuntimeTest { EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pDeliverException, pThrowArrayBounds, sizeof(void*)); EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowArrayBounds, pThrowDivZero, sizeof(void*)); - EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowDivZero, pThrowNoSuchMethod, sizeof(void*)); - EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowNoSuchMethod, pThrowNullPointer, sizeof(void*)); + EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowDivZero, pThrowNullPointer, sizeof(void*)); EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowNullPointer, pThrowStackOverflow, sizeof(void*)); EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowStackOverflow, pThrowStringBounds, sizeof(void*)); EXPECT_OFFSET_DIFFNP(QuickEntryPoints, pThrowStringBounds, pDeoptimize, sizeof(void*)); diff --git a/runtime/thread.cc b/runtime/thread.cc index 43ef1cb22e..a860c7ae97 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -2548,7 +2548,6 @@ void Thread::DumpThreadOffset(std::ostream& os, uint32_t offset) { QUICK_ENTRY_POINT_INFO(pDeliverException) QUICK_ENTRY_POINT_INFO(pThrowArrayBounds) QUICK_ENTRY_POINT_INFO(pThrowDivZero) - QUICK_ENTRY_POINT_INFO(pThrowNoSuchMethod) QUICK_ENTRY_POINT_INFO(pThrowNullPointer) QUICK_ENTRY_POINT_INFO(pThrowStackOverflow) QUICK_ENTRY_POINT_INFO(pDeoptimize) diff --git a/runtime/thread.h b/runtime/thread.h index d248123db5..b53cc2ef3e 100644 --- a/runtime/thread.h +++ b/runtime/thread.h @@ -1363,12 +1363,12 @@ class Thread { instrumentation_stack(nullptr), debug_invoke_req(nullptr), single_step_control(nullptr), stacked_shadow_frame_record(nullptr), deoptimization_context_stack(nullptr), frame_id_to_shadow_frame(nullptr), name(nullptr), pthread_self(0), - last_no_thread_suspension_cause(nullptr), thread_local_start(nullptr), - thread_local_objects(0), thread_local_pos(nullptr), thread_local_end(nullptr), - mterp_current_ibase(nullptr), mterp_default_ibase(nullptr), mterp_alt_ibase(nullptr), - thread_local_alloc_stack_top(nullptr), thread_local_alloc_stack_end(nullptr), - nested_signal_state(nullptr), flip_function(nullptr), method_verifier(nullptr), - thread_local_mark_stack(nullptr) { + last_no_thread_suspension_cause(nullptr), checkpoint_function(nullptr), + thread_local_start(nullptr), thread_local_pos(nullptr), thread_local_end(nullptr), + thread_local_objects(0), mterp_current_ibase(nullptr), mterp_default_ibase(nullptr), + mterp_alt_ibase(nullptr), thread_local_alloc_stack_top(nullptr), + thread_local_alloc_stack_end(nullptr), nested_signal_state(nullptr), + flip_function(nullptr), method_verifier(nullptr), thread_local_mark_stack(nullptr) { std::fill(held_mutexes, held_mutexes + kLockLevelCount, nullptr); } @@ -1480,11 +1480,11 @@ class Thread { // Thread-local allocation pointer. uint8_t* thread_local_start; - size_t thread_local_objects; // thread_local_pos and thread_local_end must be consecutive for ldrd and are 8 byte aligned for // potentially better performance. uint8_t* thread_local_pos; uint8_t* thread_local_end; + size_t thread_local_objects; // Mterp jump table bases. void* mterp_current_ibase; |