Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1620702 > unrolled thread
| Started by | David Carrillo-Cisneros <davidcc@google.com> |
|---|---|
| First post | 2017-04-10 22:20 +0200 |
| Last post | 2017-04-11 20:20 +0200 |
| Articles | 3 on this page of 23 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 0/7] perf tool: pipe-mode fixes David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
[PATCH 1/7] perf inject: don't proceed if perf_session__process_event fails David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
[tip:perf/core] perf inject: Don't proceed if perf_session__process_event() fails tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-12 07:50 +0200
[PATCH 2/7] perf inject: copy events when reordering events in pipe mode David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
Re: [PATCH 2/7] perf inject: copy events when reordering events in pipe mode Jiri Olsa <jolsa@redhat.com> - 2017-04-11 11:50 +0200
Re: [PATCH 2/7] perf inject: copy events when reordering events in pipe mode David Carrillo-Cisneros <davidcc@google.com> - 2017-04-11 21:00 +0200
[tip:perf/core] perf inject: Copy events when reordering events in pipe mode tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-12 07:50 +0200
[PATCH 4/7] perf annotate: process attr and build_id records David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
[tip:perf/core] perf annotate: Process attr and build_id records tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-12 07:50 +0200
[PATCH 6/7] perf tool: protect empty evlists David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
Re: [PATCH 6/7] perf tool: protect empty evlists Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 20:20 +0200
Re: [PATCH 6/7] perf tool: protect empty evlists David Carrillo-Cisneros <davidcc@google.com> - 2017-04-11 20:40 +0200
[PATCH 7/7] perf tool: do not print missing features in pipe-mode David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
[tip:perf/core] perf tools: Do not print missing features in pipe-mode tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-12 07:50 +0200
[PATCH 5/7] perf session: don't rely on evlist in pipe mode David Carrillo-Cisneros <davidcc@google.com> - 2017-04-10 22:20 +0200
Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 20:50 +0200
Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode David Carrillo-Cisneros <davidcc@google.com> - 2017-04-11 21:00 +0200
Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 21:50 +0200
Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 20:50 +0200
Re: [PATCH 5/7] perf session: don't rely on evlist in pipe mode Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 20:50 +0200
[tip:perf/core] perf session: Don't rely on evlist in pipe mode tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> - 2017-04-12 07:50 +0200
Re: [PATCH 0/7] perf tool: pipe-mode fixes Jiri Olsa <jolsa@redhat.com> - 2017-04-11 11:50 +0200
Re: [PATCH 0/7] perf tool: pipe-mode fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-04-11 20:20 +0200
Page 2 of 2 — ← Prev page 1 [2]
| From | tip-bot for David Carrillo-Cisneros <tipbot@zytor.com> |
|---|---|
| Date | 2017-04-12 07:50 +0200 |
| Subject | [tip:perf/core] perf session: Don't rely on evlist in pipe mode |
| Message-ID | <tvjkf-Bv-25@gated-at.bofh.it> |
| In reply to | #1620710 |
Commit-ID: 0973ad97c187e06aece61f685b9c3b2d93290a73
Gitweb: http://git.kernel.org/tip/0973ad97c187e06aece61f685b9c3b2d93290a73
Author: David Carrillo-Cisneros <davidcc@google.com>
AuthorDate: Mon, 10 Apr 2017 13:14:30 -0700
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 11 Apr 2017 16:22:20 -0300
perf session: Don't rely on evlist in pipe mode
Session sets a number parameters that rely on evlist. These parameters
are not used in pipe-mode and should not be set, since evlist is
unavailable. Fix that.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Simon Que <sque@chromium.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20170410201432.24807-6-davidcc@google.com
[ Check if file != NULL in perf_session__new(), like when used by builtin-top.c ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/session.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index a25302b..7b740a7 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -140,8 +140,14 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
if (perf_session__open(session) < 0)
goto out_close;
- perf_session__set_id_hdr_size(session);
- perf_session__set_comm_exec(session);
+ /*
+ * set session attributes that are present in perf.data
+ * but not in pipe-mode.
+ */
+ if (!file->is_pipe) {
+ perf_session__set_id_hdr_size(session);
+ perf_session__set_comm_exec(session);
+ }
}
} else {
session->machines.host.env = &perf_env;
@@ -156,7 +162,11 @@ struct perf_session *perf_session__new(struct perf_data_file *file,
pr_warning("Cannot read kernel map\n");
}
- if (tool && tool->ordering_requires_timestamps &&
+ /*
+ * In pipe-mode, evlist is empty until PERF_RECORD_HEADER_ATTR is
+ * processed, so perf_evlist__sample_id_all is not meaningful here.
+ */
+ if ((!file || !file->is_pipe) && tool && tool->ordering_requires_timestamps &&
tool->ordered_events && !perf_evlist__sample_id_all(session->evlist)) {
dump_printf("WARNING: No sample_id_all support, falling back to unordered processing\n");
tool->ordered_events = false;
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-04-11 11:50 +0200 |
| Message-ID | <tv0AV-5dh-3@gated-at.bofh.it> |
| In reply to | #1620702 |
On Mon, Apr 10, 2017 at 01:14:25PM -0700, David Carrillo-Cisneros wrote: > Various fixes for perf tool pipe-mode for bugs that arose while trying > to make this work: > > perf record -o - noploop | perf inject -b | perf annotate -i - > > David Carrillo-Cisneros (7): > perf inject: don't proceed if perf_session__process_event fails > perf inject: copy events when reordering events in pipe mode > perf tool: describe pipe mode in perf.data-file-fomat.txt > perf annotate: process attr and build_id records > perf session: don't rely on evlist in pipe mode > perf tool: protect empty evlists > perf tool: do not print missing features in pipe-mode Acked-by: Jiri Olsa <jolsa@kernel.org> thanks, jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-04-11 20:20 +0200 |
| Message-ID | <tv8yu-27K-11@gated-at.bofh.it> |
| In reply to | #1621094 |
Em Tue, Apr 11, 2017 at 11:49:06AM +0200, Jiri Olsa escreveu: > On Mon, Apr 10, 2017 at 01:14:25PM -0700, David Carrillo-Cisneros wrote: > > Various fixes for perf tool pipe-mode for bugs that arose while trying > > to make this work: > > > > perf record -o - noploop | perf inject -b | perf annotate -i - > > > > David Carrillo-Cisneros (7): > > perf inject: don't proceed if perf_session__process_event fails > > perf inject: copy events when reordering events in pipe mode > > perf tool: describe pipe mode in perf.data-file-fomat.txt > > perf annotate: process attr and build_id records > > perf session: don't rely on evlist in pipe mode > > perf tool: protect empty evlists > > perf tool: do not print missing features in pipe-mode > > Acked-by: Jiri Olsa <jolsa@kernel.org> Applied all, except 6/7, will audit all users of those first() and last() methods to check if this is ok or what changes are needed to robustify code assuming they always return an evsel (which is false, and this patch fixes, as the evlist may be empty). - Arnaldo.
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web