Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1232820
| From | Adrian Hunter <adrian.hunter@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 12/25] perf inject: Set branch stack feature flag when synthesizing branch stacks |
| Date | 2015-09-25 15:30 +0200 |
| Message-ID | <qcBez-2Eq-55@gated-at.bofh.it> (permalink) |
| References | <qcB4S-2t3-5@gated-at.bofh.it> |
| Organization | Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki |
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: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/builtin-inject.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index f62c49b35be0..8638fad8a085 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -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);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/25] perf tools: minor improvements to Intel PT related stuff Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[PATCH 01/25] perf auxtrace: Fix 'instructions' period of zero Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
Re: [PATCH 01/25] perf auxtrace: Fix 'instructions' period of zero Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 16:20 +0200
Re: [PATCH 01/25] perf auxtrace: Fix 'instructions' period of zero Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 16:20 +0200
[tip:perf/core] perf auxtrace: Fix 'instructions' period of zero tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 11:00 +0200
[PATCH 12/25] perf inject: Set branch stack feature flag when synthesizing branch stacks Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[tip:perf/core] perf inject: Set branch stack feature flag when synthesizing branch stacks tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 10:50 +0200
[PATCH 04/25] perf intel-pt: Make logging slightly more efficient Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[tip:perf/core] perf intel-pt: Make logging slightly more efficient tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 10:50 +0200
[PATCH 07/25] perf tools: Add more documentation to export-to-postgresql.py script Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[tip:perf/core] perf tools: Add more documentation to export-to-postgresql.py script tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 10:50 +0200
[PATCH 21/25] perf tools: Add perf_evlist__id2evsel_strict() Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[tip:perf/core] perf evlist: Add perf_evlist__id2evsel_strict() tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 10:50 +0200
[PATCH 14/25] perf intel-pt: Support generating branch stack Adrian Hunter <adrian.hunter@intel.com> - 2015-09-25 15:30 +0200
[tip:perf/core] perf intel-pt: Support generating branch stack tip-bot for Adrian Hunter <tipbot@zytor.com> - 2015-09-29 10:50 +0200
Re: [PATCH 00/25] perf tools: minor improvements to Intel PT related stuff Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-09-28 22:40 +0200
Re: [PATCH 00/25] perf tools: minor improvements to Intel PT related stuff Adrian Hunter <adrian.hunter@intel.com> - 2015-09-29 13:20 +0200
csiph-web