perf parse-events: Set numeric term config
authorJohn Garry <john.garry@huawei.com>
Thu, 16 Sep 2021 12:34:21 +0000 (20:34 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 Sep 2021 19:14:05 +0000 (16:14 -0300)
commit4f9d4f8aa7328068a2f25cfb3d1d04c1b6fa54ac
treec909c91ff193b1512fefb196ad5efd4c3c94945e
parent08efcb4a638d260ef7fcbae64ecf7ceceb3f1841
perf parse-events: Set numeric term config

For numeric terms, the config field may be NULL as it is not set from
the l+y parsing.

Fix by setting the term config from the term type name.

Also fix up the pmu-events test to set the alias strings to set the
period term properly, and fix up parse-events test to check the term
config string.

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: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxarm@huawei.com
Cc: liuqi115@huawei.com
Link: https://lore.kernel.org/r/1631795665-240946-2-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/tests/pmu-events.c
tools/perf/util/parse-events.c