AMD "Smart Trace Buffer" Feature Being Wired Up For Linux

Written by Michael Larabel in AMD on 21 October 2021 at 06:15 AM EDT. 11 Comments
AMD patches this month have begun preparing support for a new CPU feature called Smart Trace Buffer (STB).

Earlier this month the initial patch was posted for enabling AMD Smart Trace Buffer support on Linux as an extension to AMD's PMC kernel driver. This morning the STB enablement has already been revised in a second version of the patches.

AMD Smart Trace Buffer is described by the patches as "a debug trace buffer which is used to help isolate failures by analyzing the last feature that a system was running before hitting a failure. This nonintrusive way is always running in the background and trace is stored into the SoC."

It's basically a means of helping to isolate where a system problem may have occurred. Adding the Smart Trace Buffer support to the AMD PMC driver is little more than one hundred lines of code. The Smart Trace Buffer contents can then be read on the system via DebugFS with a new file named stb_read. Enabling it can be done via the amd_pmc.enable_stb=1 module parameter with it at least for now not being enabled by default from the driver reporting side.

Intel's Trace Hub is somewhat along similar lines but appearing to be much more feature-rich than AMD Smart Trace Buffer with a broader scope in offering many more features around system debug. Intel Trace Hub has also been supported under Linux for a while via the intel_th driver.

The v2 patch was posted this morning on the kernel mailing list. Besides the discussion around this patch work, I haven't been able to find any other substantive public information on AMD Smart Trace Buffer. But there was a reference to Smart Trace Buffer from some Cezanne PSP firmware hits, so it's at least been present in AMD SoCs already. From the patch discussion around AMD STB there was also some excitement that this functionality may also help the AMD engineers in debugging some of the outstanding suspend-to-idle issues plaguing some AMD Linux systems.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week