summaryrefslogtreecommitdiff
path: root/runtime/fault_handler.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-10-16 17:13:34 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-10-20 11:52:11 +0100
commit524e7ea8cd17bad17bd9f3e0ccbb19ad0d4d9c02 (patch)
treead07cc96f633bdae839ff2f1553d84b9c864a930 /runtime/fault_handler.cc
parentb697c447eb61c2e14315166ec3b0d16375ae403c (diff)
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
Diffstat (limited to 'runtime/fault_handler.cc')
-rw-r--r--runtime/fault_handler.cc8
1 files changed, 4 insertions, 4 deletions
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 <sys/mman.h>
#include <sys/ucontext.h>
-#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<uintptr_t>(art_code.GetQuickOatEntryPoint(sizeof(void*)));
+ reinterpret_cast<uintptr_t>(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;
}