Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf s390-cpumsf: Implement ->evsel_is_auxtrace() callback

Implement ->evsel_is_auxtrace() callback.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Thomas Richter <tmricht@linux.ibm.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200401101613.6201-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
113fcb46 a58ab57c

+10
+1
tools/perf/util/s390-cpumcf-kernel.h
··· 11 11 12 12 #define S390_CPUMCF_DIAG_DEF 0xfeef /* Counter diagnostic entry ID */ 13 13 #define PERF_EVENT_CPUM_CF_DIAG 0xBC000 /* Event: Counter sets */ 14 + #define PERF_EVENT_CPUM_SF_DIAG 0xBD000 /* Event: Combined-sampling */ 14 15 15 16 struct cf_ctrset_entry { /* CPU-M CF counter set entry (8 byte) */ 16 17 unsigned int def:16; /* 0-15 Data Entry Format */
+9
tools/perf/util/s390-cpumsf.c
··· 1047 1047 free(sf); 1048 1048 } 1049 1049 1050 + static bool 1051 + s390_cpumsf_evsel_is_auxtrace(struct perf_session *session __maybe_unused, 1052 + struct evsel *evsel) 1053 + { 1054 + return evsel->core.attr.type == PERF_TYPE_RAW && 1055 + evsel->core.attr.config == PERF_EVENT_CPUM_SF_DIAG; 1056 + } 1057 + 1050 1058 static int s390_cpumsf_get_type(const char *cpuid) 1051 1059 { 1052 1060 int ret, family = 0; ··· 1150 1142 sf->auxtrace.flush_events = s390_cpumsf_flush; 1151 1143 sf->auxtrace.free_events = s390_cpumsf_free_events; 1152 1144 sf->auxtrace.free = s390_cpumsf_free; 1145 + sf->auxtrace.evsel_is_auxtrace = s390_cpumsf_evsel_is_auxtrace; 1153 1146 session->auxtrace = &sf->auxtrace; 1154 1147 1155 1148 if (dump_trace)