Commit 400ae981 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf script: Set perf time interval in itrace_synth_ops

Instruction trace decoders can optimize output based on what time
intervals will be filtered, so pass that information in
itrace_synth_ops.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190604130017.31207-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 33526f36
...@@ -3829,6 +3829,10 @@ int cmd_script(int argc, const char **argv) ...@@ -3829,6 +3829,10 @@ int cmd_script(int argc, const char **argv)
&script.range_num); &script.range_num);
if (err < 0) if (err < 0)
goto out_delete; goto out_delete;
itrace_synth_opts__set_time_range(&itrace_synth_opts,
script.ptime_range,
script.range_num);
} }
err = __cmd_script(&script); err = __cmd_script(&script);
...@@ -3836,8 +3840,10 @@ int cmd_script(int argc, const char **argv) ...@@ -3836,8 +3840,10 @@ int cmd_script(int argc, const char **argv)
flush_scripting(); flush_scripting();
out_delete: out_delete:
if (script.ptime_range) if (script.ptime_range) {
itrace_synth_opts__clear_time_range(&itrace_synth_opts);
zfree(&script.ptime_range); zfree(&script.ptime_range);
}
perf_evlist__free_stats(session->evlist); perf_evlist__free_stats(session->evlist);
perf_session__delete(session); perf_session__delete(session);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment