]> git.baikalelectronics.ru Git - kernel.git/commit
perf tests: Add test for PMU aliases
authorJin Yao <yao.jin@linux.intel.com>
Thu, 2 Sep 2021 06:59:55 +0000 (14:59 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 3 Sep 2021 11:38:49 +0000 (08:38 -0300)
commit7fc66af924880bb4d86c460c00c64d13847b5095
treece29f3a6095cef38ae18dff52e7c3c2662fc2b58
parente83b1f4786d02944092d4881e99076e609ebcd02
perf tests: Add test for PMU aliases

A perf uncore PMU may have two PMU names, a real name and an alias.

Add one test case to verify that the real and alias names have the same
effect.

Iterate sysfs to get one event which has an alias and create an evlist
by adding two evsels. Evsel1 is created by event and evsel2 is created
by alias.

Test asserts:

  evsel1->core.attr.type == evsel2->core.attr.type
  evsel1->core.attr.config == evsel2->core.attr.config

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Riccardo Mancini <rickyman7@gmail.com>
Link: http://lore.kernel.org/lkml/20210902065955.1299-3-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/parse-events.c