Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 667532 - sys-devel/gdb: add use flag for intel processor trace (dev-libs/processor-trace)
Summary: sys-devel/gdb: add use flag for intel processor trace (dev-libs/processor-trace)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on: 774480
Blocks:
  Show dependency tree
 
Reported: 2018-10-02 07:07 UTC by Alexander Sergeyev
Modified: 2022-03-11 14:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Sergeyev 2018-10-02 07:07:04 UTC
GDB is able to use hardware-assisted execution traces (via Intel Processor Trace) [1]:

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 [2].

~ $ cat /etc/portage/env/gdb-econf.conf
# Requires libipt
EXTRA_ECONF="${EXTRA_ECONF} --with-intel-pt=yes"

~ $ cat /etc/portage/package.env | grep gdb
sys-devel/gdb gdb-econf.conf

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

[1] https://sourceware.org/gdb/onlinedocs/gdb/Process-Record-and-Replay.html
[2] https://github.com/bminor/binutils-gdb/blob/12b164e9a96f75ffd030d04a7633dfbb64862806/gdb/configure#L1604
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-11 14:58:01 UTC
This is a WONTFIX unless somebody maintains processor-trace (which is now being last-rited due to lack of maintenance & open bugs).