[PATCH 2/7] perf stat: Remove unused default_null_attrs
James Clark
james.clark at linaro.org
Tue Aug 13 06:23:10 PDT 2024
All current implementations of arch_evlist__add_default_attrs() do
nothing if nr_attrs is 0. To avoid confusion that it's used, remove it.
It appears that it used to be used as a mechanism to add topdown events,
but this is now done separately.
Signed-off-by: James Clark <james.clark at linaro.org>
---
tools/perf/builtin-stat.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index a65f58f8783f..cf6a1923811b 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -1930,7 +1930,6 @@ static int add_default_attributes(void)
(PERF_COUNT_HW_CACHE_RESULT_MISS << 16) },
};
- struct perf_event_attr default_null_attrs[] = {};
const char *pmu = parse_events_option_args.pmu_filter ?: "all";
/* Set attrs if no event is selected and !null_run: */
@@ -2072,10 +2071,6 @@ static int add_default_attributes(void)
evlist__splice_list_tail(evsel_list, &metric_evlist->core.entries);
evlist__delete(metric_evlist);
}
-
- /* Platform specific attrs */
- if (evlist__add_default_attrs(evsel_list, default_null_attrs) < 0)
- return -1;
}
/* Detailed events get appended to the event list: */
--
2.34.1
More information about the linux-arm-kernel
mailing list