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.
Unified · Split
| @@ -53,10 +53,12 @@ static DEFINE_PER_CPU(struct coresight_device *, csdev_src); · 52 unmodified lines | ||
| 53 | 53 | /* ETMv3.5/PTM's ETMCR is 'config' */ |
| 54 | 54 | PMU_FORMAT_ATTR(cycacc, "config:" __stringify(ETM_OPT_CYCACC)); |
| 55 | 55 | PMU_FORMAT_ATTR(timestamp, "config:" __stringify(ETM_OPT_TS)); |
| 56 | +PMU_FORMAT_ATTR(retstack, "config:" __stringify(ETM_OPT_RETSTK)); | |
| 56 | 57 | |
| 57 | 58 | static struct attribute *etm_config_formats_attr[] = { |
| 58 | 59 | &format_attr_cycacc.attr, |
| 59 | 60 | &format_attr_timestamp.attr, |
| 61 | + &format_attr_retstack.attr, | |
| 60 | 62 | NULL, |
| 61 | 63 | }; |
| 62 | 64 | |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | /* ETMv3.5/PTM's ETMCR config bit */ |
| 25 | 25 | #define ETM_OPT_CYCACC 12 |
| 26 | 26 | #define ETM_OPT_TS 28 |
| 27 | +#define ETM_OPT_RETSTK 29 | |
| 27 | 28 | |
| 28 | 29 | static inline int coresight_get_trace_id(int cpu) |
| 29 | 30 | { |
| @@ -24,6 +24,7 @@ · 23 unmodified lines | ||
| 24 | 24 | /* ETMv3.5/PTM's ETMCR config bit */ |
| 25 | 25 | #define ETM_OPT_CYCACC 12 |
| 26 | 26 | #define ETM_OPT_TS 28 |
| 27 | +#define ETM_OPT_RETSTK 29 | |
| 27 | 28 | |
| 28 | 29 | static inline int coresight_get_trace_id(int cpu) |
| 29 | 30 | { |