summaryrefslogtreecommitdiffstats
path: root/runtime/parsed_options.cc
diff options
context:
space:
mode:
authorWei Jin <wejin@google.com>2014-06-09 16:19:15 -0700
committerCalin Juravle <calin@google.com>2014-06-19 13:05:44 +0100
commita93b0bb9abfbd19fc40ff8ced8818aec1a3464b9 (patch)
tree5ce3679ab53691e97a8971e29f85742a7f95666f /runtime/parsed_options.cc
parent995b32cc8e94a9730d6cf663a23afc9c997c1771 (diff)
downloadart-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.zip
art-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.tar.gz
art-a93b0bb9abfbd19fc40ff8ced8818aec1a3464b9.tar.bz2
Add an option to enable collecting dex pc in ART profiler
This CL allows the ART profiler to collect both method signature and dex pc. The type of the profile data is controlled by the option "-Xprofile-type:{method,dexpc}". To avoid conflicting with the original profile data based on method signatures, the new profile data are stored in files with extension ".pc". Change-Id: I8afb2541d386bff77c5b07fc9367d817a79f58e1
Diffstat (limited to 'runtime/parsed_options.cc')
-rw-r--r--runtime/parsed_options.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc
index 87106d6..ef20d1c 100644
--- a/runtime/parsed_options.cc
+++ b/runtime/parsed_options.cc
@@ -563,6 +563,10 @@ bool ParsedOptions::Parse(const Runtime::Options& options, bool ignore_unrecogni
if (!ParseDouble(option, ':', 0.0, 100.0, &profiler_options_.top_k_change_threshold_)) {
return false;
}
+ } else if (option == "-Xprofile-type:method") {
+ profiler_options_.profile_type_ = kProfilerMethod;
+ } else if (option == "-Xprofile-type:dexpc") {
+ profiler_options_.profile_type_ = kProfilerMethodAndDexPC;
} else if (StartsWith(option, "-implicit-checks:")) {
std::string checks;
if (!ParseStringAfterChar(option, ':', &checks)) {
@@ -806,6 +810,7 @@ void ParsedOptions::Usage(const char* fmt, ...) {
UsageMessage(stream, " -Xprofile-start-immediately\n");
UsageMessage(stream, " -Xprofile-top-k-threshold:doublevalue\n");
UsageMessage(stream, " -Xprofile-top-k-change-threshold:doublevalue\n");
+ UsageMessage(stream, " -Xprofile-type:{method,dexpc}\n");
UsageMessage(stream, " -Xcompiler:filename\n");
UsageMessage(stream, " -Xcompiler-option dex2oat-option\n");
UsageMessage(stream, " -Ximage-compiler-option dex2oat-option\n");