From e764d2e50c544c2cb98ee61a15d613161ac6bd17 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 5 Oct 2017 14:35:55 +0100 Subject: Use ScopedArenaAllocator for register allocation. Memory needed to compile the two most expensive methods for aosp_angler-userdebug boot image: BatteryStats.dumpCheckinLocked() : 25.1MiB -> 21.1MiB BatteryStats.dumpLocked(): 49.6MiB -> 42.0MiB This is because all the memory previously used by Scheduler is reused by the register allocator; the register allocator has a higher peak usage of the ArenaStack. And continue the "arena"->"allocator" renaming. Test: m test-art-host-gtest Test: testrunner.py --host Bug: 64312607 Change-Id: Idfd79a9901552b5147ec0bf591cb38120de86b01 --- compiler/utils/x86/assembler_x86.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/utils/x86/assembler_x86.h') diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h index dce3ad228c..f3b516cb7e 100644 --- a/compiler/utils/x86/assembler_x86.h +++ b/compiler/utils/x86/assembler_x86.h @@ -266,7 +266,8 @@ class NearLabel : private Label { */ class ConstantArea { public: - explicit ConstantArea(ArenaAllocator* arena) : buffer_(arena->Adapter(kArenaAllocAssembler)) {} + explicit ConstantArea(ArenaAllocator* allocator) + : buffer_(allocator->Adapter(kArenaAllocAssembler)) {} // Add a double to the constant area, returning the offset into // the constant area where the literal resides. @@ -307,7 +308,8 @@ class ConstantArea { class X86Assembler FINAL : public Assembler { public: - explicit X86Assembler(ArenaAllocator* arena) : Assembler(arena), constant_area_(arena) {} + explicit X86Assembler(ArenaAllocator* allocator) + : Assembler(allocator), constant_area_(allocator) {} virtual ~X86Assembler() {} /* -- cgit v1.2.3-59-g8ed1b