]> git.baikalelectronics.ru Git - kernel.git/commit
perf intel-pt: Add a config for max loops without consuming a packet
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 1 Jul 2021 17:51:32 +0000 (20:51 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 7 Jul 2021 14:40:56 +0000 (11:40 -0300)
commit93439e6ee9528086db6a0eb640a7160ddd52dfe5
treee70198ffe60371758acf44486501fc2560c1c82e
parent8278de71a8d5943fa616a44a5e2eb6c00fb7c35c
perf intel-pt: Add a config for max loops without consuming a packet

The Intel PT decoder limits the number of unconditional branches (e.g.
jmps) decoded without consuming any trace packets. Generally, a loop
needs a conditional branch which generates a TNT packet, whereas a "ret"
instruction will generate a TIP or TNT packet. So exceeding the limit is
assumed to be a never-ending loop, which can happen if there has been a
decoding error putting the decoder at the wrong place in the code.

Up until now, the limit of 10000 has been enough but some analytic
purposes have been reported to exceed that.

Increase the limit to 100000, and make it configurable via perf config
intel-pt.max-loops. Also amend the "Never-ending loop" message to
mention the configuration entry.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lore.kernel.org/lkml/20210701175132.3977-1-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf-config.txt
tools/perf/util/intel-pt-decoder/intel-pt-decoder.c
tools/perf/util/intel-pt-decoder/intel-pt-decoder.h
tools/perf/util/intel-pt.c