From 6ee06e97cef5ee92944deaeba0da4d10c4c33a2a Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 25 Jul 2018 21:45:54 +0100 Subject: Decode only the needed tables from CodeInfo. Most use cases need only the first two bit tables from CodeInfo. Add flag to the decode method so that only those two are loaded. We only touched the table header but that still made difference. This speeds up pmd by over 10%. Test: test-art-host-gtest Change-Id: I7740081bf18205dd69864503b5bcec7de5e1a901 --- compiler/optimizing/stack_map_stream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/stack_map_stream.cc') diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc index d74d7b695c..da6c711659 100644 --- a/compiler/optimizing/stack_map_stream.cc +++ b/compiler/optimizing/stack_map_stream.cc @@ -310,9 +310,9 @@ size_t StackMapStream::PrepareForFillIn() { EncodeUnsignedLeb128(&out_, num_dex_registers_); BitMemoryWriter> out(&out_, out_.size() * kBitsPerByte); stack_maps_.Encode(out); + inline_infos_.Encode(out); register_masks_.Encode(out); stack_masks_.Encode(out); - inline_infos_.Encode(out); dex_register_masks_.Encode(out); dex_register_maps_.Encode(out); dex_register_catalog_.Encode(out); -- cgit v1.2.3-59-g8ed1b