perf tests: Add hybrid cases for 'Roundtrip evsel->name' test
authorJin Yao <yao.jin@linux.intel.com>
Tue, 27 Apr 2021 07:01:32 +0000 (15:01 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 29 Apr 2021 13:31:00 +0000 (10:31 -0300)
commitafff9f312e37c64a789aad0fab1ec597404a500f
tree2c80da9a5484d7a37b03bc5ca9d53dd0c42f028c
parent2541cb63ac0c3dfbbe363dd09a16dfdd4096fc88
perf tests: Add hybrid cases for 'Roundtrip evsel->name' test

Since for one hw event, two hybrid events are created.

For example,

evsel->idx      evsel__name(evsel)
0               cycles
1               cycles
2               instructions
3               instructions
...

So for comparing the evsel name on hybrid, the evsel->idx
needs to be divided by 2.

  # ./perf test 14
  14: Roundtrip evsel->name                                           : Ok

Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210427070139.25256-20-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/evsel-roundtrip-name.c