diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c index 0f93f859b782ba1701b1457cb3f90c9d1ecf5995..695ec5a50cf22c56e72961ae98ae9580a98f2512 100644 --- a/tools/perf/builtin-evlist.c +++ b/tools/perf/builtin-evlist.c @@ -24,6 +24,7 @@ static int __cmd_evlist(const char *file_name, struct perf_attr_details *details struct perf_data_file file = { .path = file_name, .mode = PERF_DATA_MODE_READ, + .force = details->force, }; session = perf_session__new(&file, 0, NULL); @@ -47,6 +48,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) "Show all event attr details"), OPT_BOOLEAN('g', "group", &details.event_group, "Show event group information"), + OPT_BOOLEAN('f', "force", &details.force, "don't complain, do it"), OPT_END() }; const char * const evlist_usage[] = { diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index dcf202aebe9f5b358716c0b321ffaecee56a6d6f..c5a43d6b13dc1bb1b2e2ae34ef314d358e05c7cd 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -335,6 +335,7 @@ struct perf_attr_details { bool freq; bool verbose; bool event_group; + bool force; }; int perf_evsel__fprintf(struct perf_evsel *evsel,