Fix error

This commit is contained in:
Alexey Milovidov 2020-11-07 19:08:19 +03:00
parent c3973123bd
commit 8b8383d375

View File

@ -398,8 +398,7 @@ bool PerfEventsCounters::processThreadLocalChanges(const std::string & needed_ev
return true;
}
// Parse comma-separated list of event names. Empty means all available
// events.
// Parse comma-separated list of event names. Empty means all available events.
std::vector<size_t> PerfEventsCounters::eventIndicesFromString(const std::string & events_list)
{
std::vector<size_t> result;
@ -415,12 +414,10 @@ std::vector<size_t> PerfEventsCounters::eventIndicesFromString(const std::string
}
std::istringstream iss(events_list);
iss.exceptions(std::ios::failbit);
std::string event_name;
while (std::getline(iss, event_name, ','))
{
// Allow spaces at the beginning of the token, so that you can write
// 'a, b'.
// Allow spaces at the beginning of the token, so that you can write 'a, b'.
event_name.erase(0, event_name.find_first_not_of(' '));
auto entry = event_name_to_index.find(event_name);