diff options
| author | 2019-01-23 11:44:07 +0000 | |
|---|---|---|
| committer | 2019-01-23 11:44:07 +0000 | |
| commit | e9a47db2df99df3f52e4b0d752147abfbe62f1f0 (patch) | |
| tree | b115b3f270e78734eae68a3f139f5fd5262a3ec2 /compiler/optimizing/optimizing_compiler.cc | |
| parent | ca6d54388fd35b5bc9b2f1d52fb54b81c5577c56 (diff) | |
| parent | 43ae7791007d6e7bdc9dbf8cb7c9a3f3aec40efd (diff) | |
Merge "Add timing logger for mini-debug-info generation."
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
| -rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 3b34e8d0f6..42dbc77087 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -1460,22 +1460,27 @@ void OptimizingCompiler::GenerateJitDebugInfo(ArtMethod* method ATTRIBUTE_UNUSED const debug::MethodDebugInfo& info) { const CompilerOptions& compiler_options = GetCompilerDriver()->GetCompilerOptions(); DCHECK(compiler_options.GenerateAnyDebugInfo()); - - // If both flags are passed, generate full debug info. - const bool mini_debug_info = !compiler_options.GetGenerateDebugInfo(); - - // Create entry for the single method that we just compiled. - std::vector<uint8_t> elf_file = debug::MakeElfFileForJIT( - compiler_options.GetInstructionSet(), - compiler_options.GetInstructionSetFeatures(), - mini_debug_info, - info); - AddNativeDebugInfoForJit(Thread::Current(), - reinterpret_cast<const void*>(info.code_address), - elf_file, - debug::PackElfFileForJIT, - compiler_options.GetInstructionSet(), - compiler_options.GetInstructionSetFeatures()); + TimingLogger logger("Generate JIT debug info logger", true, VLOG_IS_ON(jit)); + { + TimingLogger::ScopedTiming st("Generate JIT debug info", &logger); + + // If both flags are passed, generate full debug info. + const bool mini_debug_info = !compiler_options.GetGenerateDebugInfo(); + + // Create entry for the single method that we just compiled. + std::vector<uint8_t> elf_file = debug::MakeElfFileForJIT( + compiler_options.GetInstructionSet(), + compiler_options.GetInstructionSetFeatures(), + mini_debug_info, + info); + AddNativeDebugInfoForJit(Thread::Current(), + reinterpret_cast<const void*>(info.code_address), + elf_file, + debug::PackElfFileForJIT, + compiler_options.GetInstructionSet(), + compiler_options.GetInstructionSetFeatures()); + } + Runtime::Current()->GetJit()->AddTimingLogger(logger); } } // namespace art |