perf cs-etm: Support PID tracing in config
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 24 Feb 2021 16:48:33 +0000 (09:48 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Mar 2021 12:48:22 +0000 (09:48 -0300)
commit30cb76aabfb4deab4ffef54882f86df319b4d862
tree873102dcfe076f8e4472b1d71e706d83c38af9fb
parent8c559e8d68630d64d932bada633705f6551427df
perf cs-etm: Support PID tracing in config

If the kernel is running at EL2, the pid of a task is exposed via VMID
instead of the CONTEXTID.  Add support for this in the perf tool.

This patch respects user setting if user has specified any configs
from "contextid", "contextid1" or "contextid2"; otherwise, it
dynamically sets config based on PMU format "contextid".

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Co-developed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Al Grant <al.grant@arm.com>
Link: https://lore.kernel.org/r/20210213113220.292229-4-leo.yan@linaro.org
Link: https://lore.kernel.org/r/20210224164835.3497311-5-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/linux/coresight-pmu.h
tools/perf/arch/arm/util/cs-etm.c