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

perf coresight: Remove superfluous check before use

The cs_etm_evsel variable is guaranteed to be set at this point in
cs_etm_recording_options().

Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20170615125521.80cc128dc856bc1f2e61b730@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Kim Phillips and committed by
Arnaldo Carvalho de Melo
0c788d47 5c97cac6

+12 -13
+12 -13
tools/perf/arch/arm/util/cs-etm.c
··· 203 203 pr_debug2("%s snapshot size: %zu\n", CORESIGHT_ETM_PMU_NAME, 204 204 opts->auxtrace_snapshot_size); 205 205 206 - if (cs_etm_evsel) { 207 - /* 208 - * To obtain the auxtrace buffer file descriptor, the auxtrace 209 - * event must come first. 210 - */ 211 - perf_evlist__to_front(evlist, cs_etm_evsel); 212 - /* 213 - * In the case of per-cpu mmaps, we need the CPU on the 214 - * AUX event. 215 - */ 216 - if (!cpu_map__empty(cpus)) 217 - perf_evsel__set_sample_bit(cs_etm_evsel, CPU); 218 - } 206 + /* 207 + * To obtain the auxtrace buffer file descriptor, the auxtrace 208 + * event must come first. 209 + */ 210 + perf_evlist__to_front(evlist, cs_etm_evsel); 211 + 212 + /* 213 + * In the case of per-cpu mmaps, we need the CPU on the 214 + * AUX event. 215 + */ 216 + if (!cpu_map__empty(cpus)) 217 + perf_evsel__set_sample_bit(cs_etm_evsel, CPU); 219 218 220 219 /* Add dummy event to keep tracking */ 221 220 if (opts->full_auxtrace) {