diff options
author | 2014-07-16 16:04:32 -0700 | |
---|---|---|
committer | 2014-08-07 09:26:35 -0700 | |
commit | dfd3b47813c14c5f1607cbe7b10a28b1b2f29cbc (patch) | |
tree | b71dbae2ef905c08eb4cf615c8b44868cc314531 /runtime/fault_handler.h | |
parent | 8b62dc0f993d0445401655fc274e5225498fa81c (diff) |
Add implicit checks for x86_64 architecture.
This combines the x86 and x86_64 fault handlers into one. It also
merges in the change to the entrypoints for X86_64.
Replaces generic instruction length calculator with one that only
works with the specific instructions we use.
Bug: 16256184
Change-Id: I1e8ab5ad43f46060de9597615b423c89a836035c
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
Diffstat (limited to 'runtime/fault_handler.h')
-rw-r--r-- | runtime/fault_handler.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/fault_handler.h b/runtime/fault_handler.h index 71c99771cd..1acd0247e8 100644 --- a/runtime/fault_handler.h +++ b/runtime/fault_handler.h @@ -43,8 +43,14 @@ class FaultManager { void HandleFault(int sig, siginfo_t* info, void* context); void AddHandler(FaultHandler* handler, bool generated_code); void RemoveHandler(FaultHandler* handler); - void GetMethodAndReturnPCAndSP(siginfo_t* siginfo, void* context, mirror::ArtMethod** out_method, - uintptr_t* out_return_pc, uintptr_t* out_sp); + + // Note that the following two functions are called in the context of a signal handler. + // The IsInGeneratedCode() function checks that the mutator lock is held before it + // calls GetMethodAndReturnPCAndSP(). + // TODO: think about adding lock assertions and fake lock and unlock functions. + void GetMethodAndReturnPcAndSp(siginfo_t* siginfo, void* context, mirror::ArtMethod** out_method, + uintptr_t* out_return_pc, uintptr_t* out_sp) + NO_THREAD_SAFETY_ANALYSIS; bool IsInGeneratedCode(siginfo_t* siginfo, void *context, bool check_dex_pc) NO_THREAD_SAFETY_ANALYSIS; |