summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-03-12 14:14:57 +0300
committerIngo Molnar <mingo@kernel.org>2018-03-12 14:14:57 +0300
commit9884afa2fdce71cd35bb79303f9050f0d76e3d03 (patch)
treee4bd1187eee271fd93b8a99c5a951afaa53c4d80 /tools/perf/builtin-record.c
parentfbfcd0199170984bd3c2812e49ed0fe7b226959a (diff)
parent0c8efd610b58cb23cefdfa12015799079aef94ae (diff)
downloadlinux-9884afa2fdce71cd35bb79303f9050f0d76e3d03.tar.xz
Merge tag 'v4.16-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index bf4ca749d1ac..a217623fec2e 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -881,6 +881,15 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
}
}
+ /*
+ * If we have just single event and are sending data
+ * through pipe, we need to force the ids allocation,
+ * because we synthesize event name through the pipe
+ * and need the id for that.
+ */
+ if (data->is_pipe && rec->evlist->nr_entries == 1)
+ rec->opts.sample_id = true;
+
if (record__open(rec) != 0) {
err = -1;
goto out_child;