Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670197
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/23] perf coresight: Remove superfluous check before use |
| Date | 2017-06-20 04:10 +0200 |
| Message-ID | <tUgM9-2p5-3@gated-at.bofh.it> (permalink) |
| References | <tUgCu-27M-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Kim Phillips <kim.phillips@arm.com>
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>
---
tools/perf/arch/arm/util/cs-etm.c | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index 02a649bfec3c..7ce3d1a25133 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -203,19 +203,18 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
pr_debug2("%s snapshot size: %zu\n", CORESIGHT_ETM_PMU_NAME,
opts->auxtrace_snapshot_size);
- if (cs_etm_evsel) {
- /*
- * To obtain the auxtrace buffer file descriptor, the auxtrace
- * event must come first.
- */
- perf_evlist__to_front(evlist, cs_etm_evsel);
- /*
- * In the case of per-cpu mmaps, we need the CPU on the
- * AUX event.
- */
- if (!cpu_map__empty(cpus))
- perf_evsel__set_sample_bit(cs_etm_evsel, CPU);
- }
+ /*
+ * To obtain the auxtrace buffer file descriptor, the auxtrace
+ * event must come first.
+ */
+ perf_evlist__to_front(evlist, cs_etm_evsel);
+
+ /*
+ * In the case of per-cpu mmaps, we need the CPU on the
+ * AUX event.
+ */
+ if (!cpu_map__empty(cpus))
+ perf_evsel__set_sample_bit(cs_etm_evsel, CPU);
/* Add dummy event to keep tracking */
if (opts->full_auxtrace) {
--
2.9.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/23] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 09/23] tools: Adopt noinline from kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 11/23] tools: Adopt __aligned from kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 08/23] perf tools: Use __maybe_unused consistently Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 05/23] tools: Adopt __noreturn from kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 18/23] perf ftrace: Show error message when fails to set ftrace files Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 03/23] perf config: Invert an if statement to reduce nesting in cmd_config() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 19/23] perf ftrace: Move setup_pager before opening trace_pipe Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 13/23] perf intel-pt/bts: Remove unused SAMPLE_SIZE defines and bts priv array Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:00 +0200 [PATCH 12/23] perf coresight: Remove superfluous check before use Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:10 +0200 [PATCH 06/23] tools: Adopt __printf from kernel sources Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:10 +0200 [PATCH 17/23] perf script: Support -F brstackoff,dso Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-06-20 04:10 +0200 Re: [GIT PULL 00/23] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2017-06-20 11:00 +0200
csiph-web