summaryrefslogtreecommitdiff
path: root/compiler/utils/assembler_thumb_test.cc
diff options
context:
space:
mode:
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
commit69d310e0317e2fce97bf8c9c133c5c2c0332e61d (patch)
treefba05a1530e6fc4a2e6950303c1f7c6b0ffbb936 /compiler/utils/assembler_thumb_test.cc
parente764d2e50c544c2cb98ee61a15d613161ac6bd17 (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/assembler_thumb_test.cc')
-rw-r--r--compiler/utils/assembler_thumb_test.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/utils/assembler_thumb_test.cc b/compiler/utils/assembler_thumb_test.cc
index 5622f89529..5307d17bb0 100644
--- a/compiler/utils/assembler_thumb_test.cc
+++ b/compiler/utils/assembler_thumb_test.cc
@@ -167,10 +167,10 @@ void DumpAndCheck(std::vector<uint8_t>& code, const char* testname, const char*
class ArmVIXLAssemblerTest : public ::testing::Test {
public:
- ArmVIXLAssemblerTest() : pool(), arena(&pool), assembler(&arena) { }
+ ArmVIXLAssemblerTest() : pool(), allocator(&pool), assembler(&allocator) { }
ArenaPool pool;
- ArenaAllocator arena;
+ ArenaAllocator allocator;
ArmVIXLJNIMacroAssembler assembler;
};
@@ -209,18 +209,16 @@ TEST_F(ArmVIXLAssemblerTest, VixlJniHelpers) {
const bool is_critical_native = false;
const char* shorty = "IIFII";
- ArenaPool pool;
- ArenaAllocator arena(&pool);
-
std::unique_ptr<JniCallingConvention> jni_conv(
- JniCallingConvention::Create(&arena,
+ JniCallingConvention::Create(&allocator,
is_static,
is_synchronized,
is_critical_native,
shorty,
kThumb2));
std::unique_ptr<ManagedRuntimeCallingConvention> mr_conv(
- ManagedRuntimeCallingConvention::Create(&arena, is_static, is_synchronized, shorty, kThumb2));
+ ManagedRuntimeCallingConvention::Create(
+ &allocator, is_static, is_synchronized, shorty, kThumb2));
const int frame_size(jni_conv->FrameSize());
ArrayRef<const ManagedRegister> callee_save_regs = jni_conv->CalleeSaveRegisters();