https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119719
Andi Kleen <andi-gcc at firstfloor dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andi-gcc at firstfloor dot org --- Comment #3 from Andi Kleen <andi-gcc at firstfloor dot org> --- autofdo is probably too big for 32K, so it would be only possible over JTAG. But if they just need call/return profiling gcc already has all the hooks to do it with a user provided library by generating custom calls with -pg/-mfentry/-minstrument-return etc., or even patch it in dynamically at runtime. For example the Linux kernel uses this extensively for ftrace and side channel mitigations, so it has good coverage. For calls (not returns) a simple implementation is here https://github.com/andikleen/ftracer If it's an obscure architecture it might not be implemented for it though.