Jit-zygote compiled code isn't debuggable
We check the debuggablity of compiled code by checking to see if it
was compiled by the JIT. This works since we throw all precompiled
code out when transitioning to debuggable. Unfortunately with
jit-zygote the non-debuggable zygote methods can be incorrectly seen
as debuggable when encountered on the stack. This can lead to
incorrect deoptimization and other issues. To fix this we explicitly
exclude jit-zygote code from the check.
Bug: 144947842
Test: ./test.py --host
Change-Id: I4e953f64f8261b7a16d7c3199cec89998af0c1cf
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 22b43cc..d8216d2 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -225,6 +225,9 @@
// Return true if the code cache contains this pc.
bool ContainsPc(const void* pc) const;
+ // Return true if the code cache contains this pc in the private region (i.e. not from zygote).
+ bool PrivateRegionContainsPc(const void* pc) const;
+
// Returns true if either the method's entrypoint is JIT compiled code or it is the
// instrumentation entrypoint and we can jump to jit code for this method. For testing use only.
bool WillExecuteJitCode(ArtMethod* method) REQUIRES(!Locks::jit_lock_);