summaryrefslogtreecommitdiffstats
path: root/compiler/common_compiler_test.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-12-08 16:59:43 -0800
committerAndreas Gampe <agampe@google.com>2014-12-22 10:01:27 -0800
commite21dc3db191df04c100620965bee4617b3b24397 (patch)
tree2ad762c6afb024bf95e1eced3d584649a4d57d23 /compiler/common_compiler_test.cc
parent6d1a047b4b3f9707d4ee1cc19e99717ee021ef48 (diff)
downloadandroid_art-e21dc3db191df04c100620965bee4617b3b24397.tar.gz
android_art-e21dc3db191df04c100620965bee4617b3b24397.tar.bz2
android_art-e21dc3db191df04c100620965bee4617b3b24397.zip
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
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r--compiler/common_compiler_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc
index 059a9eea50..d5c5e601e7 100644
--- a/compiler/common_compiler_test.cc
+++ b/compiler/common_compiler_test.cc
@@ -48,16 +48,16 @@ void CommonCompilerTest::MakeExecutable(mirror::ArtMethod* method) {
method->GetDexMethodIndex()));
}
if (compiled_method != nullptr) {
- const std::vector<uint8_t>* code = compiled_method->GetQuickCode();
+ const SwapVector<uint8_t>* code = compiled_method->GetQuickCode();
uint32_t code_size = code->size();
CHECK_NE(0u, code_size);
- const std::vector<uint8_t>& vmap_table = compiled_method->GetVmapTable();
+ const SwapVector<uint8_t>& vmap_table = compiled_method->GetVmapTable();
uint32_t vmap_table_offset = vmap_table.empty() ? 0u
: sizeof(OatQuickMethodHeader) + vmap_table.size();
- const std::vector<uint8_t>& mapping_table = *compiled_method->GetMappingTable();
+ const SwapVector<uint8_t>& mapping_table = *compiled_method->GetMappingTable();
uint32_t mapping_table_offset = mapping_table.empty() ? 0u
: sizeof(OatQuickMethodHeader) + vmap_table.size() + mapping_table.size();
- const std::vector<uint8_t>& gc_map = *compiled_method->GetGcMap();
+ const SwapVector<uint8_t>& gc_map = *compiled_method->GetGcMap();
uint32_t gc_map_offset = gc_map.empty() ? 0u
: sizeof(OatQuickMethodHeader) + vmap_table.size() + mapping_table.size() + gc_map.size();
OatQuickMethodHeader method_header(mapping_table_offset, vmap_table_offset, gc_map_offset,
@@ -156,7 +156,7 @@ void CommonCompilerTest::SetUp() {
compiler_kind, instruction_set,
instruction_set_features_.get(),
true, new std::set<std::string>, nullptr,
- 2, true, true, timer_.get(), ""));
+ 2, true, true, timer_.get(), -1, ""));
}
// We typically don't generate an image in unit tests, disable this optimization by default.
compiler_driver_->SetSupportBootImageFixup(false);