@@ -2819,6 +2819,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;
@@ -2863,14 +2871,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;
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> --- tools/perf/util/cs-etm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)