summaryrefslogtreecommitdiffstats
path: root/compiler/elf_writer_quick.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/elf_writer_quick.cc
parent6d1a047b4b3f9707d4ee1cc19e99717ee021ef48 (diff)
downloadart-e21dc3db191df04c100620965bee4617b3b24397.zip
art-e21dc3db191df04c100620965bee4617b3b24397.tar.gz
art-e21dc3db191df04c100620965bee4617b3b24397.tar.bz2
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/elf_writer_quick.cc')
-rw-r--r--compiler/elf_writer_quick.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc
index d651c0f..9ec4f28 100644
--- a/compiler/elf_writer_quick.cc
+++ b/compiler/elf_writer_quick.cc
@@ -358,8 +358,8 @@ class LineTableGenerator FINAL : public Leb128Encoder {
};
// TODO: rewriting it using DexFile::DecodeDebugInfo needs unneeded stuff.
-static void GetLineInfoForJava(const uint8_t* dbgstream, const SrcMap& pc2dex,
- SrcMap* result, uint32_t start_pc = 0) {
+static void GetLineInfoForJava(const uint8_t* dbgstream, const SwapSrcMap& pc2dex,
+ DefaultSrcMap* result, uint32_t start_pc = 0) {
if (dbgstream == nullptr) {
return;
}
@@ -415,7 +415,7 @@ static void GetLineInfoForJava(const uint8_t* dbgstream, const SrcMap& pc2dex,
dex_offset += adjopcode / DexFile::DBG_LINE_RANGE;
java_line += DexFile::DBG_LINE_BASE + (adjopcode % DexFile::DBG_LINE_RANGE);
- for (SrcMap::const_iterator found = pc2dex.FindByTo(dex_offset);
+ for (SwapSrcMap::const_iterator found = pc2dex.FindByTo(dex_offset);
found != pc2dex.end() && found->to_ == static_cast<int32_t>(dex_offset);
found++) {
result->push_back({found->from_ + start_pc, static_cast<int32_t>(java_line)});
@@ -615,7 +615,7 @@ static void FillInCFIInformation(OatWriter* oat_writer,
LineTableGenerator line_table_generator(LINE_BASE, LINE_RANGE, OPCODE_BASE,
dbg_line, 0, 1);
- SrcMap pc2java_map;
+ DefaultSrcMap pc2java_map;
for (size_t i = 0; i < method_info.size(); ++i) {
const OatWriter::DebugInfo &dbg = method_info[i];
const char* file_name = (dbg.src_file_name_ == nullptr) ? "null" : dbg.src_file_name_;
@@ -700,7 +700,7 @@ static void WriteDebugSymbols(const CompilerDriver* compiler_driver,
DCHECK(it->compiled_method_ != nullptr);
// Copy in the FDE, if present
- const std::vector<uint8_t>* fde = it->compiled_method_->GetCFIInfo();
+ const SwapVector<uint8_t>* fde = it->compiled_method_->GetCFIInfo();
if (fde != nullptr) {
// Copy the information into cfi_info and then fix the address in the new copy.
int cur_offset = cfi_info->size();