Put the deletion of profiling info under a GC critical section.
Otherwise the GC could see dangling pointers.
bug:30033802
(cherry picked from commit cf48fa030780c3185f225d558b704c396f7713cc)
Change-Id: I2c43e973878f50dc147aa0af81551ecc942a790d
diff --git a/runtime/jit/jit_code_cache.h b/runtime/jit/jit_code_cache.h
index 4df6762..6dc1578 100644
--- a/runtime/jit/jit_code_cache.h
+++ b/runtime/jit/jit_code_cache.h
@@ -255,8 +255,7 @@
SHARED_REQUIRES(Locks::mutator_lock_);
bool CheckLiveCompiledCodeHasProfilingInfo()
- REQUIRES(lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
+ REQUIRES(lock_);
void FreeCode(uint8_t* code) REQUIRES(lock_);
uint8_t* AllocateCode(size_t code_size) REQUIRES(lock_);