Use bit-level packing for InlineInfo in stackmaps as well.
Use the same approach as we do for stackmaps to reduce the size.
It saves 4.0 MB from non-debuggable boot.oat (AOSP).
It does not affect debuggable boot.oat.
It saves 3.6 MB (of 96.6 MB) from /system/framework/arm/ (GOOG).
It saves 0.6 MB (of 26.7 MB) from /system/framework/oat/arm/ (GOOG).
Field loads from inline-info get around 5% slower.
(based on the time it takes to load all inline-infos from boot.oat)
Change-Id: I67b0fa5eef74c1fdb013680d0231fd44ea696176
diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h
index b686748..41f72f5 100644
--- a/compiler/optimizing/stack_map_stream.h
+++ b/compiler/optimizing/stack_map_stream.h
@@ -156,7 +156,7 @@
size_t ComputeDexRegisterMapSize(uint32_t num_dex_registers,
const BitVector* live_dex_registers_mask) const;
size_t ComputeDexRegisterMapsSize() const;
- size_t ComputeInlineInfoSize() const;
+ void ComputeInlineInfoEncoding();
// Returns the index of an entry with the same dex register map as the current_entry,
// or kNoSameDexMapFound if no such entry exists.
@@ -200,6 +200,7 @@
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_;