summaryrefslogtreecommitdiff
path: root/runtime/interpreter/interpreter_cache-inl.h
diff options
context:
space:
mode:
author Lokesh Gidra <lokeshgidra@google.com> 2022-05-18 04:52:24 +0000
committer Lokesh Gidra <lokeshgidra@google.com> 2022-08-10 18:06:05 +0000
commit1455bb566b7d8efc72c2e476733c8cf21ffd7247 (patch)
treebc52e4a37105810705942cd3c215457cb86b2c24 /runtime/interpreter/interpreter_cache-inl.h
parent65429ce9bcaf8779f5d6cd14aeee4acd60006095 (diff)
Enable using nterp interpreter with userfaultfd GC
Test: build module and install on device Bug: 160737021 Change-Id: Iee69e8d5b486a0b6d1ce49b8c5e09ab1727f8a6f
Diffstat (limited to 'runtime/interpreter/interpreter_cache-inl.h')
-rw-r--r--runtime/interpreter/interpreter_cache-inl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/interpreter/interpreter_cache-inl.h b/runtime/interpreter/interpreter_cache-inl.h
index 1dda78b0ab..269f5fa9ab 100644
--- a/runtime/interpreter/interpreter_cache-inl.h
+++ b/runtime/interpreter/interpreter_cache-inl.h
@@ -37,9 +37,9 @@ inline void InterpreterCache::Set(Thread* self, const void* key, size_t value) {
DCHECK(self->GetInterpreterCache() == this) << "Must be called from owning thread";
// For simplicity, only update the cache if weak ref accesses are enabled. If
- // they are disabled, this means the GC is processing the cache, and is
+ // they are disabled, this means the CC GC could be processing the cache, and
// reading it concurrently.
- if (gUseReadBarrier && self->GetWeakRefAccessEnabled()) {
+ if (!gUseReadBarrier || self->GetWeakRefAccessEnabled()) {
data_[IndexOf(key)] = Entry{key, value};
}
}