summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2019-08-19 21:31:31 +0100
committer David Srbecky <dsrbecky@google.com> 2019-08-28 10:24:35 +0000
commite09b87eb8d8c063ddaee53a70b4bc8dbf61ff66c (patch)
treedf53a0996b9ae47422f4661edc2d7998cc57ba95 /compiler
parentc88c1d0fbbc4bc230f08fd1e0fe7b652519c9236 (diff)
JIT mini-debug-info: Support JIT data dual mapping.
Ensure that we can add/remove mini-debug-info if the JIT data is read-only and we need to use the other mapping for writes. Pointers into the read-only memory are marked as "const". Test: "test.py -b --host --jit" with data dual mapping Test: device boots with data dual mapping Bug: 119800099 Change-Id: I9399cffbe5ae13f08f698ab1598c30f13545a767
Diffstat (limited to 'compiler')
-rw-r--r--compiler/debug/elf_debug_writer.cc4
-rw-r--r--compiler/debug/elf_debug_writer.h2
-rw-r--r--compiler/jit/jit_compiler.cc2
-rw-r--r--compiler/jit/jit_compiler.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/compiler/debug/elf_debug_writer.cc b/compiler/debug/elf_debug_writer.cc
index cf7254b105..79d11982ab 100644
--- a/compiler/debug/elf_debug_writer.cc
+++ b/compiler/debug/elf_debug_writer.cc
@@ -228,7 +228,7 @@ std::vector<uint8_t> MakeElfFileForJIT(
// Combine several mini-debug-info ELF files into one, while filtering some symbols.
std::vector<uint8_t> PackElfFileForJIT(
- ArrayRef<JITCodeEntry*> jit_entries,
+ ArrayRef<const JITCodeEntry*> jit_entries,
ArrayRef<const void*> removed_symbols,
bool compress,
/*out*/ size_t* num_symbols) {
@@ -260,7 +260,7 @@ std::vector<uint8_t> PackElfFileForJIT(
using Reader = ElfDebugReader<ElfTypes>;
std::deque<Reader> readers;
- for (JITCodeEntry* it : jit_entries) {
+ for (const JITCodeEntry* it : jit_entries) {
readers.emplace_back(GetJITCodeEntrySymFile(it));
}
diff --git a/compiler/debug/elf_debug_writer.h b/compiler/debug/elf_debug_writer.h
index ed43a0b702..1ce3c6f6f8 100644
--- a/compiler/debug/elf_debug_writer.h
+++ b/compiler/debug/elf_debug_writer.h
@@ -57,7 +57,7 @@ std::vector<uint8_t> MakeElfFileForJIT(
const MethodDebugInfo& method_info);
std::vector<uint8_t> PackElfFileForJIT(
- ArrayRef<JITCodeEntry*> jit_entries,
+ ArrayRef<const JITCodeEntry*> jit_entries,
ArrayRef<const void*> removed_symbols,
bool compress,
/*out*/ size_t* num_symbols);
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 0bdab0b797..9af61e0dea 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -142,7 +142,7 @@ bool JitCompiler::GenerateDebugInfo() {
return GetCompilerOptions().GetGenerateDebugInfo();
}
-std::vector<uint8_t> JitCompiler::PackElfFileForJIT(ArrayRef<JITCodeEntry*> elf_files,
+std::vector<uint8_t> JitCompiler::PackElfFileForJIT(ArrayRef<const JITCodeEntry*> elf_files,
ArrayRef<const void*> removed_symbols,
bool compress,
/*out*/ size_t* num_symbols) {
diff --git a/compiler/jit/jit_compiler.h b/compiler/jit/jit_compiler.h
index c69a376abb..09de1f8681 100644
--- a/compiler/jit/jit_compiler.h
+++ b/compiler/jit/jit_compiler.h
@@ -53,7 +53,7 @@ class JitCompiler : public JitCompilerInterface {
void TypesLoaded(mirror::Class**, size_t count) REQUIRES_SHARED(Locks::mutator_lock_) override;
- std::vector<uint8_t> PackElfFileForJIT(ArrayRef<JITCodeEntry*> elf_files,
+ std::vector<uint8_t> PackElfFileForJIT(ArrayRef<const JITCodeEntry*> elf_files,
ArrayRef<const void*> removed_symbols,
bool compress,
/*out*/ size_t* num_symbols) override;