summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/driver/compiler_options.cc1
-rw-r--r--compiler/driver/compiler_options.h5
-rw-r--r--compiler/driver/compiler_options_map-inl.h7
-rw-r--r--compiler/driver/compiler_options_map.def1
-rw-r--r--compiler/optimizing/optimizing_compiler.cc2
-rw-r--r--dex2oat/dex2oat.cc3
6 files changed, 18 insertions, 1 deletions
diff --git a/compiler/driver/compiler_options.cc b/compiler/driver/compiler_options.cc
index 2d82d79c4a..933be4f004 100644
--- a/compiler/driver/compiler_options.cc
+++ b/compiler/driver/compiler_options.cc
@@ -51,6 +51,7 @@ CompilerOptions::CompilerOptions()
implicit_suspend_checks_(false),
compile_pic_(false),
dump_timings_(false),
+ dump_pass_timings_(false),
dump_stats_(false),
verbose_methods_(),
abort_on_hard_verifier_failure_(false),
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index cdd9d4de00..cee989b315 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -270,6 +270,10 @@ class CompilerOptions FINAL {
return dump_timings_;
}
+ bool GetDumpPassTimings() const {
+ return dump_pass_timings_;
+ }
+
bool GetDumpStats() const {
return dump_stats_;
}
@@ -316,6 +320,7 @@ class CompilerOptions FINAL {
bool implicit_suspend_checks_;
bool compile_pic_;
bool dump_timings_;
+ bool dump_pass_timings_;
bool dump_stats_;
// Vector of methods to have verbose output enabled for.
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h
index 3b18db09fc..32fc887b8e 100644
--- a/compiler/driver/compiler_options_map-inl.h
+++ b/compiler/driver/compiler_options_map-inl.h
@@ -85,6 +85,10 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string
options->dump_timings_ = true;
}
+ if (map.Exists(Base::DumpPassTimings)) {
+ options->dump_pass_timings_ = true;
+ }
+
if (map.Exists(Base::DumpStats)) {
options->dump_stats_ = true;
}
@@ -146,6 +150,9 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) {
.Define({"--dump-timings"})
.IntoKey(Map::DumpTimings)
+ .Define({"--dump-pass-timings"})
+ .IntoKey(Map::DumpPassTimings)
+
.Define({"--dump-stats"})
.IntoKey(Map::DumpStats)
diff --git a/compiler/driver/compiler_options_map.def b/compiler/driver/compiler_options_map.def
index acddae7299..529d43fc72 100644
--- a/compiler/driver/compiler_options_map.def
+++ b/compiler/driver/compiler_options_map.def
@@ -60,6 +60,7 @@ COMPILER_OPTIONS_KEY (ParseStringList<','>, VerboseMethods)
COMPILER_OPTIONS_KEY (bool, DeduplicateCode, true)
COMPILER_OPTIONS_KEY (Unit, CountHotnessInCompiledCode)
COMPILER_OPTIONS_KEY (Unit, DumpTimings)
+COMPILER_OPTIONS_KEY (Unit, DumpPassTimings)
COMPILER_OPTIONS_KEY (Unit, DumpStats)
#undef COMPILER_OPTIONS_KEY
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 6e2c99444c..c4977decd9 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -109,7 +109,7 @@ class PassObserver : public ValueObject {
: graph_(graph),
last_seen_graph_size_(0),
cached_method_name_(),
- timing_logger_enabled_(compiler_driver->GetCompilerOptions().GetDumpTimings()),
+ timing_logger_enabled_(compiler_driver->GetCompilerOptions().GetDumpPassTimings()),
timing_logger_(timing_logger_enabled_ ? GetMethodName() : "", true, true),
disasm_info_(graph->GetAllocator()),
visualizer_oss_(),
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index df38ee3a34..3252354417 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -350,6 +350,9 @@ NO_RETURN static void Usage(const char* fmt, ...) {
UsageError("");
UsageError(" --dump-timings: display a breakdown of where time was spent");
UsageError("");
+ UsageError(" --dump-pass-timings: display a breakdown of time spent in optimization");
+ UsageError(" passes for each compiled method.");
+ UsageError("");
UsageError(" -g");
UsageError(" --generate-debug-info: Generate debug information for native debugging,");
UsageError(" such as stack unwinding information, ELF symbols and DWARF sections.");