perf test: Add parse-events test for aliases with hyphens
authorJohn Garry <john.garry@huawei.com>
Mon, 17 Jan 2022 15:10:15 +0000 (23:10 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 22 Jan 2022 20:21:41 +0000 (17:21 -0300)
commitb4a7276c5e9a79c238a2fad4fb9498dd3558ad2e
treeaa5dfce6cd16615ff88b00234669baae9c2fe796
parent34fa67e72085201ea94b5332eae316951331958f
perf test: Add parse-events test for aliases with hyphens

Add a test which allows us to test parsing an event alias with hyphens.

Since these events typically do not exist on most host systems, add the
alias to the fake pmu.

Function perf_pmu__test_parse_init() has terms added to match known test
aliases.

Signed-off-by: John Garry <john.garry@huawei.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Qi Liu <liuqi115@huawei.com>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: linuxarm@huawei.com
Link: https://lore.kernel.org/r/1642432215-234089-4-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/parse-events.c
tools/perf/util/parse-events.c