diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-02-24 08:10:57 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-02-24 08:10:57 +0000 |
commit | a5ca888d715cd0c6c421313211caa1928be3e399 (patch) | |
tree | bdb08a2cbcf277ab7f02626a23b52a3fdf272ffe /runtime/mirror | |
parent | 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4 (diff) | |
download | art-a5ca888d715cd0c6c421313211caa1928be3e399.zip art-a5ca888d715cd0c6c421313211caa1928be3e399.tar.gz art-a5ca888d715cd0c6c421313211caa1928be3e399.tar.bz2 |
Revert "Add JIT"
Sorry, run-test crashes on target:
0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000'
10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000
10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c
10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0
10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010
10-05 12:15:51.633 I/DEBUG (27995):
Bug: 17950037
This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4.
Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
Diffstat (limited to 'runtime/mirror')
-rw-r--r-- | runtime/mirror/art_field.cc | 2 | ||||
-rw-r--r-- | runtime/mirror/art_method-inl.h | 5 | ||||
-rw-r--r-- | runtime/mirror/art_method.cc | 17 | ||||
-rw-r--r-- | runtime/mirror/art_method.h | 31 |
4 files changed, 17 insertions, 38 deletions
diff --git a/runtime/mirror/art_field.cc b/runtime/mirror/art_field.cc index 3cea4a1..5a4ebd1 100644 --- a/runtime/mirror/art_field.cc +++ b/runtime/mirror/art_field.cc @@ -44,7 +44,7 @@ void ArtField::ResetClass() { void ArtField::SetOffset(MemberOffset num_bytes) { DCHECK(GetDeclaringClass()->IsLoaded() || GetDeclaringClass()->IsErroneous()); - if (kIsDebugBuild && Runtime::Current()->IsAotCompiler() && + if (kIsDebugBuild && Runtime::Current()->IsCompiler() && !Runtime::Current()->UseCompileTimeClassPath()) { Primitive::Type type = GetTypeAsPrimitiveType(); if (type == Primitive::kPrimDouble || type == Primitive::kPrimLong) { diff --git a/runtime/mirror/art_method-inl.h b/runtime/mirror/art_method-inl.h index c27c6e9..7d31148 100644 --- a/runtime/mirror/art_method-inl.h +++ b/runtime/mirror/art_method-inl.h @@ -147,10 +147,7 @@ inline mirror::Class* ArtMethod::GetClassFromTypeIndex(uint16_t type_idx, bool r inline uint32_t ArtMethod::GetCodeSize() { DCHECK(!IsRuntimeMethod() && !IsProxyMethod()) << PrettyMethod(this); - return GetCodeSize(EntryPointToCodePointer(GetEntryPointFromQuickCompiledCode())); -} - -inline uint32_t ArtMethod::GetCodeSize(const void* code) { + const void* code = EntryPointToCodePointer(GetEntryPointFromQuickCompiledCode()); if (code == nullptr) { return 0u; } diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc index 6259745..b2016dc 100644 --- a/runtime/mirror/art_method.cc +++ b/runtime/mirror/art_method.cc @@ -27,8 +27,6 @@ #include "entrypoints/runtime_asm_entrypoints.h" #include "gc/accounting/card_table-inl.h" #include "interpreter/interpreter.h" -#include "jit/jit.h" -#include "jit/jit_code_cache.h" #include "jni_internal.h" #include "mapping_table.h" #include "object_array-inl.h" @@ -231,7 +229,6 @@ uint32_t ArtMethod::ToDexPc(const uintptr_t pc, bool abort_on_failure) { if (abort_on_failure) { LOG(FATAL) << "Failed to find Dex offset for PC offset " << reinterpret_cast<void*>(sought_offset) << "(PC " << reinterpret_cast<void*>(pc) << ", entry_point=" << entry_point - << " current entry_point=" << GetQuickOatEntryPoint(sizeof(void*)) << ") in " << PrettyMethod(this); } return DexFile::kDexNoIndex; @@ -332,13 +329,6 @@ void ArtMethod::AssertPcIsWithinQuickCode(uintptr_t pc) { class_linker->IsQuickResolutionStub(code)) { return; } - // If we are the JIT then we may have just compiled the method after the - // IsQuickToInterpreterBridge check. - jit::Jit* const jit = Runtime::Current()->GetJit(); - if (jit != nullptr && - jit->GetCodeCache()->ContainsCodePtr(reinterpret_cast<const void*>(code))) { - return; - } /* * During a stack walk, a return PC may point past-the-end of the code * in the case that the last instruction is a call that isn't expected to @@ -346,11 +336,11 @@ void ArtMethod::AssertPcIsWithinQuickCode(uintptr_t pc) { * * NOTE: For Thumb both pc and code are offset by 1 indicating the Thumb state. */ - CHECK(PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc)) + CHECK(PcIsWithinQuickCode(pc)) << PrettyMethod(this) << " pc=" << std::hex << pc << " code=" << code - << " size=" << GetCodeSize(reinterpret_cast<const void*>(code)); + << " size=" << GetCodeSize(); } bool ArtMethod::IsEntrypointInterpreter() { @@ -420,8 +410,7 @@ void ArtMethod::Invoke(Thread* self, uint32_t* args, uint32_t args_size, JValue* } // Ensure that we won't be accidentally calling quick compiled code when -Xint. - if (kIsDebugBuild && runtime->GetInstrumentation()->IsForcedInterpretOnly()) { - DCHECK(!runtime->UseJit()); + if (kIsDebugBuild && Runtime::Current()->GetInstrumentation()->IsForcedInterpretOnly()) { CHECK(IsEntrypointInterpreter()) << "Don't call compiled code when -Xint " << PrettyMethod(this); } diff --git a/runtime/mirror/art_method.h b/runtime/mirror/art_method.h index 019fdcd..f33ca94 100644 --- a/runtime/mirror/art_method.h +++ b/runtime/mirror/art_method.h @@ -305,8 +305,18 @@ class MANAGED ArtMethod FINAL : public Object { // quick entrypoint. This code isn't robust for instrumentation, etc. and is only used for // debug purposes. bool PcIsWithinQuickCode(uintptr_t pc) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) { - return PcIsWithinQuickCode( - reinterpret_cast<uintptr_t>(GetEntryPointFromQuickCompiledCode()), pc); + uintptr_t code = reinterpret_cast<uintptr_t>(GetEntryPointFromQuickCompiledCode()); + if (code == 0) { + return pc == 0; + } + /* + * During a stack walk, a return PC may point past-the-end of the code + * in the case that the last instruction is a call that isn't expected to + * return. Thus, we check <= code + GetCodeSize(). + * + * NOTE: For Thumb both pc and code are offset by 1 indicating the Thumb state. + */ + return code <= pc && pc <= code + GetCodeSize(); } void AssertPcIsWithinQuickCode(uintptr_t pc) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); @@ -612,23 +622,6 @@ class MANAGED ArtMethod FINAL : public Object { return offset; } - // Code points to the start of the quick code. - static uint32_t GetCodeSize(const void* code); - - static bool PcIsWithinQuickCode(uintptr_t code, uintptr_t pc) { - if (code == 0) { - return pc == 0; - } - /* - * During a stack walk, a return PC may point past-the-end of the code - * in the case that the last instruction is a call that isn't expected to - * return. Thus, we check <= code + GetCodeSize(). - * - * NOTE: For Thumb both pc and code are offset by 1 indicating the Thumb state. - */ - return code <= pc && pc <= code + GetCodeSize(reinterpret_cast<const void*>(code)); - } - friend struct art::ArtMethodOffsets; // for verifying offset information DISALLOW_IMPLICIT_CONSTRUCTORS(ArtMethod); }; |