diff options
| -rw-r--r-- | runtime/jit/jit_code_cache.cc | 8 | ||||
| -rw-r--r-- | runtime/jit/jit_code_cache.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc index 249a8b04fb..d8aa00c45e 100644 --- a/runtime/jit/jit_code_cache.cc +++ b/runtime/jit/jit_code_cache.cc @@ -563,7 +563,7 @@ void JitCodeCache::SweepRootTables(IsMarkedVisitor* visitor) { } } -void JitCodeCache::FreeCode(const void* code_ptr) { +void JitCodeCache::FreeCodeAndData(const void* code_ptr) { uintptr_t allocation = FromCodeToAllocation(code_ptr); // Notify native debugger that we are about to remove the code. // It does nothing if we are not using native debugger. @@ -590,7 +590,7 @@ void JitCodeCache::FreeAllMethodHeaders( MutexLock mu(Thread::Current(), lock_); ScopedCodeCacheWrite scc(this); for (const OatQuickMethodHeader* method_header : method_headers) { - FreeCode(method_header->GetCode()); + FreeCodeAndData(method_header->GetCode()); } } @@ -916,7 +916,7 @@ bool JitCodeCache::RemoveMethodLocked(ArtMethod* method, bool release_memory) { in_cache = true; if (it->second.GetMethods().empty()) { if (release_memory) { - FreeCode(it->second.GetCode()); + FreeCodeAndData(it->second.GetCode()); } jni_stubs_map_.erase(it); } else { @@ -928,7 +928,7 @@ bool JitCodeCache::RemoveMethodLocked(ArtMethod* method, bool release_memory) { if (it->second == method) { in_cache = true; if (release_memory) { - FreeCode(it->first); + FreeCodeAndData(it->first); } it = method_code_map_.erase(it); } else { diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h index b10f57eff2..958e8e8aa2 100644 --- a/runtime/jit/jit_code_cache.h +++ b/runtime/jit/jit_code_cache.h @@ -317,8 +317,8 @@ class JitCodeCache { REQUIRES(lock_) REQUIRES(Locks::mutator_lock_); - // Free in the mspace allocations for `code_ptr`. - void FreeCode(const void* code_ptr) REQUIRES(lock_); + // Free code and data allocations for `code_ptr`. + void FreeCodeAndData(const void* code_ptr) REQUIRES(lock_); // Number of bytes allocated in the code cache. size_t CodeCacheSizeLocked() REQUIRES(lock_); @@ -357,10 +357,10 @@ class JitCodeCache { REQUIRES(lock_) REQUIRES_SHARED(Locks::mutator_lock_); - void FreeCode(uint8_t* code) REQUIRES(lock_); uint8_t* AllocateCode(size_t code_size) REQUIRES(lock_); - void FreeData(uint8_t* data) REQUIRES(lock_); + void FreeCode(uint8_t* code) REQUIRES(lock_); uint8_t* AllocateData(size_t data_size) REQUIRES(lock_); + void FreeData(uint8_t* data) REQUIRES(lock_); bool IsWeakAccessEnabled(Thread* self) const; void WaitUntilInlineCacheAccessible(Thread* self) |