perf tools: Fix misleading add event PMU debug message
Fix incorrect debug message:
Attempting to add event pmu 'intel_pt' with '' that may result in
non-fatal errors
which always appears with perf record -vv and intel_pt e.g.
perf record -vv -e intel_pt//u uname
The message is incorrect because there will never be non-fatal errors.
Suppress the message if the PMU is 'selectable' i.e. meant to be
selected directly as an event.
Fixes: 4ac22b484d ("perf parse-events: Make add PMU verbose output clearer")
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Link: http://lore.kernel.org/lkml/20220411061758.2458417-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
a19944809f
commit
f034fc50d3
@@ -1523,7 +1523,9 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
|
|||||||
bool use_uncore_alias;
|
bool use_uncore_alias;
|
||||||
LIST_HEAD(config_terms);
|
LIST_HEAD(config_terms);
|
||||||
|
|
||||||
if (verbose > 1) {
|
pmu = parse_state->fake_pmu ?: perf_pmu__find(name);
|
||||||
|
|
||||||
|
if (verbose > 1 && !(pmu && pmu->selectable)) {
|
||||||
fprintf(stderr, "Attempting to add event pmu '%s' with '",
|
fprintf(stderr, "Attempting to add event pmu '%s' with '",
|
||||||
name);
|
name);
|
||||||
if (head_config) {
|
if (head_config) {
|
||||||
@@ -1536,7 +1538,6 @@ int parse_events_add_pmu(struct parse_events_state *parse_state,
|
|||||||
fprintf(stderr, "' that may result in non-fatal errors\n");
|
fprintf(stderr, "' that may result in non-fatal errors\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
pmu = parse_state->fake_pmu ?: perf_pmu__find(name);
|
|
||||||
if (!pmu) {
|
if (!pmu) {
|
||||||
char *err_str;
|
char *err_str;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user