Skip to content

Commit 1d846ae

Browse files
ahunter6acmel
authored andcommitted
perf intel-pt: Use itrace error flags to suppress some errors
The itrace "e" option may be followed by flags which affect what errors will or will not be reported. Each flag must be preceded by either '+' or '-'. The flags supported by Intel PT are: -o Suppress overflow errors -l Suppress trace data lost errors For example, for errors but not overflow or data lost errors: --itrace=e-o-l Suppressing those errors can be useful for testing and debugging because they are not due to decoding. Signed-off-by: Adrian Hunter <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Cc: Jiri Olsa <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent cb97143 commit 1d846ae

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

tools/perf/Documentation/perf-intel-pt.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,14 @@ Developer Manuals.
871871

872872
Error events show where the decoder lost the trace. Error events
873873
are quite important. Users must know if what they are seeing is a complete
874-
picture or not.
874+
picture or not. The "e" option may be followed by flags which affect what errors
875+
will or will not be reported. Each flag must be preceded by either '+' or '-'.
876+
The flags supported by Intel PT are:
877+
-o Suppress overflow errors
878+
-l Suppress trace data lost errors
879+
For example, for errors but not overflow or data lost errors:
880+
881+
--itrace=e-o-l
875882

876883
The "d" option will cause the creation of a file "intel_pt.log" containing all
877884
decoded packets and instructions. Note that this option slows down the decoder

tools/perf/util/intel-pt.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,15 @@ static int intel_pt_synth_error(struct intel_pt *pt, int code, int cpu,
18631863
char msg[MAX_AUXTRACE_ERROR_MSG];
18641864
int err;
18651865

1866+
if (pt->synth_opts.error_minus_flags) {
1867+
if (code == INTEL_PT_ERR_OVR &&
1868+
pt->synth_opts.error_minus_flags & AUXTRACE_ERR_FLG_OVERFLOW)
1869+
return 0;
1870+
if (code == INTEL_PT_ERR_LOST &&
1871+
pt->synth_opts.error_minus_flags & AUXTRACE_ERR_FLG_DATA_LOST)
1872+
return 0;
1873+
}
1874+
18661875
intel_pt__strerror(code, msg, MAX_AUXTRACE_ERROR_MSG);
18671876

18681877
auxtrace_synth_error(&event.auxtrace_error, PERF_AUXTRACE_ERROR_ITRACE,

0 commit comments

Comments
 (0)