summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2018-04-26 15:42:54 +0100
committer David Srbecky <dsrbecky@google.com> 2018-05-21 20:28:41 +0100
commit052f8ca1776ed7deb4f036498edd69eb6a1b942f (patch)
treeae993f1a634b258e124df12663a1d24859917b05 /runtime/entrypoints/entrypoint_utils.cc
parent1c515f0b9d621869a2e67ce5e0f5532d0f2f323a (diff)
Rewrite stackmap encoding code.
Remove most of the code related to handling of bit encodings. The design is still same; the encodings are just more implicit. Most of the complexity is replaced with a single BitTable class, which is a generic purpose table of tightly bit-packed integers. It has its own header which stores the bit-encoding of columns, and that removes the need to handle the encodings explicitly. Other classes, like StackMap, are accessors into the BitTable, with named getter methods for the individual columns. This CL saves ~1% of .oat file size (~4% of stackmap size). Test: test-art-host-gtest Change-Id: I7e92683753b0cc376300e3b23d892feac3670890
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 7fc8db375b..91faa40df9 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -201,18 +201,16 @@ static inline ArtMethod* DoGetCalleeSaveMethodCaller(ArtMethod* outer_method,
DCHECK(current_code != nullptr);
DCHECK(current_code->IsOptimized());
uintptr_t native_pc_offset = current_code->NativeQuickPcOffset(caller_pc);
- CodeInfo code_info = current_code->GetOptimizedCodeInfo();
+ CodeInfo code_info(current_code);
MethodInfo method_info = current_code->GetOptimizedMethodInfo();
- CodeInfoEncoding encoding = code_info.ExtractEncoding();
- StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset, encoding);
+ StackMap stack_map = code_info.GetStackMapForNativePcOffset(native_pc_offset);
DCHECK(stack_map.IsValid());
- if (stack_map.HasInlineInfo(encoding.stack_map.encoding)) {
- InlineInfo inline_info = code_info.GetInlineInfoOf(stack_map, encoding);
+ if (stack_map.HasInlineInfo()) {
+ InlineInfo inline_info = code_info.GetInlineInfoOf(stack_map);
caller = GetResolvedMethod(outer_method,
method_info,
inline_info,
- encoding.inline_info.encoding,
- inline_info.GetDepth(encoding.inline_info.encoding) - 1);
+ inline_info.GetDepth() - 1);
}
}
if (kIsDebugBuild && do_caller_check) {