From: Arnaldo Carvalho de Melo Date: Tue, 13 Oct 2020 16:02:20 +0000 (-0300) Subject: Merge branch 'perf/urgent' into perf/core X-Git-Tag: v5.10-rc1~91^2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dbaa1b3d9afba3c050d365245a36616ae3f425a7;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'perf/urgent' into perf/core To pick fixes that missed v5.9. Signed-off-by: Arnaldo Carvalho de Melo --- dbaa1b3d9afba3c050d365245a36616ae3f425a7 diff --cc tools/perf/util/metricgroup.c index 55ea514ac0ce9,d948a7f910cfa..060454a172935 --- a/tools/perf/util/metricgroup.c +++ b/tools/perf/util/metricgroup.c @@@ -150,8 -150,20 +150,20 @@@ static void expr_ids__exit(struct expr_ free(ids->id[i].id); } + static bool contains_event(struct evsel **metric_events, int num_events, + const char *event_name) + { + int i; + + for (i = 0; i < num_events; i++) { + if (!strcmp(metric_events[i]->name, event_name)) + return true; + } + return false; + } + /** - * Find a group of events in perf_evlist that correpond to those from a parsed + * Find a group of events in perf_evlist that correspond to those from a parsed * metric expression. Note, as find_evsel_group is called in the same order as * perf_evlist was constructed, metric_no_merge doesn't need to test for * underfilling a group.