summaryrefslogtreecommitdiff
path: root/runtime/runtime_callbacks.h
diff options
context:
space:
mode:
author android-build-team Robot <android-build-team-robot@google.com> 2018-04-05 07:23:24 +0000
committer android-build-team Robot <android-build-team-robot@google.com> 2018-04-05 07:23:24 +0000
commit406cfc2782cd6ba93a4162c066a0d13cbf4967a2 (patch)
tree14414421a47add577038a7cc60352effc262dfd1 /runtime/runtime_callbacks.h
parent1f07c426558d8019058d8825319091e1e2d6c55c (diff)
parent60af9c3a914c518f39d58a79a74a4ffdc4bdaa3a (diff)
Snap for 4701683 from 60af9c3a914c518f39d58a79a74a4ffdc4bdaa3a to pi-release
Change-Id: I75cb19465ec86c1ebb2aaa729a169155c1ad0a49
Diffstat (limited to 'runtime/runtime_callbacks.h')
-rw-r--r--runtime/runtime_callbacks.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/runtime_callbacks.h b/runtime/runtime_callbacks.h
index 24386ba14a..9f0410d102 100644
--- a/runtime/runtime_callbacks.h
+++ b/runtime/runtime_callbacks.h
@@ -130,6 +130,10 @@ class MethodInspectionCallback {
// Note that '!IsMethodSafeToJit(m) implies IsMethodBeingInspected(m)'. That is that if this
// method returns false IsMethodBeingInspected must return true.
virtual bool IsMethodSafeToJit(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_) = 0;
+
+ // Returns true if we expect the method to be debuggable but are not doing anything unusual with
+ // it currently.
+ virtual bool MethodNeedsDebugVersion(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_) = 0;
};
class RuntimeCallbacks {
@@ -198,6 +202,11 @@ class RuntimeCallbacks {
// entrypoint should not be changed to JITed code.
bool IsMethodSafeToJit(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_);
+ // Returns true if some MethodInspectionCallback indicates the method needs to use a debug
+ // version. This allows later code to set breakpoints or perform other actions that could be
+ // broken by some optimizations.
+ bool MethodNeedsDebugVersion(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_);
+
void AddMethodInspectionCallback(MethodInspectionCallback* cb)
REQUIRES_SHARED(Locks::mutator_lock_);
void RemoveMethodInspectionCallback(MethodInspectionCallback* cb)