diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2022-08-09 10:07:02 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-08-10 19:30:09 +0200 |
commit | 806731a9465b42aaf887cbaf8bfee7eccc9417de (patch) | |
tree | 7a1cf71e17d762a0f7dffd5c473b999d20147ff6 /tools/perf/tests/evsel-roundtrip-name.c | |
parent | perf tests: Fix Track with sched_switch test for hybrid case (diff) | |
download | linux-806731a9465b42aaf887cbaf8bfee7eccc9417de.tar.xz linux-806731a9465b42aaf887cbaf8bfee7eccc9417de.zip |
perf tools: Do not pass NULL to parse_events()
Many cases do not use the extra error information provided by
parse_events and instead pass NULL as the struct parse_events_error
pointer. Add a wrapper for those cases so that the pointer is never
NULL.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20220809080702.6921-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/evsel-roundtrip-name.c')
-rw-r--r-- | tools/perf/tests/evsel-roundtrip-name.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/evsel-roundtrip-name.c b/tools/perf/tests/evsel-roundtrip-name.c index 9d3c64974f77..e94fed901992 100644 --- a/tools/perf/tests/evsel-roundtrip-name.c +++ b/tools/perf/tests/evsel-roundtrip-name.c @@ -27,7 +27,7 @@ static int perf_evsel__roundtrip_cache_name_test(void) for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) { __evsel__hw_cache_type_op_res_name(type, op, i, name, sizeof(name)); - err = parse_events(evlist, name, NULL); + err = parse_event(evlist, name); if (err) ret = err; } @@ -75,7 +75,7 @@ static int __perf_evsel__name_array_test(const char *const names[], int nr_names return -ENOMEM; for (i = 0; i < nr_names; ++i) { - err = parse_events(evlist, names[i], NULL); + err = parse_event(evlist, names[i]); if (err) { pr_debug("failed to parse event '%s', err %d\n", names[i], err); |