diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2022-08-09 11:07:02 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2022-08-10 14:30:09 -0300 |
commit | 806731a9465b42aaf887cbaf8bfee7eccc9417de (patch) | |
tree | 7a1cf71e17d762a0f7dffd5c473b999d20147ff6 /tools/perf/tests/hists_link.c | |
parent | perf tests: Fix Track with sched_switch test for hybrid case (diff) | |
download | wireguard-linux-806731a9465b42aaf887cbaf8bfee7eccc9417de.tar.xz wireguard-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/hists_link.c')
-rw-r--r-- | tools/perf/tests/hists_link.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c index c575e13a850d..14b2ff808b5e 100644 --- a/tools/perf/tests/hists_link.c +++ b/tools/perf/tests/hists_link.c @@ -276,10 +276,10 @@ static int test__hists_link(struct test_suite *test __maybe_unused, int subtest if (evlist == NULL) return -ENOMEM; - err = parse_events(evlist, "cpu-clock", NULL); + err = parse_event(evlist, "cpu-clock"); if (err) goto out; - err = parse_events(evlist, "task-clock", NULL); + err = parse_event(evlist, "task-clock"); if (err) goto out; |