summaryrefslogtreecommitdiff
path: root/compiler/dex/frontend.cc
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2014-01-20 22:31:22 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-01-20 22:31:23 +0000
commit40afcfe964c45452ef22062f993949ef09bd519b (patch)
treec9ca0e7184cc32e6ea56f41ff41c19f31f9d6c40 /compiler/dex/frontend.cc
parent0c8f415f06e4bfe64552297cd1cc50f5709ffb59 (diff)
parent650be76eb3c38ff905ec1d9675d73e5cb9a82dac (diff)
Merge "Revert "Implement cumulative timings for CompilerDriver.""
Diffstat (limited to 'compiler/dex/frontend.cc')
-rw-r--r--compiler/dex/frontend.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc
index 364a8bc55b..f5bb85a910 100644
--- a/compiler/dex/frontend.cc
+++ b/compiler/dex/frontend.cc
@@ -141,25 +141,24 @@ 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 (compiler_driver->GetDumpPasses()) {
+ if (enable_debug & (1 << kDebugTimings)) {
timings.StartSplit(label);
}
}
void CompilationUnit::NewTimingSplit(const char* label) {
- if (compiler_driver->GetDumpPasses()) {
+ if (enable_debug & (1 << kDebugTimings)) {
timings.NewSplit(label);
}
}
void CompilationUnit::EndTiming() {
- if (compiler_driver->GetDumpPasses()) {
+ if (enable_debug & (1 << kDebugTimings)) {
timings.EndSplit();
- if (enable_debug & (1 << kDebugTimings)) {
- LOG(INFO) << "TIMINGS " << PrettyMethod(method_idx, *dex_file);
- LOG(INFO) << Dumpable<TimingLogger>(timings);
- }
+ LOG(INFO) << "TIMINGS " << PrettyMethod(method_idx, *dex_file);
+ LOG(INFO) << Dumpable<TimingLogger>(timings);
}
}
@@ -317,9 +316,6 @@ static CompiledMethod* CompileMethod(CompilerDriver& compiler,
}
cu.EndTiming();
- compiler.GetTimingsLogger().Start();
- compiler.GetTimingsLogger().AddLogger(cu.timings);
- compiler.GetTimingsLogger().End();
return result;
}