diff options
author | 2019-04-10 11:40:01 +0100 | |
---|---|---|
committer | 2019-05-08 08:19:28 +0000 | |
commit | c6934e36d33ab402b7b51c78d46c319fc33e8ef3 (patch) | |
tree | cec68ac35886015369bca93d5987889552327ac6 /runtime/mirror/class-inl.h | |
parent | 552ba72fce139aa2b0a80d1a2b920c5e8fadaf58 (diff) |
Avoid some read barriers in ClassTable.
And clean up ClassTable.
Test: m test-art-host-gtest
Test: testrunner.py --host --interpreter
Bug: 119486698
Change-Id: Ie413bc5a56eb548352ae1fed0976b75c44e0c0d4
Diffstat (limited to 'runtime/mirror/class-inl.h')
-rw-r--r-- | runtime/mirror/class-inl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/mirror/class-inl.h b/runtime/mirror/class-inl.h index 3ee8bfe89b..992c8f3d0e 100644 --- a/runtime/mirror/class-inl.h +++ b/runtime/mirror/class-inl.h @@ -845,7 +845,10 @@ inline bool Class::DescriptorEquals(const char* match) { return false; } ++match; - klass = klass->GetComponentType(); + // No read barrier needed, we're reading a chain of constant references for comparison + // with null. Then we follow up below with reading constant references to read constant + // primitive data in both proxy and non-proxy paths. See ReadBarrierOption. + klass = klass->GetComponentType<kDefaultVerifyFlags, kWithoutReadBarrier>(); } if (klass->IsPrimitive()) { return strcmp(Primitive::Descriptor(klass->GetPrimitiveType()), match) == 0; |