From 524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 16 Oct 2015 17:13:34 +0100 Subject: Remove ArtCode. - Instead use OatQuickMethodHeader. - Various cleanups now that we don't have all those ArtMethod -> ArtCode -> OatQuickMethodHeader indirections. As a consequence of this cleanup, exception handling got a bit faster. ParserCombinators benchmark (exception intensive) on x64: (lower is better) Before: ParserCombinators(RunTime): 1062500.0 us. After: ParserCombinators(RunTime): 833000.0 us. Change-Id: Idac917b6f1b0dc254ad68fb3781cd61bccadb0f3 --- runtime/fault_handler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/fault_handler.cc') diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc index 5b31b3aa4b..52ccbeeca0 100644 --- a/runtime/fault_handler.cc +++ b/runtime/fault_handler.cc @@ -20,10 +20,10 @@ #include #include -#include "art_code.h" #include "art_method-inl.h" #include "base/stl_util.h" #include "mirror/class.h" +#include "oat_quick_method_header.h" #include "sigchain.h" #include "thread-inl.h" #include "verify_object-inl.h" @@ -360,17 +360,17 @@ bool FaultManager::IsInGeneratedCode(siginfo_t* siginfo, void* context, bool che return false; } - ArtCode art_code(method_obj); + const OatQuickMethodHeader* method_header = method_obj->GetOatQuickMethodHeader(return_pc); // We can be certain that this is a method now. Check if we have a GC map // at the return PC address. if (true || kIsDebugBuild) { VLOG(signals) << "looking for dex pc for return pc " << std::hex << return_pc; uint32_t sought_offset = return_pc - - reinterpret_cast(art_code.GetQuickOatEntryPoint(sizeof(void*))); + reinterpret_cast(method_header->GetEntryPoint()); VLOG(signals) << "pc offset: " << std::hex << sought_offset; } - uint32_t dexpc = art_code.ToDexPc(return_pc, false); + uint32_t dexpc = method_header->ToDexPc(method_obj, return_pc, false); VLOG(signals) << "dexpc: " << dexpc; return !check_dex_pc || dexpc != DexFile::kDexNoIndex; } -- cgit v1.2.3-59-g8ed1b