提交 051a01b9 编写于 作者: A Adrian Hunter 提交者: Arnaldo Carvalho de Melo

perf inject: Set branch stack feature flag when synthesizing branch stacks

The branch stack feature flag is set by 'perf record' when recording
data that contains branch stacks.  Consequently, when 'perf inject'
synthesizes branch stacks, the feature flag should be set also.
Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-13-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 f86225db
......@@ -537,9 +537,13 @@ static int __cmd_inject(struct perf_inject *inject)
* The AUX areas have been removed and replaced with
* synthesized hardware events, so clear the feature flag.
*/
if (inject->itrace_synth_opts.set)
if (inject->itrace_synth_opts.set) {
perf_header__clear_feat(&session->header,
HEADER_AUXTRACE);
if (inject->itrace_synth_opts.last_branch)
perf_header__set_feat(&session->header,
HEADER_BRANCH_STACK);
}
session->header.data_offset = output_data_offset;
session->header.data_size = inject->bytes_written;
perf_session__write_header(session, session->evlist, fd, true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册