summaryrefslogtreecommitdiff
path: root/runtime/stack_map.h
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-01-24 01:02:48 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-01-24 01:02:49 +0000
commitbc5153409bd17453ccb0a9da15512177e2ff12bb (patch)
treebc570c39090028577738f81a596b929cec7c76dd /runtime/stack_map.h
parent67edcfdb2151af66cdacf61e44c618c41601d0c8 (diff)
parent5e7c6a9223ddd11f800ea9b26fa72bece5c7d26c (diff)
Merge "Add more code info size dumping to oatdump"
Diffstat (limited to 'runtime/stack_map.h')
-rw-r--r--runtime/stack_map.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h
index 28c4b88fb0..cd9a3f04cf 100644
--- a/runtime/stack_map.h
+++ b/runtime/stack_map.h
@@ -1182,6 +1182,17 @@ class CodeInfo {
}
}
+ size_t GetDexRegisterMapsSize(const CodeInfoEncoding& encoding,
+ uint32_t number_of_dex_registers) const {
+ size_t total = 0;
+ for (size_t i = 0, e = GetNumberOfStackMaps(encoding); i < e; ++i) {
+ StackMap stack_map = GetStackMapAt(i, encoding);
+ DexRegisterMap map(GetDexRegisterMapOf(stack_map, encoding, number_of_dex_registers));
+ total += map.Size();
+ }
+ return total;
+ }
+
// Return the `DexRegisterMap` pointed by `inline_info` at depth `depth`.
DexRegisterMap GetDexRegisterMapAtDepth(uint8_t depth,
InlineInfo inline_info,