summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_stat.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-08-05 14:50:37 -0700
committerYabin Cui <yabinc@google.com>2016-08-05 14:57:50 -0700
commiteb07faa5954e7725ad254003c0f1710b5ac37a9b (patch)
tree36297248e91a7a3128bb042b8f2e6b9af813fe02 /simpleperf/cmd_stat.cpp
parent9ec492a979bf53295e5d615cc00a76e074c51bd7 (diff)
downloadextras-eb07faa5954e7725ad254003c0f1710b5ac37a9b.tar.gz
simpleperf: allow --duration option when executing child command.
Previously --duration option can't be used while executing child command, mainly because we use `sleep XX` child command to implement --duration option. By using libevent, the limit doesn't exist. Bug: http://b/30405638 Change-Id: Iea1953ecf3aca48e75fb74f048ed04ad5b168630 Test: run simpleperf_unit_test.
Diffstat (limited to 'simpleperf/cmd_stat.cpp')
-rw-r--r--simpleperf/cmd_stat.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/simpleperf/cmd_stat.cpp b/simpleperf/cmd_stat.cpp
index d06c8f99..5a0694e7 100644
--- a/simpleperf/cmd_stat.cpp
+++ b/simpleperf/cmd_stat.cpp
@@ -495,13 +495,6 @@ bool StatCommand::ParseOptions(const std::vector<std::string>& args,
for (; i < args.size(); ++i) {
non_option_args->push_back(args[i]);
}
- if (duration_in_sec_ != 0) {
- if (!non_option_args->empty()) {
- LOG(ERROR) << "Using --duration option while running a command is not "
- "supported.";
- return false;
- }
- }
return true;
}