History

coresight: pmu: Adds return stack option to perf coresight pmu

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.

Mike Leach committed 9 years ago

Commit b97971b1 parent 89f00a13 files · +4 −0Browse files

Unified · Split

3 files
  1. drivers/hwtracing/coresight/coresight-etm-perf.c +2 −0
  2. include/linux/coresight-pmu.h +1 −0
  3. tools/include/linux/coresight-pmu.h +1 −0
drivers/hwtracing/coresight/coresight-etm-perf.c+2−0
@@ -53,10 +53,12 @@ static DEFINE_PER_CPU(struct coresight_device *, csdev_src); · 52 unmodified lines
53/* ETMv3.5/PTM's ETMCR is 'config' */53/* ETMv3.5/PTM's ETMCR is 'config' */
54PMU_FORMAT_ATTR(cycacc, "config:" __stringify(ETM_OPT_CYCACC));54PMU_FORMAT_ATTR(cycacc, "config:" __stringify(ETM_OPT_CYCACC));
55PMU_FORMAT_ATTR(timestamp, "config:" __stringify(ETM_OPT_TS));55PMU_FORMAT_ATTR(timestamp, "config:" __stringify(ETM_OPT_TS));
56PMU_FORMAT_ATTR(retstack, "config:" __stringify(ETM_OPT_RETSTK));
56 57
57static struct attribute *etm_config_formats_attr[] = {58static struct attribute *etm_config_formats_attr[] = {
58 &format_attr_cycacc.attr,59 &format_attr_cycacc.attr,
59 &format_attr_timestamp.attr,60 &format_attr_timestamp.attr,
61 &format_attr_retstack.attr,
60 NULL,62 NULL,
61};63};
62 64
include/linux/coresight-pmu.h+1−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
24/* ETMv3.5/PTM's ETMCR config bit */24/* ETMv3.5/PTM's ETMCR config bit */
25#define ETM_OPT_CYCACC 1225#define ETM_OPT_CYCACC 12
26#define ETM_OPT_TS 2826#define ETM_OPT_TS 28
27#define ETM_OPT_RETSTK 29
27 28
28static inline int coresight_get_trace_id(int cpu)29static inline int coresight_get_trace_id(int cpu)
29{30{
tools/include/linux/coresight-pmu.h+1−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
24/* ETMv3.5/PTM's ETMCR config bit */24/* ETMv3.5/PTM's ETMCR config bit */
25#define ETM_OPT_CYCACC 1225#define ETM_OPT_CYCACC 12
26#define ETM_OPT_TS 2826#define ETM_OPT_TS 28
27#define ETM_OPT_RETSTK 29
27 28
28static inline int coresight_get_trace_id(int cpu)29static inline int coresight_get_trace_id(int cpu)
29{30{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t