summaryrefslogtreecommitdiffstats
path: root/runtime/runtime_callbacks.cc
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2018-04-02 11:28:50 -0700
committerAlex Light <allight@google.com>2018-04-03 15:51:41 +0000
commitf28586390b055a5681e50617d729a3fa09792d9c (patch)
treef213a9d41709dea55d2c0a9014423ac27d04e952 /runtime/runtime_callbacks.cc
parent30a2d9c61da75359dee4ce90236d19fc6341b07a (diff)
downloadart-f28586390b055a5681e50617d729a3fa09792d9c.tar.gz
art-f28586390b055a5681e50617d729a3fa09792d9c.tar.bz2
art-f28586390b055a5681e50617d729a3fa09792d9c.zip
Revert^6 "Ensure that OSR still is possible with jvmti"
The instrumentation uninstall could set methods to non-debuggable boot.oat code. This could cause events to be missed due to methods being inlined. We needed to change the path so that we would only have the JIT/interpreter replace methods. We do this by adding a new callback that can be used to determine if a method needs to be debuggable and being more careful about replacing code when this is true. This reverts commit 5f3005c8844d851d7d218b88b5f90d6c9083ce24. This unreverts commit b9ad26d1ed9146b89555d4333021f44eeb831f05. Reason for revert: Fixed issue causing CTS version of test 993 failure. Test: cts-tradefed run cts-dev CtsJvmtiRunTest993HostTestCases Test: ./test.py --host -j50 --all -t 993 Test: ./test.py --host Test: while ./test/run-test --host --jit 1935; do; done Test: while ./test/run-test --host --jit --jvmti-redefine-stress 1935; do; done Test: am start --attach-agent -n com.example.android.displayingbitmaps/.ui.ImageGridActivity Run blur filter. Bug: 76226464 Bug: 77306669 Change-Id: I5068201a03f7613787c66981405499b6499c24e1
Diffstat (limited to 'runtime/runtime_callbacks.cc')
-rw-r--r--runtime/runtime_callbacks.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/runtime_callbacks.cc b/runtime/runtime_callbacks.cc
index cd3c0b7c88..758917cf7e 100644
--- a/runtime/runtime_callbacks.cc
+++ b/runtime/runtime_callbacks.cc
@@ -106,6 +106,15 @@ bool RuntimeCallbacks::IsMethodBeingInspected(ArtMethod* m) {
return false;
}
+bool RuntimeCallbacks::MethodNeedsDebugVersion(ArtMethod* m) {
+ for (MethodInspectionCallback* cb : method_inspection_callbacks_) {
+ if (cb->MethodNeedsDebugVersion(m)) {
+ return true;
+ }
+ }
+ return false;
+}
+
void RuntimeCallbacks::AddThreadLifecycleCallback(ThreadLifecycleCallback* cb) {
thread_callbacks_.push_back(cb);
}