GDB is able to use hardware-assisted execution traces (via Intel Processor Trace) :
record method btrace pt:
Use the Intel Processor Trace recording format. In this format, the processor stores the execution trace in a compressed form that is afterwards decoded by GDB. The trace can be recorded with very low overhead. The compressed trace format also allows small trace buffers to already contain a big number of instructions compared to BTS.
The IPT support library is already in the tree (dev-libs/processor-trace), the only missing part is ./configure options .
~ $ cat /etc/portage/env/gdb-econf.conf
# Requires libipt
~ $ cat /etc/portage/package.env | grep gdb
Works for me with:
dev-libs/processor-trace-1.6.1:0 -doc -test
sys-devel/gdb-8.2:0 client lzma python xml -multitarget -nls -server -test -vanilla