Revert "perf stat: Support metrics with hybrid events"
This reverts commit 60344f1a9a.
Hybrid metrics place a PMU at the end of the parse string. This is also
where tool events are placed. The behavior of the parse string isn't
clear and so revert the change for now.
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Florian Fischer <florian.fischer@muhq.space>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Kim Phillips <kim.phillips@amd.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Cc: Shunsuke Nakamura <nakamura.shun@fujitsu.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
Link: https://lore.kernel.org/r/20220507053410.3798748-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
280c36d26e
commit
17b3867d97
@@ -539,8 +539,7 @@ static void aggr_update_shadow(struct perf_stat_config *config,
|
||||
}
|
||||
}
|
||||
|
||||
static void uniquify_event_name(struct evsel *counter,
|
||||
struct perf_stat_config *stat_config)
|
||||
static void uniquify_event_name(struct evsel *counter)
|
||||
{
|
||||
char *new_name;
|
||||
char *config;
|
||||
@@ -559,8 +558,7 @@ static void uniquify_event_name(struct evsel *counter,
|
||||
counter->name = new_name;
|
||||
}
|
||||
} else {
|
||||
if (perf_pmu__has_hybrid() &&
|
||||
stat_config->metric_events.nr_entries == 0) {
|
||||
if (perf_pmu__has_hybrid()) {
|
||||
ret = asprintf(&new_name, "%s/%s/",
|
||||
counter->pmu_name, counter->name);
|
||||
} else {
|
||||
@@ -634,7 +632,7 @@ static bool collect_data(struct perf_stat_config *config, struct evsel *counter,
|
||||
return false;
|
||||
cb(config, counter, data, true);
|
||||
if (config->no_merge || hybrid_merge(counter, config, false))
|
||||
uniquify_event_name(counter, config);
|
||||
uniquify_event_name(counter);
|
||||
else if (counter->auto_merge_stats || hybrid_merge(counter, config, true))
|
||||
collect_all_aliases(config, counter, cb, data);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user