diff options
author | 2019-05-30 22:45:40 +0100 | |
---|---|---|
committer | 2019-06-30 18:04:44 +0000 | |
commit | 0d4567f26701abae84b02389c379843c1dc851a8 (patch) | |
tree | f665e6d5db5af79a4afa3b97cd7cdb7a2069da3f /runtime/oat_quick_method_header.cc | |
parent | cc08c50948d8b2a93b53a327717c7b2a146ac754 (diff) |
Stack maps: Refactor constructors.
Create dedicated static methods instead of passing flags.
This creates dedicated methods for the purpose and merges
constructor and decoding into single optimized method.
This speeds up CodeInfo by 10%, and maps startup by 0.1%.
Test: ./art/test.py -b --host
Change-Id: Ic7d43e22bca0be9fb13bc2c7544ebfdf46798cfe
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 3ed2a91be6..7f473984cc 100644 --- a/runtime/oat_quick_method_header.cc +++ b/runtime/oat_quick_method_header.cc @@ -33,7 +33,7 @@ uint32_t OatQuickMethodHeader::ToDexPc(ArtMethod* method, return dex::kDexNoIndex; } else { DCHECK(IsOptimized()); - CodeInfo code_info(this, CodeInfo::DecodeFlags::InlineInfoOnly); + CodeInfo code_info = CodeInfo::DecodeInlineInfoOnly(this); StackMap stack_map = code_info.GetStackMapForNativePcOffset(sought_offset); if (stack_map.IsValid()) { return stack_map.GetDexPc(); @@ -58,7 +58,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::DecodeFlags::InlineInfoOnly); + CodeInfo code_info = CodeInfo::DecodeInlineInfoOnly(this); // 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 |