summaryrefslogtreecommitdiff
path: root/runtime/stack_map.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-01-19 14:48:48 -0800
committer Mathieu Chartier <mathieuc@google.com> 2017-01-20 15:47:06 -0800
commita2f526f889be06f96ea59624c9dfb1223b3839f3 (patch)
tree769f517e6664de0e89abeadf07a39d5410fcee42 /runtime/stack_map.cc
parent64e50021845b1ad9d8851596e8aaddf18be217c2 (diff)
Compressed native PC for stack maps
Compress native PC based on instruction alignment. This reduces the size of stack maps, boot.oat is 0.4% smaller for arm64. Test: test-art-host, test-art-target, N6P booting Change-Id: I2b70eecabda88b06fa80a85688fd992070d54278
Diffstat (limited to 'runtime/stack_map.cc')
-rw-r--r--runtime/stack_map.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/stack_map.cc b/runtime/stack_map.cc
index 9ebf9a7bdd..3c92b86208 100644
--- a/runtime/stack_map.cc
+++ b/runtime/stack_map.cc
@@ -116,7 +116,8 @@ void InlineInfoEncoding::Dump(VariableIndentationOutputStream* vios) const {
void CodeInfo::Dump(VariableIndentationOutputStream* vios,
uint32_t code_offset,
uint16_t number_of_dex_registers,
- bool dump_stack_maps) const {
+ bool dump_stack_maps,
+ InstructionSet instruction_set) const {
CodeInfoEncoding encoding = ExtractEncoding();
size_t number_of_stack_maps = GetNumberOfStackMaps(encoding);
vios->Stream()
@@ -139,6 +140,7 @@ void CodeInfo::Dump(VariableIndentationOutputStream* vios,
encoding,
code_offset,
number_of_dex_registers,
+ instruction_set,
" " + std::to_string(i));
}
}
@@ -188,14 +190,16 @@ void StackMap::Dump(VariableIndentationOutputStream* vios,
const CodeInfoEncoding& encoding,
uint32_t code_offset,
uint16_t number_of_dex_registers,
+ InstructionSet instruction_set,
const std::string& header_suffix) const {
StackMapEncoding stack_map_encoding = encoding.stack_map_encoding;
+ const uint32_t pc_offset = GetNativePcOffset(stack_map_encoding, instruction_set);
vios->Stream()
<< "StackMap" << header_suffix
<< std::hex
- << " [native_pc=0x" << code_offset + GetNativePcOffset(stack_map_encoding) << "]"
+ << " [native_pc=0x" << code_offset + pc_offset << "]"
<< " (dex_pc=0x" << GetDexPc(stack_map_encoding)
- << ", native_pc_offset=0x" << GetNativePcOffset(stack_map_encoding)
+ << ", native_pc_offset=0x" << pc_offset
<< ", dex_register_map_offset=0x" << GetDexRegisterMapOffset(stack_map_encoding)
<< ", inline_info_offset=0x" << GetInlineDescriptorOffset(stack_map_encoding)
<< ", register_mask=0x" << GetRegisterMask(stack_map_encoding)