summaryrefslogtreecommitdiff
path: root/simpleperf/cmd_stat.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2016-08-19 15:42:39 -0700
committerYabin Cui <yabinc@google.com>2016-08-24 09:52:27 -0700
commit4cf37d1583a605785b7677c1935ce316c2097fa2 (patch)
tree915cea183a64e268dff175079bef0db3a0b74626 /simpleperf/cmd_stat.cpp
parentef99a90b46e1c61e58a42c69f80dcd3943c04a8b (diff)
downloadextras-4cf37d1583a605785b7677c1935ce316c2097fa2.tar.gz
simpleperf: notify user for unsupported modifiers.
If there is no need to record samples, u/k modifiers used in event cpu-clock and task-clock are ignored by the kernel. Bug: http://b/29574526 Change-Id: Id45568448888965a3bfa382c4420e395a741f77a Test: simpleperf_unit_test.
Diffstat (limited to 'simpleperf/cmd_stat.cpp')
-rw-r--r--simpleperf/cmd_stat.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/simpleperf/cmd_stat.cpp b/simpleperf/cmd_stat.cpp
index 41992939..76df147f 100644
--- a/simpleperf/cmd_stat.cpp
+++ b/simpleperf/cmd_stat.cpp
@@ -292,6 +292,7 @@ class StatCommand : public Command {
system_wide_collection_(false),
child_inherit_(true),
duration_in_sec_(0),
+ event_selection_set_(true),
csv_(false) {
// Die if parent exits.
prctl(PR_SET_PDEATHSIG, SIGHUP, 0, 0, 0);
@@ -380,7 +381,7 @@ bool StatCommand::Run(const std::vector<std::string>& args) {
}
if (duration_in_sec_ != 0) {
if (!loop.AddPeriodicEvent(SecondToTimeval(duration_in_sec_),
- [&]() { return loop.ExitLoop(); })) {
+ [&]() { return loop.ExitLoop(); })) {
return false;
}
}