File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -2564,9 +2564,8 @@ foreach_evsel_in_last_glob(struct evlist *evlist,
2564
2564
static int set_filter (struct evsel * evsel , const void * arg )
2565
2565
{
2566
2566
const char * str = arg ;
2567
- bool found = false;
2568
2567
int nr_addr_filters = 0 ;
2569
- struct perf_pmu * pmu = NULL ;
2568
+ struct perf_pmu * pmu ;
2570
2569
2571
2570
if (evsel == NULL ) {
2572
2571
fprintf (stderr ,
@@ -2584,16 +2583,11 @@ static int set_filter(struct evsel *evsel, const void *arg)
2584
2583
return 0 ;
2585
2584
}
2586
2585
2587
- while ((pmu = perf_pmus__scan (pmu )) != NULL )
2588
- if (pmu -> type == evsel -> core .attr .type ) {
2589
- found = true;
2590
- break ;
2591
- }
2592
-
2593
- if (found )
2586
+ pmu = evsel__find_pmu (evsel );
2587
+ if (pmu ) {
2594
2588
perf_pmu__scan_file (pmu , "nr_addr_filters" ,
2595
2589
"%d" , & nr_addr_filters );
2596
-
2590
+ }
2597
2591
if (!nr_addr_filters )
2598
2592
return perf_bpf_filter__parse (& evsel -> bpf_filters , str );
2599
2593
You can’t perform that action at this time.
0 commit comments