From e21dc3db191df04c100620965bee4617b3b24397 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 8 Dec 2014 16:59:43 -0800 Subject: ART: Swap-space in the compiler Introduce a swap-space and corresponding allocator to transparently switch native allocations to memory backed by a file. Bug: 18596910 (cherry picked from commit 62746d8d9c4400e4764f162b22bfb1a32be287a9) Change-Id: I131448f3907115054a592af73db86d2b9257ea33 --- compiler/jni/quick/jni_compiler.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'compiler/jni') diff --git a/compiler/jni/quick/jni_compiler.cc b/compiler/jni/quick/jni_compiler.cc index c3fe75b..bf996a2 100644 --- a/compiler/jni/quick/jni_compiler.cc +++ b/compiler/jni/quick/jni_compiler.cc @@ -430,13 +430,18 @@ CompiledMethod* ArtJniCompileMethodInternal(CompilerDriver* driver, MemoryRegion code(&managed_code[0], managed_code.size()); __ FinalizeInstructions(code); jni_asm->FinalizeFrameDescriptionEntry(); - return new CompiledMethod(driver, - instruction_set, - managed_code, - frame_size, - main_jni_conv->CoreSpillMask(), - main_jni_conv->FpSpillMask(), - jni_asm->GetFrameDescriptionEntry()); + std::vector* fde(jni_asm->GetFrameDescriptionEntry()); + ArrayRef cfi_ref; + if (fde != nullptr) { + cfi_ref = ArrayRef(*fde); + } + return CompiledMethod::SwapAllocCompiledMethodCFI(driver, + instruction_set, + ArrayRef(managed_code), + frame_size, + main_jni_conv->CoreSpillMask(), + main_jni_conv->FpSpillMask(), + cfi_ref); } // Copy a single parameter from the managed to the JNI calling convention -- cgit v1.1