Fix relation between debuggable / JIT zygote.
- Move the logic to clear precompiled in ClassLinker.
- Add a null check on entries in ZygoteMap
- Avoid doing JIT zygote actions (precompile, remapping boot images)
when debuggable.
Test: android.jdwptunnel.cts.JdwpTunnelTest#testAttachDebuggerToProfileableApp
Change-Id: I9b5e391bb35aa04bbeba01b9b563b33f96395d2e
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index f46dc75..1bbe2a4 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -403,6 +403,11 @@
return region->IsValid() && !IsSharedRegion(*region);
}
+ // Return whether the given `ptr` is in the zygote executable memory space.
+ bool IsInZygoteExecSpace(const void* ptr) const {
+ return shared_region_.IsInExecSpace(ptr);
+ }
+
private:
JitCodeCache();
@@ -480,10 +485,6 @@
return shared_region_.IsInDataSpace(ptr);
}
- bool IsInZygoteExecSpace(const void* ptr) const {
- return shared_region_.IsInExecSpace(ptr);
- }
-
bool IsWeakAccessEnabled(Thread* self) const;
void WaitUntilInlineCacheAccessible(Thread* self)
REQUIRES(!Locks::jit_lock_)