coresight: pmu: Adds return stack option to perf coresight pmu
authorMike Leach <mike.leach@linaro.org>
Wed, 2 Aug 2017 16:22:01 +0000 (10:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:05:48 +0000 (16:05 +0200)
Return stack is a programmable option on some ETM and PTM hardware.
Adds the option flags to enable this from the perf event command line.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm-perf.c
include/linux/coresight-pmu.h
tools/include/linux/coresight-pmu.h

index ad01dfe..8a0ad77 100644 (file)
@@ -53,10 +53,12 @@ static DEFINE_PER_CPU(struct coresight_device *, csdev_src);
 /* ETMv3.5/PTM's ETMCR is 'config' */
 PMU_FORMAT_ATTR(cycacc,                "config:" __stringify(ETM_OPT_CYCACC));
 PMU_FORMAT_ATTR(timestamp,     "config:" __stringify(ETM_OPT_TS));
+PMU_FORMAT_ATTR(retstack,      "config:" __stringify(ETM_OPT_RETSTK));
 
 static struct attribute *etm_config_formats_attr[] = {
        &format_attr_cycacc.attr,
        &format_attr_timestamp.attr,
+       &format_attr_retstack.attr,
        NULL,
 };
 
index 7d41026..45852c2 100644 (file)
@@ -24,6 +24,7 @@
 /* ETMv3.5/PTM's ETMCR config bit */
 #define ETM_OPT_CYCACC  12
 #define ETM_OPT_TS      28
+#define ETM_OPT_RETSTK 29
 
 static inline int coresight_get_trace_id(int cpu)
 {
index 7d41026..45852c2 100644 (file)
@@ -24,6 +24,7 @@
 /* ETMv3.5/PTM's ETMCR config bit */
 #define ETM_OPT_CYCACC  12
 #define ETM_OPT_TS      28
+#define ETM_OPT_RETSTK 29
 
 static inline int coresight_get_trace_id(int cpu)
 {