Skip to content

Commit b3f58c8

Browse files
committed
perf tests parse-events: Add intel_pt parse test
To avoid regressions such as the one fixed by 4a35a90 ("Revert "perf pmu: Fix pmu events parsing rule""), where '-e intel_pt//u' got broken, with this new entry in this 'perf tests' subtest, we would have caught it before pushing upstream. Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Wang Nan <wangnan0@huawei.com> Link: https://lkml.kernel.org/n/tip-kw62fys9bwdgsp722so2ln1l@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 291c161 commit b3f58c8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎tools/perf/tests/parse-events.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,6 +1309,14 @@ static int test__checkevent_config_cache(struct perf_evlist *evlist)
13091309
return 0;
13101310
}
13111311

1312+
static int test__intel_pt(struct perf_evlist *evlist)
1313+
{
1314+
struct perf_evsel *evsel = perf_evlist__first(evlist);
1315+
1316+
TEST_ASSERT_VAL("wrong name setting", strcmp(evsel->name, "intel_pt//u") == 0);
1317+
return 0;
1318+
}
1319+
13121320
static int count_tracepoints(void)
13131321
{
13141322
struct dirent *events_ent;
@@ -1637,6 +1645,11 @@ static struct evlist_test test__events[] = {
16371645
.check = test__checkevent_config_cache,
16381646
.id = 51,
16391647
},
1648+
{
1649+
.name = "intel_pt//u",
1650+
.check = test__intel_pt,
1651+
.id = 52,
1652+
},
16401653
};
16411654

16421655
static struct evlist_test test__events_pmu[] = {

0 commit comments

Comments
 (0)