diff options
| author | Ingo Molnar <mingo@kernel.org> | 2019-12-25 10:41:37 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2019-12-25 10:41:37 +0100 |
| commit | 1e5f8a308551b9816588e12bb795aeadebe37c4a (patch) | |
| tree | bd71fc796fed24a3b7cc99df4a1d1bdaecc2b387 /tools/perf/util/metricgroup.c | |
| parent | a5e37de90e67ac1072a9a44bd0cec9f5e98ded08 (diff) | |
| parent | 46cf053efec6a3a5f343fead837777efe8252a46 (diff) | |
Merge tag 'v5.5-rc3' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/metricgroup.c')
| -rw-r--r-- | tools/perf/util/metricgroup.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index 6a4d350d5cdb..02aee946b6c1 100644 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@ -103,8 +103,11 @@ static struct evsel *find_evsel_group(struct evlist *perf_evlist, if (!strcmp(ev->name, ids[i])) { if (!metric_events[i]) metric_events[i] = ev; + i++; + if (i == idnum) + break; } else { - if (++i == idnum) { + if (i + 1 == idnum) { /* Discard the whole match and start again */ i = 0; memset(metric_events, 0, @@ -124,7 +127,7 @@ static struct evsel *find_evsel_group(struct evlist *perf_evlist, } } - if (i != idnum - 1) { + if (i != idnum) { /* Not whole match */ return NULL; } |
