OSDN Git Service

simpleperf: check perf event limit.
[android-x86/system-extras.git] / simpleperf / cmd_stat.cpp
index 228b4ed..488e731 100644 (file)
@@ -101,6 +101,10 @@ class StatCommand : public Command {
 };
 
 bool StatCommand::Run(const std::vector<std::string>& args) {
+  if (!CheckPerfEventLimit()) {
+    return false;
+  }
+
   // 1. Parse options, and use default measured event types if not given.
   std::vector<std::string> workload_args;
   if (!ParseOptions(args, &workload_args)) {