title: gcc: how to only trace specific functions calls
body: <p>Options <code>-pg</code>, <code>-mfentry</code> and <code>-finstrument-functions</code> affects all functions in a <code>.c</code> file,
  How can I insert trace call only into specific functions, but not all?  </p>
  
  <p>I checked <a href="https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html">gcc function attributes</a> but it seems there's no counterparts to <code>-pg</code>, <code>-mfentry</code> and <code>-finstrument-functions</code> that can be used to decorate only to specific functions.  </p>
  
  <p><code>no_instrument_function</code> excludes functions but what I want is the opposite, i.e., to includes functions.</p>