Commit afdd4ce4 authored by Mathieu Chartier's avatar Mathieu Chartier Committed by Gerrit Code Review
Browse files

Merge "Various improvements to stack walking speed"

parents 64d324df 90c5a9b8
......@@ -374,9 +374,10 @@ inline mirror::DexCache* ArtMethod::GetDexCache() {
}
}
template<ReadBarrierOption kReadBarrierOption>
inline bool ArtMethod::IsProxyMethod() {
return GetDeclaringClass<kReadBarrierOption>()->IsProxyClass();
// Avoid read barrier since the from-space version of the class will have the correct proxy class
// flags since they are constant for the lifetime of the class.
return GetDeclaringClass<kWithoutReadBarrier>()->IsProxyClass();
}
inline ArtMethod* ArtMethod::GetInterfaceMethodIfProxy(PointerSize pointer_size) {
......
......@@ -251,7 +251,6 @@ class ArtMethod FINAL {
return (GetAccessFlags() & kAccVarargs) != 0;
}
template<ReadBarrierOption kReadBarrierOption = kWithReadBarrier>
bool IsProxyMethod() REQUIRES_SHARED(Locks::mutator_lock_);
bool SkipAccessChecks() {
......
......@@ -26,7 +26,7 @@ namespace art {
class BitMemoryRegion FINAL : public ValueObject {
public:
BitMemoryRegion() = default;
BitMemoryRegion(MemoryRegion region, size_t bit_offset, size_t bit_size) {
ALWAYS_INLINE BitMemoryRegion(MemoryRegion region, size_t bit_offset, size_t bit_size) {
bit_start_ = bit_offset % kBitsPerByte;
const size_t start = bit_offset / kBitsPerByte;
const size_t end = (bit_offset + bit_size + kBitsPerByte - 1) / kBitsPerByte;
......
......@@ -233,7 +233,7 @@ template<ReadBarrierOption kReadBarrierOption>
ArtMethod* ClassLinker::FindMethodForProxy(ObjPtr<mirror::Class> proxy_class,
ArtMethod* proxy_method) {
DCHECK(proxy_class->IsProxyClass());
DCHECK(proxy_method->IsProxyMethod<kReadBarrierOption>());
DCHECK(proxy_method->IsProxyMethod());
{
Thread* const self = Thread::Current();
ReaderMutexLock mu(self, *Locks::dex_lock_);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment