summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.h
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2017-02-06 11:00:40 -0800
committerMathieu Chartier <mathieuc@google.com>2017-02-08 09:51:27 -0800
commit575d3e60c68b5cf481b615dde4a16283507b19ed (patch)
tree4718f2747233e74268de21d804df9bfe0b7e4362 /compiler/optimizing/stack_map_stream.h
parent857acf51fbc5a931939c20e9e299c69676baf654 (diff)
Clean up code info table layout
Previously: Table layout was computed multiple places like stack_map_stream, and getters. This made it difficult to add new stack map tables and made the code hard to understand. This change makes the table layout specified all inside of the code info. Updating the layout only requires changing ComputeTableOffsets. Changed the stack map inline info offset to be an index, so that it is not require the inline infos are directly after the dex register table. Oat file size for a large app: 94459576 -> 93882040 (-0.61%) Updated oatdump and fixed a bug that was incorrectly computing the register mask bytes. Bug: 34621054 Test: test-art-host Change-Id: I3a7f141e09d5a18bce2bc6c9439835244a22016e
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
-rw-r--r--compiler/optimizing/stack_map_stream.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index b1069a17be..08c1d3e3c0 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -79,13 +79,6 @@ class StackMapStream : public ValueObject {
current_entry_(),
current_inline_info_(),
code_info_encoding_(allocator->Adapter(kArenaAllocStackMapStream)),
- inline_info_size_(0),
- dex_register_maps_size_(0),
- stack_maps_size_(0),
- dex_register_location_catalog_size_(0),
- dex_register_location_catalog_start_(0),
- dex_register_maps_start_(0),
- inline_infos_start_(0),
needed_size_(0),
current_dex_register_(0),
in_inline_frame_(false) {
@@ -160,7 +153,8 @@ class StackMapStream : public ValueObject {
size_t ComputeDexRegisterMapSize(uint32_t num_dex_registers,
const BitVector* live_dex_registers_mask) const;
size_t ComputeDexRegisterMapsSize() const;
- void ComputeInlineInfoEncoding();
+ void ComputeInlineInfoEncoding(InlineInfoEncoding* encoding,
+ size_t dex_register_maps_bytes);
CodeOffset ComputeMaxNativePcCodeOffset() const;
@@ -214,16 +208,7 @@ class StackMapStream : public ValueObject {
StackMapEntry current_entry_;
InlineInfoEntry current_inline_info_;
- StackMapEncoding stack_map_encoding_;
- InlineInfoEncoding inline_info_encoding_;
ArenaVector<uint8_t> code_info_encoding_;
- size_t inline_info_size_;
- size_t dex_register_maps_size_;
- size_t stack_maps_size_;
- size_t dex_register_location_catalog_size_;
- size_t dex_register_location_catalog_start_;
- size_t dex_register_maps_start_;
- size_t inline_infos_start_;
size_t needed_size_;
uint32_t current_dex_register_;
bool in_inline_frame_;