mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 12:16:41 +00:00
perf pmu: Remove mostly unused 'struct perf_pmu' 'is_hybrid' member
Replace usage with perf_pmu__is_hybrid(). Suggested-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Caleb Biggers <caleb.biggers@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Perry Taylor <perry.taylor@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@amd.com> Cc: Rob Herring <robh@kernel.org> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Stephane Eranian <eranian@google.com> Cc: Weilin Wang <weilin.wang@intel.com> Cc: Xin Gao <gaoxin@cdjrlc.com> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: http://lore.kernel.org/lkml/20221114210723.2749751-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7565f9617e
commit
e5f4afbe39
@ -3124,11 +3124,8 @@ void evsel__zero_per_pkg(struct evsel *evsel)
|
||||
}
|
||||
}
|
||||
|
||||
bool evsel__is_hybrid(struct evsel *evsel)
|
||||
bool evsel__is_hybrid(const struct evsel *evsel)
|
||||
{
|
||||
if (evsel->pmu)
|
||||
return evsel->pmu->is_hybrid;
|
||||
|
||||
return evsel->pmu_name && perf_pmu__is_hybrid(evsel->pmu_name);
|
||||
}
|
||||
|
||||
|
@ -498,7 +498,7 @@ struct perf_env *evsel__env(struct evsel *evsel);
|
||||
int evsel__store_ids(struct evsel *evsel, struct evlist *evlist);
|
||||
|
||||
void evsel__zero_per_pkg(struct evsel *evsel);
|
||||
bool evsel__is_hybrid(struct evsel *evsel);
|
||||
bool evsel__is_hybrid(const struct evsel *evsel);
|
||||
struct evsel *evsel__leader(struct evsel *evsel);
|
||||
bool evsel__has_leader(struct evsel *evsel, struct evsel *leader);
|
||||
bool evsel__is_leader(struct evsel *evsel);
|
||||
|
@ -980,7 +980,6 @@ static struct perf_pmu *pmu_lookup(const char *lookup_name)
|
||||
pmu->is_uncore = pmu_is_uncore(name);
|
||||
if (pmu->is_uncore)
|
||||
pmu->id = pmu_id(name);
|
||||
pmu->is_hybrid = is_hybrid;
|
||||
pmu->max_precise = pmu_max_precise(name);
|
||||
pmu_add_cpu_aliases(&aliases, pmu);
|
||||
pmu_add_sys_aliases(&aliases, pmu);
|
||||
@ -992,7 +991,7 @@ static struct perf_pmu *pmu_lookup(const char *lookup_name)
|
||||
list_splice(&aliases, &pmu->aliases);
|
||||
list_add_tail(&pmu->list, &pmus);
|
||||
|
||||
if (pmu->is_hybrid)
|
||||
if (is_hybrid)
|
||||
list_add_tail(&pmu->hybrid_list, &perf_pmu__hybrid_pmus);
|
||||
|
||||
pmu->default_config = perf_pmu__get_default_config(pmu);
|
||||
|
@ -40,7 +40,6 @@ struct perf_pmu {
|
||||
__u32 type;
|
||||
bool selectable;
|
||||
bool is_uncore;
|
||||
bool is_hybrid;
|
||||
bool auxtrace;
|
||||
int max_precise;
|
||||
struct perf_event_attr *default_config;
|
||||
|
@ -604,15 +604,10 @@ static void evsel__merge_aliases(struct evsel *evsel)
|
||||
}
|
||||
}
|
||||
|
||||
static bool evsel__should_merge_hybrid(struct evsel *evsel, struct perf_stat_config *config)
|
||||
static bool evsel__should_merge_hybrid(const struct evsel *evsel,
|
||||
const struct perf_stat_config *config)
|
||||
{
|
||||
struct perf_pmu *pmu;
|
||||
|
||||
if (!config->hybrid_merge)
|
||||
return false;
|
||||
|
||||
pmu = evsel__find_pmu(evsel);
|
||||
return pmu && pmu->is_hybrid;
|
||||
return config->hybrid_merge && evsel__is_hybrid(evsel);
|
||||
}
|
||||
|
||||
static void evsel__merge_stats(struct evsel *evsel, struct perf_stat_config *config)
|
||||
|
Loading…
Reference in New Issue
Block a user