diff options
Diffstat (limited to 'compiler/dex/frontend.cc')
-rw-r--r-- | compiler/dex/frontend.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc index c2016d0c0f..8f83cd039d 100644 --- a/compiler/dex/frontend.cc +++ b/compiler/dex/frontend.cc @@ -140,24 +140,25 @@ CompilationUnit::CompilationUnit(ArenaPool* pool) CompilationUnit::~CompilationUnit() { } -// TODO: Add a cumulative version of logging, and combine with dex2oat --dump-timing void CompilationUnit::StartTimingSplit(const char* label) { - if (enable_debug & (1 << kDebugTimings)) { + if (compiler_driver->GetDumpPasses()) { timings.StartSplit(label); } } void CompilationUnit::NewTimingSplit(const char* label) { - if (enable_debug & (1 << kDebugTimings)) { + if (compiler_driver->GetDumpPasses()) { timings.NewSplit(label); } } void CompilationUnit::EndTiming() { - if (enable_debug & (1 << kDebugTimings)) { + if (compiler_driver->GetDumpPasses()) { timings.EndSplit(); - LOG(INFO) << "TIMINGS " << PrettyMethod(method_idx, *dex_file); - LOG(INFO) << Dumpable<TimingLogger>(timings); + if (enable_debug & (1 << kDebugTimings)) { + LOG(INFO) << "TIMINGS " << PrettyMethod(method_idx, *dex_file); + LOG(INFO) << Dumpable<TimingLogger>(timings); + } } } @@ -330,6 +331,9 @@ static CompiledMethod* CompileMethod(CompilerDriver& compiler, } cu.EndTiming(); + compiler.GetTimingsLogger().Start(); + compiler.GetTimingsLogger().AddLogger(cu.timings); + compiler.GetTimingsLogger().End(); return result; } |