From 440a9b3b3e6aa60c14e73a97dd85c9ada0898569 Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Thu, 15 Feb 2018 17:47:29 +0000 Subject: Add timestamps to JIT/DEX native debug info. This a forward-looking change intended to allow simpleperf to reliably correlate samples and native debug information. I have added the timestamps to both JIT and DEX, and refactored the code in the process to avoid code duplication. Test: testrunner.py -t 137 Change-Id: I45fa4310305aff540e036db9af15a86c5b8b7aff --- compiler/jit/jit_compiler.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/jit/jit_compiler.cc') 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 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); } } -- cgit v1.2.3-59-g8ed1b