<div dir="ltr">Hi,<div><br></div><div>Sharing this just in case it can help someone!<br></div><div><br></div><div>gcc only lets you disable instrumentation, using the `no_instrument_function` attribute, or by matching file names. It does not let you explicitly choose the individual functions you want to instrument.</div><div><br></div><div>I've searched many times for a way to do it, but never found anything for some reason, so I wrote this plugin: <a href="https://github.com/christophebedard/instrument-attribute-gcc-plugin" target="_blank">https://github.com/christophebedard/instrument-attribute-gcc-plugin</a></div><div><br></div><div>It simply enables instrumentation for functions with the `instrument_function` attribute, and disables instrumentation for all other functions.</div><div><br></div><div><br></div><div>Christophe</div><div><br></div></div>