summaryrefslogtreecommitdiffstats
path: root/runtime/jit
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2018-03-08 10:56:09 +0000
committerNicolas Geoffray <ngeoffray@google.com>2018-03-08 14:01:54 +0000
commit34088e16c93f482c251e55351022762760500b63 (patch)
tree5b26a3263e8f8ddecd5004783129784359cd4858 /runtime/jit
parent04bd682576416ef7c3bfb0ab6a74ec60beac724b (diff)
downloadart-34088e16c93f482c251e55351022762760500b63.tar.gz
art-34088e16c93f482c251e55351022762760500b63.tar.bz2
art-34088e16c93f482c251e55351022762760500b63.zip
Don't do a read barrier in JIT GC code.
The ArtMethod the JIT GC iterates over might be in the process of being unloaded. bug: 74369794 Test: test.py --jit Test: test-art-host-run-test-debug-no-prebuild-jit-no-relocate-ntrace-cms-checkjni-picimage-npictest-ndebuggable-no-jvmti-cdex-fast-674-hiddenapi64 Change-Id: Ibf8acb0df26f90c479420ef9d0c1b1bc1fcd3b0d
Diffstat (limited to 'runtime/jit')
-rw-r--r--runtime/jit/jit_code_cache.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 0941b0beb3..b2d58da80e 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -671,7 +671,11 @@ void JitCodeCache::CopyInlineCacheInto(const InlineCache& ic,
static void ClearMethodCounter(ArtMethod* method, bool was_warm) {
if (was_warm) {
- method->SetPreviouslyWarm();
+ // Don't do any read barrier, as the declaring class of `method` may
+ // be in the process of being GC'ed (reading the declaring class is done
+ // when DCHECKing the declaring class is resolved, which we know it is
+ // at this point).
+ method->SetPreviouslyWarm<kWithoutReadBarrier>();
}
// We reset the counter to 1 so that the profile knows that the method was executed at least once.
// This is required for layout purposes.