summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2014-12-08 16:59:43 -0800
committer Andreas Gampe <agampe@google.com> 2014-12-18 16:56:10 -0800
commit62746d8d9c4400e4764f162b22bfb1a32be287a9 (patch)
tree415dc3a150d7f6d2df6672c640c19e70f2aab4db /compiler/optimizing/optimizing_compiler.cc
parent15ff1a8642fbbe3fb29273f35005ccc7524bb942 (diff)
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 Change-Id: I131448f3907115054a592af73db86d2b9257ea33
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 8a5077b962..b9f7e8b7a9 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -167,16 +167,16 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite
std::vector<uint8_t> gc_map;
codegen->BuildNativeGCMap(&gc_map, dex_compilation_unit);
- return new CompiledMethod(GetCompilerDriver(),
- instruction_set,
- allocator.GetMemory(),
- codegen->GetFrameSize(),
- codegen->GetCoreSpillMask(),
- 0, /* FPR spill mask, unused */
- mapping_table,
- vmap_table,
- gc_map,
- nullptr);
+ return CompiledMethod::SwapAllocCompiledMethod(GetCompilerDriver(),
+ instruction_set,
+ ArrayRef<const uint8_t>(allocator.GetMemory()),
+ codegen->GetFrameSize(),
+ codegen->GetCoreSpillMask(),
+ 0, /* FPR spill mask, unused */
+ ArrayRef<const uint8_t>(mapping_table),
+ ArrayRef<const uint8_t>(vmap_table),
+ ArrayRef<const uint8_t>(gc_map),
+ ArrayRef<const uint8_t>());
}
} // namespace art