@@ -458,7 +458,6 @@ struct evsel *evsel__clone(struct evsel *orig)
evsel->per_pkg = orig->per_pkg;
evsel->percore = orig->percore;
evsel->precise_max = orig->precise_max;
- evsel->use_uncore_alias = orig->use_uncore_alias;
evsel->is_libpfm_event = orig->is_libpfm_event;
evsel->exclude_GH = orig->exclude_GH;
@@ -89,7 +89,6 @@ struct evsel {
bool per_pkg;
bool percore;
bool precise_max;
- bool use_uncore_alias;
bool is_libpfm_event;
bool auto_merge_stats;
bool collect_stat;
@@ -1445,15 +1445,13 @@ static int parse_events__inside_hybrid_pmu(struct parse_events_state *parse_stat
int parse_events_add_pmu(struct parse_events_state *parse_state,
struct list_head *list, char *name,
struct list_head *head_config,
- bool auto_merge_stats,
- bool use_alias)
+ bool auto_merge_stats)
{
struct perf_event_attr attr;
struct perf_pmu_info info;
struct perf_pmu *pmu;
struct evsel *evsel;
struct parse_events_error *err = parse_state->error;
- bool use_uncore_alias;
LIST_HEAD(config_terms);
pmu = parse_state->fake_pmu ?: perf_pmu__find(name);
@@ -1488,8 +1486,6 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
memset(&attr, 0, sizeof(attr));
}
- use_uncore_alias = (pmu->is_uncore && use_alias);
-
if (!head_config) {
attr.type = pmu->type;
evsel = __add_event(list, &parse_state->idx, &attr,
@@ -1499,7 +1495,6 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
/*cpu_list=*/NULL);
if (evsel) {
evsel->pmu_name = name ? strdup(name) : NULL;
- evsel->use_uncore_alias = use_uncore_alias;
return 0;
} else {
return -ENOMEM;
@@ -1560,7 +1555,6 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
evsel->use_config_name = true;
evsel->pmu_name = name ? strdup(name) : NULL;
- evsel->use_uncore_alias = use_uncore_alias;
evsel->percore = config_term_percore(&evsel->config_terms);
if (parse_state->fake_pmu)
@@ -1622,7 +1616,7 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state,
parse_events_copy_term_list(head, &orig_head);
if (!parse_events_add_pmu(parse_state, list,
pmu->name, orig_head,
- true, true)) {
+ /*auto_merge_stats=*/true)) {
pr_debug("%s -> %s/%s/\n", str,
pmu->name, alias->str);
ok++;
@@ -1634,7 +1628,7 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state,
if (parse_state->fake_pmu) {
if (!parse_events_add_pmu(parse_state, list, str, head,
- true, true)) {
+ /*auto_merge_stats=*/true)) {
pr_debug("%s -> %s/%s/\n", str, "fake_pmu", str);
ok++;
}
@@ -183,8 +183,7 @@ int parse_events_add_breakpoint(struct list_head *list, int *idx,
int parse_events_add_pmu(struct parse_events_state *parse_state,
struct list_head *list, char *name,
struct list_head *head_config,
- bool auto_merge_stats,
- bool use_alias);
+ bool auto_merge_stats);
struct evsel *parse_events__add_event(int idx, struct perf_event_attr *attr,
const char *name, const char *metric_id,
@@ -313,7 +313,7 @@ event_pmu_name opt_pmu_config
list = alloc_list();
if (!list)
CLEANUP_YYABORT;
- if (parse_events_add_pmu(_parse_state, list, $1, $2, false, false)) {
+ if (parse_events_add_pmu(_parse_state, list, $1, $2, /*auto_merge_stats=*/false)) {
struct perf_pmu *pmu = NULL;
int ok = 0;
@@ -330,8 +330,10 @@ event_pmu_name opt_pmu_config
!perf_pmu__match(pattern, pmu->alias_name, $1)) {
if (parse_events_copy_term_list(orig_terms, &terms))
CLEANUP_YYABORT;
- if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms, true, false))
+ if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms,
+ /*auto_merge_stats=*/true)) {
ok++;
+ }
parse_events_terms__delete(terms);
}
}
@@ -407,7 +409,8 @@ PE_PMU_EVENT_FAKE sep_dc
if (!list)
YYABORT;
- err = parse_events_add_pmu(_parse_state, list, $1, NULL, false, false);
+ err = parse_events_add_pmu(_parse_state, list, $1, /*head_config=*/NULL,
+ /*auto_merge_stats=*/false);
free($1);
if (err < 0) {
free(list);
@@ -425,7 +428,7 @@ PE_PMU_EVENT_FAKE opt_pmu_config
if (!list)
YYABORT;
- err = parse_events_add_pmu(_parse_state, list, $1, $2, false, false);
+ err = parse_events_add_pmu(_parse_state, list, $1, $2, /*auto_merge_stats=*/false);
free($1);
parse_events_terms__delete($2);
if (err < 0) {