• Ian Rogers's avatar
    perf pmu-events: Reduce processed events by passing PMU · e3edd6cf
    Ian Rogers authored
    Pass the PMU to pmu_events_table__for_each_event so that entries that
    don't match don't need to be processed by callback.
    
    If a NULL PMU is passed then all PMUs are processed.
    
    'perf bench internals pmu-scan's "Average PMU scanning" performance is
    reduced by about 5% on an Intel tigerlake.
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: John Garry <john.g.garry@oracle.com>
    Cc: Kajol Jain <kjain@linux.ibm.com>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ravi Bangoria <ravi.bangoria@amd.com>
    Cc: Rob Herring <robh@kernel.org>
    Link: https://lore.kernel.org/r/20230824041330.266337-8-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    e3edd6cf
empty-pmu-events.c 10.2 KB