summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2018-02-23 17:53:23 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-02-23 17:53:23 +0000
commit63e9e8700d0fe14a31d93e95efea603bab78a68e (patch)
tree6a89ae90a962070ed559c9759232d429a5369507 /compiler
parentc7ac275a5f06b0e1140bf600ec1e654f629c54ab (diff)
parent440a9b3b3e6aa60c14e73a97dd85c9ada0898569 (diff)
Merge "Add timestamps to JIT/DEX native debug info."
Diffstat (limited to 'compiler')
-rw-r--r--compiler/jit/jit_compiler.cc4
-rw-r--r--compiler/optimizing/optimizing_compiler.cc5
2 files changed, 5 insertions, 4 deletions
diff --git a/compiler/jit/jit_compiler.cc b/compiler/jit/jit_compiler.cc
index 17b94d3bdf..ac5c6fb01f 100644
--- a/compiler/jit/jit_compiler.cc
+++ b/compiler/jit/jit_compiler.cc
@@ -77,7 +77,9 @@ extern "C" void jit_types_loaded(void* handle, mirror::Class** types, size_t cou
std::vector<uint8_t> elf_file = debug::WriteDebugElfFileForClasses(
kRuntimeISA, jit_compiler->GetCompilerDriver()->GetInstructionSetFeatures(), types_array);
MutexLock mu(Thread::Current(), *Locks::native_debug_interface_lock_);
- CreateJITCodeEntry(std::move(elf_file));
+ // We never free debug info for types, so we don't need to provide a handle
+ // (which would have been otherwise used as identifier to remove it later).
+ AddNativeDebugInfoForJit(nullptr /* handle */, elf_file);
}
}
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index b3f23a0dcd..e42dfc10ba 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1411,13 +1411,12 @@ void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method, debug::MethodDe
mini_debug_info,
ArrayRef<const debug::MethodDebugInfo>(&info, 1));
MutexLock mu(Thread::Current(), *Locks::native_debug_interface_lock_);
- JITCodeEntry* entry = CreateJITCodeEntry(elf_file);
- IncrementJITCodeEntryRefcount(entry, info.code_address);
+ AddNativeDebugInfoForJit(reinterpret_cast<const void*>(info.code_address), elf_file);
VLOG(jit)
<< "JIT mini-debug-info added for " << ArtMethod::PrettyMethod(method)
<< " size=" << PrettySize(elf_file.size())
- << " total_size=" << PrettySize(GetJITCodeEntryMemUsage());
+ << " total_size=" << PrettySize(GetJitNativeDebugInfoMemUsage());
}
} // namespace art