diff options
-rw-r--r-- | simpleperf/event_type.cpp | 4 | ||||
-rw-r--r-- | simpleperf/event_type.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/simpleperf/event_type.cpp b/simpleperf/event_type.cpp index c9eaa75b..71c3d9f1 100644 --- a/simpleperf/event_type.cpp +++ b/simpleperf/event_type.cpp @@ -161,7 +161,7 @@ static uint64_t MakeEventConfig(const std::string& event_str, std::vector<EventF // # cat armv8_pmuv3/events/cpu_cycles // event=0x011 for (auto& s : android::base::Split(event_str, ",")) { - auto pos = s.find("="); + auto pos = s.find('='); if (pos == std::string::npos) continue; @@ -229,7 +229,7 @@ std::vector<int> EventType::GetPmuCpumask() { if (!IsPmuEvent()) return empty_result; - std::string pmu = name.substr(0, name.find("/")); + std::string pmu = name.substr(0, name.find('/')); std::string cpumask_path = "/sys/bus/event_source/devices/" + pmu + "/cpumask"; std::string cpumask_content; if (!android::base::ReadFileToString(cpumask_path, &cpumask_content)) { diff --git a/simpleperf/event_type.h b/simpleperf/event_type.h index d4ffecb7..359438ec 100644 --- a/simpleperf/event_type.h +++ b/simpleperf/event_type.h @@ -44,7 +44,7 @@ struct EventType { } bool IsPmuEvent() const { - return name.find("/") != std::string::npos; + return name.find('/') != std::string::npos; } std::vector<int> GetPmuCpumask(); |