summaryrefslogtreecommitdiff
path: root/oatdump/oatdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'oatdump/oatdump.cc')
-rw-r--r--oatdump/oatdump.cc66
1 files changed, 32 insertions, 34 deletions
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index 69901c13cd..0f02da77a1 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -589,16 +589,17 @@ class OatDumper {
kByteKindCodeInfoInlineInfo,
kByteKindCodeInfoEncoding,
kByteKindCodeInfoOther,
+ kByteKindCodeInfoStackMasks,
+ kByteKindCodeInfoRegisterMasks,
kByteKindStackMapNativePc,
kByteKindStackMapDexPc,
kByteKindStackMapDexRegisterMap,
kByteKindStackMapInlineInfo,
- kByteKindStackMapRegisterMask,
- kByteKindStackMapMask,
- kByteKindStackMapOther,
+ kByteKindStackMapRegisterMaskIndex,
+ kByteKindStackMapStackMaskIndex,
kByteKindCount,
kByteKindStackMapFirst = kByteKindCodeInfoOther,
- kByteKindStackMapLast = kByteKindStackMapOther,
+ kByteKindStackMapLast = kByteKindStackMapStackMaskIndex,
};
int64_t bits[kByteKindCount] = {};
// Since code has deduplication, seen tracks already seen pointers to avoid double counting
@@ -626,48 +627,45 @@ class OatDumper {
const int64_t stack_map_bits = std::accumulate(bits + kByteKindStackMapFirst,
bits + kByteKindStackMapLast + 1,
0u);
- Dump(os, "Code ", bits[kByteKindCode], sum);
- Dump(os, "QuickMethodHeader ", bits[kByteKindQuickMethodHeader], sum);
- Dump(os, "CodeInfoEncoding ", bits[kByteKindCodeInfoEncoding], sum);
- Dump(os, "CodeInfoLocationCatalog ", bits[kByteKindCodeInfoLocationCatalog], sum);
- Dump(os, "CodeInfoDexRegisterMap ", bits[kByteKindCodeInfoDexRegisterMap], sum);
- Dump(os, "CodeInfoInlineInfo ", bits[kByteKindCodeInfoInlineInfo], sum);
- Dump(os, "CodeInfoStackMap ", stack_map_bits, sum);
+ Dump(os, "Code ", bits[kByteKindCode], sum);
+ Dump(os, "QuickMethodHeader ", bits[kByteKindQuickMethodHeader], sum);
+ Dump(os, "CodeInfoEncoding ", bits[kByteKindCodeInfoEncoding], sum);
+ Dump(os, "CodeInfoLocationCatalog ", bits[kByteKindCodeInfoLocationCatalog], sum);
+ Dump(os, "CodeInfoDexRegisterMap ", bits[kByteKindCodeInfoDexRegisterMap], sum);
+ Dump(os, "CodeInfoInlineInfo ", bits[kByteKindCodeInfoInlineInfo], sum);
+ Dump(os, "CodeInfoStackMasks ", bits[kByteKindCodeInfoStackMasks], sum);
+ Dump(os, "CodeInfoRegisterMasks ", bits[kByteKindCodeInfoRegisterMasks], sum);
+ Dump(os, "CodeInfoStackMap ", stack_map_bits, sum);
{
ScopedIndentation indent1(&os);
Dump(os,
- "StackMapNativePc ",
+ "StackMapNativePc ",
bits[kByteKindStackMapNativePc],
stack_map_bits,
"stack map");
Dump(os,
- "StackMapDexPcEncoding ",
+ "StackMapDexPcEncoding ",
bits[kByteKindStackMapDexPc],
stack_map_bits,
"stack map");
Dump(os,
- "StackMapDexRegisterMap ",
+ "StackMapDexRegisterMap ",
bits[kByteKindStackMapDexRegisterMap],
stack_map_bits,
"stack map");
Dump(os,
- "StackMapInlineInfo ",
+ "StackMapInlineInfo ",
bits[kByteKindStackMapInlineInfo],
stack_map_bits,
"stack map");
Dump(os,
- "StackMapRegisterMaskEncoding ",
- bits[kByteKindStackMapRegisterMask],
+ "StackMapRegisterMaskIndex ",
+ bits[kByteKindStackMapRegisterMaskIndex],
stack_map_bits,
"stack map");
Dump(os,
- "StackMapMask ",
- bits[kByteKindStackMapMask],
- stack_map_bits,
- "stack map");
- Dump(os,
- "StackMapOther ",
- bits[kByteKindStackMapOther],
+ "StackMapStackMaskIndex ",
+ bits[kByteKindStackMapStackMaskIndex],
stack_map_bits,
"stack map");
}
@@ -1573,18 +1571,18 @@ class OatDumper {
Stats::kByteKindStackMapInlineInfo,
stack_map_encoding.GetInlineInfoEncoding().BitSize() * num_stack_maps);
stats_.AddBits(
- Stats::kByteKindStackMapRegisterMask,
- stack_map_encoding.GetRegisterMaskEncoding().BitSize() * num_stack_maps);
- const size_t stack_mask_bits = encoding.stack_map_size_in_bytes * kBitsPerByte -
- stack_map_encoding.GetStackMaskBitOffset();
+ Stats::kByteKindStackMapRegisterMaskIndex,
+ stack_map_encoding.GetRegisterMaskIndexEncoding().BitSize() * num_stack_maps);
+ stats_.AddBits(
+ Stats::kByteKindStackMapStackMaskIndex,
+ stack_map_encoding.GetStackMaskIndexEncoding().BitSize() * num_stack_maps);
stats_.AddBits(
- Stats::kByteKindStackMapMask,
- stack_mask_bits * num_stack_maps);
- const size_t stack_map_bits =
- stack_map_encoding.GetStackMaskBitOffset() + stack_mask_bits;
+ Stats::kByteKindCodeInfoStackMasks,
+ helper.GetCodeInfo().GetNumberOfStackMaskBits(encoding) *
+ encoding.number_of_stack_masks);
stats_.AddBits(
- Stats::kByteKindStackMapOther,
- (encoding.stack_map_size_in_bytes * kBitsPerByte - stack_map_bits) * num_stack_maps);
+ Stats::kByteKindCodeInfoRegisterMasks,
+ encoding.register_mask_size_in_bits * encoding.number_of_stack_masks);
const size_t stack_map_bytes = helper.GetCodeInfo().GetStackMapsSize(encoding);
const size_t location_catalog_bytes =
helper.GetCodeInfo().GetDexRegisterLocationCatalogSize(encoding);