summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2016-03-11 14:25:40 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-03-11 14:25:41 +0000
commit1a008a127730710f8f56c1ca66385e1b062a2dcb (patch)
treeb3d33325c5e5ef2f34aa9a497c83863cf2481abb /compiler/optimizing/optimizing_compiler.cc
parent2af7213a4e0d395fe22dcdce6ec10a3bd131023d (diff)
parent197160d47f34238cb5e7444fa4c2de300db8e2c6 (diff)
Merge "Refactor MethodDebugInfo (input of DWARF writer)."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
-rw-r--r--compiler/optimizing/optimizing_compiler.cc43
1 files changed, 17 insertions, 26 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 4ecd1e66d8..989c3e410f 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -919,35 +919,26 @@ bool OptimizingCompiler::JitCompile(Thread* self,
if (compiler_options.GetGenerateDebugInfo()) {
const auto* method_header = reinterpret_cast<const OatQuickMethodHeader*>(code);
const uintptr_t code_address = reinterpret_cast<uintptr_t>(method_header->GetCode());
- CompiledMethod compiled_method(
- GetCompilerDriver(),
- codegen->GetInstructionSet(),
- ArrayRef<const uint8_t>(code_allocator.GetMemory()),
- codegen->HasEmptyFrame() ? 0 : codegen->GetFrameSize(),
- codegen->GetCoreSpillMask(),
- codegen->GetFpuSpillMask(),
- ArrayRef<const SrcMapElem>(),
- ArrayRef<const uint8_t>(), // mapping_table.
- ArrayRef<const uint8_t>(stack_map_data, stack_map_size),
- ArrayRef<const uint8_t>(), // native_gc_map.
- ArrayRef<const uint8_t>(*codegen->GetAssembler()->cfi().data()),
- ArrayRef<const LinkerPatch>());
- debug::MethodDebugInfo method_debug_info {
- dex_file,
- class_def_idx,
- method_idx,
- access_flags,
- code_item,
- false, // deduped.
- compiler_options.GetNativeDebuggable(),
- code_address,
- code_address + code_allocator.GetSize(),
- &compiled_method
- };
+ debug::MethodDebugInfo info;
+ info.dex_file = dex_file;
+ info.class_def_index = class_def_idx;
+ info.dex_method_index = method_idx;
+ info.access_flags = access_flags;
+ info.code_item = code_item;
+ info.isa = codegen->GetInstructionSet();
+ info.deduped = false;
+ info.is_native_debuggable = compiler_options.GetNativeDebuggable();
+ info.is_optimized = true;
+ info.is_code_address_text_relative = false;
+ info.code_address = code_address;
+ info.code_size = code_allocator.GetSize();
+ info.frame_size_in_bytes = method_header->GetFrameSizeInBytes();
+ info.code_info = stack_map_size == 0 ? nullptr : stack_map_data;
+ info.cfi = ArrayRef<const uint8_t>(*codegen->GetAssembler()->cfi().data());
ArrayRef<const uint8_t> elf_file = debug::WriteDebugElfFileForMethod(
GetCompilerDriver()->GetInstructionSet(),
GetCompilerDriver()->GetInstructionSetFeatures(),
- method_debug_info);
+ info);
CreateJITCodeEntryForAddress(code_address,
std::unique_ptr<const uint8_t[]>(elf_file.data()),
elf_file.size());