From 71ec1cc0665cdb9d39f4fd284d68962020417a53 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Fri, 18 May 2018 15:57:25 +0100 Subject: Rewrite dex register map encoding in stackmaps. Simplify code by encoding dex register maps using BitTables. The overall design is unchanged (bitmask+indices+catalogue). This CL saves ~0.4% of .oat file size. The dex register map decoding is factor of 3 faster now (based on the time to verify the register maps on Arm). This is not too surprising as the old version was O(n^2). It also reduces compiler arena memory usage by 11% since the BitTableBuilder is more memory efficient, we store less intermediate data, and we deduplicate most data on the fly. Test: test-art-host-gtest-stack_map_test Change-Id: Ib703a5ddf7f581280522d589e4a2bfebe53c26a9 --- runtime/quick_exception_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/quick_exception_handler.cc') diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 63a09f25a4..4f4abf7f7f 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -232,7 +232,7 @@ void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor* DCHECK(catch_stack_map.IsValid()); DexRegisterMap catch_vreg_map = code_info.GetDexRegisterMapOf(catch_stack_map, number_of_vregs); - if (!catch_vreg_map.IsValid()) { + if (!catch_vreg_map.IsValid() || !catch_vreg_map.HasAnyLiveDexRegisters()) { return; } -- cgit v1.2.3-59-g8ed1b