Commit 94d3820f authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo

perf evlist: Allow multiple read formats

Tools find the correct evsel, and therefore read format, using the event
ID, so it isn't necessary for all read formats to be the same. In the
case of leader-sampling of AUX area events, dummy tracking events will
have a different read format, so relax the validation to become a debug
message only.
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20200401101613.6201-16-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 3713eb37
...@@ -1131,8 +1131,10 @@ bool perf_evlist__valid_read_format(struct evlist *evlist) ...@@ -1131,8 +1131,10 @@ bool perf_evlist__valid_read_format(struct evlist *evlist)
u64 sample_type = first->core.attr.sample_type; u64 sample_type = first->core.attr.sample_type;
evlist__for_each_entry(evlist, pos) { evlist__for_each_entry(evlist, pos) {
if (read_format != pos->core.attr.read_format) if (read_format != pos->core.attr.read_format) {
return false; pr_debug("Read format differs %#" PRIx64 " vs %#" PRIx64 "\n",
read_format, (u64)pos->core.attr.read_format);
}
} }
/* PERF_SAMPLE_READ imples PERF_FORMAT_ID. */ /* PERF_SAMPLE_READ imples PERF_FORMAT_ID. */
......
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