summaryrefslogtreecommitdiff
path: root/runtime/jit/jit_code_cache.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2018-07-18 17:26:45 +0100
committer Vladimir Marko <vmarko@google.com> 2018-07-19 16:23:48 +0100
commitc945e0d410ca8d4e9ba09272e8727a3192f1e449 (patch)
treeb010aeed33bb66bbaf9af355f21dfad2f9232dea /runtime/jit/jit_code_cache.cc
parentd93e374e273dd45f5d829399da1d4201bf46057e (diff)
Remove ArtMethod's declaring class state checks.
This check was not very useful because the Class is already in a state to pass the check when we're constructing the ArtMethod and it can never revert to an earlier state, so the check is essentially a weak protection against GC bugs. Besides not being very useful, the check had the ability to invalidate ObjPtr<> cookies (when called in non-runnable state), making it difficult to fully ObjPtr<>-ify the code. Also remove a lot of kReadBarrierOption template parameters which were needed specifically for this check. This removes unnecessary maintence burden as shown by past bugs dealing with carefully adding those parameters where necessary. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Bug: 74373650 Bug: 31113334 Change-Id: I87f2999fc4e7c27b5c2307139269b4b5f6649d16
Diffstat (limited to 'runtime/jit/jit_code_cache.cc')
-rw-r--r--runtime/jit/jit_code_cache.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/runtime/jit/jit_code_cache.cc b/runtime/jit/jit_code_cache.cc
index 70a717154b..9d8dab4b0e 100644
--- a/runtime/jit/jit_code_cache.cc
+++ b/runtime/jit/jit_code_cache.cc
@@ -759,11 +759,7 @@ void JitCodeCache::CopyInlineCacheInto(const InlineCache& ic,
static void ClearMethodCounter(ArtMethod* method, bool was_warm) {
if (was_warm) {
- // 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>();
+ method->SetPreviouslyWarm();
}
// 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.