diff options
author | 2018-07-25 21:45:54 +0100 | |
---|---|---|
committer | 2018-07-26 11:45:54 +0100 | |
commit | 6ee06e97cef5ee92944deaeba0da4d10c4c33a2a (patch) | |
tree | 77d69c85d37864b4d3ee970be4b7fd1246adee7b /runtime/oat_quick_method_header.cc | |
parent | f5dcd31d89282b6c9324fdc960e6e7e2281c16f1 (diff) |
Decode only the needed tables from CodeInfo.
Most use cases need only the first two bit tables from CodeInfo.
Add flag to the decode method so that only those two are loaded.
We only touched the table header but that still made difference.
This speeds up pmd by over 10%.
Test: test-art-host-gtest
Change-Id: I7740081bf18205dd69864503b5bcec7de5e1a901
Diffstat (limited to 'runtime/oat_quick_method_header.cc')
-rw-r--r-- | runtime/oat_quick_method_header.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/oat_quick_method_header.cc b/runtime/oat_quick_method_header.cc index 0b239c1919..79c3ad6b45 100644 --- a/runtime/oat_quick_method_header.cc +++ b/runtime/oat_quick_method_header.cc @@ -44,7 +44,7 @@ uint32_t OatQuickMethodHeader::ToDexPc(ArtMethod* method, return dex::kDexNoIndex; } else { DCHECK(IsOptimized()); - CodeInfo code_info(this); + CodeInfo code_info(this, CodeInfo::DecodeFlags::InlineInfoOnly); StackMap stack_map = code_info.GetStackMapForNativePcOffset(sought_offset); if (stack_map.IsValid()) { return stack_map.GetDexPc(); @@ -69,7 +69,7 @@ uintptr_t OatQuickMethodHeader::ToNativeQuickPc(ArtMethod* method, DCHECK(!method->IsNative()); DCHECK(IsOptimized()); // Search for the dex-to-pc mapping in stack maps. - CodeInfo code_info(this); + CodeInfo code_info(this, CodeInfo::DecodeFlags::InlineInfoOnly); // All stack maps are stored in the same CodeItem section, safepoint stack // maps first, then catch stack maps. We use `is_for_catch_handler` to select |