GCC 9 Lands Support For Intel PTWRITE
PTWRITE is a new instruction for Intel CPUs that allows writing values into the processor trace (PT) log. The intention of this is for allowing lightweight instrumentation/tracing of programs. The PTWRITE instruction is initially supported by Intel Geminilake / Goldmont Plus hardware.
The work is now merged and ready for the GCC 9.1 stable release due out in early 2019.
Intel's ICC compiler has already supported PTWRITE and LLVM/Clang has also supported it since earlier this year. There are also various Linux kernel patches making use of PTWRITE.