Commit 0d9b5136 authored by Jiri Olsa's avatar Jiri Olsa Committed by Greg Kroah-Hartman

perf record: Synthesize features before events in pipe mode

[ Upstream commit a2015516 ]

We need to synthesize events first, because some features works on top
of them (on report side).
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Tested-by: default avatarStephane Eranian <eranian@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180314092205.23291-1-jolsa@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 179c8da7
......@@ -800,13 +800,10 @@ static int record__synthesize(struct record *rec, bool tail)
return 0;
if (file->is_pipe) {
err = perf_event__synthesize_features(
tool, session, rec->evlist, process_synthesized_event);
if (err < 0) {
pr_err("Couldn't synthesize features.\n");
return err;
}
/*
* We need to synthesize events first, because some
* features works on top of them (on report side).
*/
err = perf_event__synthesize_attrs(tool, session,
process_synthesized_event);
if (err < 0) {
......@@ -814,6 +811,13 @@ static int record__synthesize(struct record *rec, bool tail)
goto out;
}
err = perf_event__synthesize_features(tool, session, rec->evlist,
process_synthesized_event);
if (err < 0) {
pr_err("Couldn't synthesize features.\n");
return err;
}
if (have_tracepoints(&rec->evlist->entries)) {
/*
* FIXME err <= 0 here actually means that
......
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