Merge branch 'perf/urgent' into perf/core
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 13 Oct 2020 16:02:20 +0000 (13:02 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 13 Oct 2020 16:02:20 +0000 (13:02 -0300)
To pick fixes that missed v5.9.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1  2 
tools/perf/util/metricgroup.c
tools/perf/util/parse-events.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.
Simple merge