| From 2ad7cd8c9d2dec06de2c5f788129d51421d6948a Mon Sep 17 00:00:00 2001 |
| From: James Clark <james.clark@arm.com> |
| Date: Mon, 17 May 2021 16:17:39 +0300 |
| Subject: [PATCH 1/3] perf cs-etm: Move synth_opts initialisation |
| |
| Move initialisation of synth_opts earlier in the function |
| so that synth_opts can be used at an earlier stage in a |
| later commit. |
| |
| Signed-off-by: James Clark <james.clark@arm.com> |
| Reviewed-by: Leo Yan <leo.yan@linaro.org> |
| Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> |
| Cc: Al Grant <al.grant@arm.com> |
| Cc: Anshuman Khandual <anshuman.khandual@arm.com> |
| Cc: Branislav Rankov <branislav.rankov@arm.com> |
| Cc: Denis Nikitin <denik@chromium.org> |
| Cc: Jiri Olsa <jolsa@redhat.com> |
| Cc: John Garry <john.garry@huawei.com> |
| Cc: Mark Rutland <mark.rutland@arm.com> |
| Cc: Mathieu Poirier <mathieu.poirier@linaro.org> |
| Cc: Mike Leach <mike.leach@linaro.org> |
| Cc: Namhyung Kim <namhyung@kernel.org> |
| Cc: Suzuki Poulouse <suzuki.poulose@arm.com> |
| Cc: Will Deacon <will@kernel.org> |
| Cc: coresight@lists.linaro.org |
| Cc: linux-arm-kernel@lists.infradead.org |
| Link: http://lore.kernel.org/lkml/20210517131741.3027-2-james.clark@arm.com |
| Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> |
| --- |
| tools/perf/util/cs-etm.c | 16 ++++++++-------- |
| 1 file changed, 8 insertions(+), 8 deletions(-) |
| |
| diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c |
| index 5095c1c4c6df..2af9ab5ca3fd 100644 |
| --- a/tools/perf/util/cs-etm.c |
| +++ b/tools/perf/util/cs-etm.c |
| @@ -2764,6 +2764,14 @@ int cs_etm__process_auxtrace_info(union perf_event *event, |
| if (err) |
| goto err_free_etm; |
| |
| + if (session->itrace_synth_opts->set) { |
| + etm->synth_opts = *session->itrace_synth_opts; |
| + } else { |
| + itrace_synth_opts__set_default(&etm->synth_opts, |
| + session->itrace_synth_opts->default_no_sample); |
| + etm->synth_opts.callchain = false; |
| + } |
| + |
| etm->session = session; |
| etm->machine = &session->machines.host; |
| |
| @@ -2807,14 +2815,6 @@ int cs_etm__process_auxtrace_info(union perf_event *event, |
| return 0; |
| } |
| |
| - if (session->itrace_synth_opts->set) { |
| - etm->synth_opts = *session->itrace_synth_opts; |
| - } else { |
| - itrace_synth_opts__set_default(&etm->synth_opts, |
| - session->itrace_synth_opts->default_no_sample); |
| - etm->synth_opts.callchain = false; |
| - } |
| - |
| err = cs_etm__synth_events(etm, session); |
| if (err) |
| goto err_delete_thread; |
| -- |
| 2.32.0.605.g8dce9f2422-goog |
| |