diff options
author | Vladimir Marko <vmarko@google.com> | 2017-10-09 14:12:23 +0100 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2017-10-11 09:44:26 +0100 |
commit | 69d310e0317e2fce97bf8c9c133c5c2c0332e61d (patch) | |
tree | fba05a1530e6fc4a2e6950303c1f7c6b0ffbb936 /compiler/utils/jni_macro_assembler_test.h | |
parent | e764d2e50c544c2cb98ee61a15d613161ac6bd17 (diff) |
Use ScopedArenaAllocator for building HGraph.
Memory needed to compile the two most expensive methods for
aosp_angler-userdebug boot image:
BatteryStats.dumpCheckinLocked() : 21.1MiB -> 20.2MiB
BatteryStats.dumpLocked(): 42.0MiB -> 40.3MiB
This is because all the memory previously used by the graph
builder is reused by later passes.
And finish the "arena"->"allocator" renaming; make renamed
allocator pointers that are members of classes const when
appropriate (and make a few more members around them const).
Test: m test-art-host-gtest
Test: testrunner.py --host
Bug: 64312607
Change-Id: Ia50aafc80c05941ae5b96984ba4f31ed4c78255e
Diffstat (limited to 'compiler/utils/jni_macro_assembler_test.h')
-rw-r--r-- | compiler/utils/jni_macro_assembler_test.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/utils/jni_macro_assembler_test.h b/compiler/utils/jni_macro_assembler_test.h index ba95e212bb..34ab4c3e43 100644 --- a/compiler/utils/jni_macro_assembler_test.h +++ b/compiler/utils/jni_macro_assembler_test.h @@ -58,8 +58,8 @@ class JNIMacroAssemblerTest : public testing::Test { explicit JNIMacroAssemblerTest() {} void SetUp() OVERRIDE { - arena_.reset(new ArenaAllocator(&pool_)); - assembler_.reset(CreateAssembler(arena_.get())); + allocator_.reset(new ArenaAllocator(&pool_)); + assembler_.reset(CreateAssembler(allocator_.get())); test_helper_.reset( new AssemblerTestInfrastructure(GetArchitectureString(), GetAssemblerCmdName(), @@ -76,7 +76,7 @@ class JNIMacroAssemblerTest : public testing::Test { void TearDown() OVERRIDE { test_helper_.reset(); // Clean up the helper. assembler_.reset(); - arena_.reset(); + allocator_.reset(); } // Override this to set up any architecture-specific things, e.g., CPU revision. @@ -140,7 +140,7 @@ class JNIMacroAssemblerTest : public testing::Test { } ArenaPool pool_; - std::unique_ptr<ArenaAllocator> arena_; + std::unique_ptr<ArenaAllocator> allocator_; std::unique_ptr<Ass> assembler_; std::unique_ptr<AssemblerTestInfrastructure> test_helper_; |