summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2019-06-19 10:00:00 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2019-06-26 12:24:15 +0000
commit05f87217ddc9b4b9186710c0135b918f456c5aef (patch)
tree6e7bc0d2a3d8faa94c303d7d753319f3850fadcd /runtime/jit/jit_code_cache.h
parent8d335b61d637fa9b040eb9d559dbac98067467f1 (diff)
Make the JIT zygote memory shared.
Test: boots Bug: 119800099 Change-Id: I75ff8a58eea4de5cb833139641b4e15b8394d9b1
Diffstat (limited to 'runtime/jit/jit_code_cache.h')
-rw-r--r--runtime/jit/jit_code_cache.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index a4e2964499..a777ab740f 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -96,7 +96,11 @@ class JitCodeCache {
std::string* error_msg);
~JitCodeCache();
- bool NotifyCompilationOf(ArtMethod* method, Thread* self, bool osr, bool prejit)
+ bool NotifyCompilationOf(ArtMethod* method,
+ Thread* self,
+ bool osr,
+ bool prejit,
+ JitMemoryRegion* region)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(!Locks::jit_lock_);
@@ -213,7 +217,7 @@ class JitCodeCache {
REQUIRES_SHARED(Locks::mutator_lock_);
bool OwnsSpace(const void* mspace) const NO_THREAD_SAFETY_ANALYSIS {
- return private_region_.OwnsSpace(mspace);
+ return private_region_.OwnsSpace(mspace) || shared_region_.OwnsSpace(mspace);
}
void* MoreCore(const void* mspace, intptr_t increment);
@@ -276,7 +280,8 @@ class JitCodeCache {
// is debuggable.
void ClearEntryPointsInZygoteExecSpace() REQUIRES(!Locks::jit_lock_) REQUIRES(Locks::mutator_lock_);
- JitMemoryRegion* GetPrivateRegion() { return &private_region_; }
+ JitMemoryRegion* GetCurrentRegion();
+ bool IsSharedRegion(const JitMemoryRegion& region) const { return &region == &shared_region_; }
private:
JitCodeCache();