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

perf intel-pt: Fix displaying PEBS-via-PT with registers

After recording PEBS-via-PT, perf script will not accept 'iregs' field e.g.

 # perf record -c 10000 -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -I -- ls -l
 ...
 [ perf record: Woken up 1 times to write data ]
 [ perf record: Captured and wrote 0.062 MB perf.data ]
 # ./perf script --itrace=eop -F+iregs
 Samples for 'dummy:u' event do not have IREGS attribute set. Cannot print 'iregs' field.

Fix by using allow_user_set, which is true when recording AUX area data.

Fixes: 9e64cefe ("perf intel-pt: Process options for PEBS event synthesis")
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Luwei Kang <luwei.kang@intel.com>
Link: http://lore.kernel.org/lkml/20200630133935.11150-3-adrian.hunter@intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 75bcb877
......@@ -462,7 +462,7 @@ static int perf_evsel__check_attr(struct evsel *evsel, struct perf_session *sess
return -EINVAL;
if (PRINT_FIELD(IREGS) &&
evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", PERF_OUTPUT_IREGS))
evsel__do_check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", PERF_OUTPUT_IREGS, allow_user_set))
return -EINVAL;
if (PRINT_FIELD(UREGS) &&
......
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