title: Why does my program spent 85% of CPU cycles in _fini?
body: <p>I had a little surprise after profiling my program with oprofile. </p>
  
  <p>The profile shows that my program spend 85% in <code>_fini</code>: </p>
  
  <blockquote>
    <p>CPU: Intel Core/i7, speed 1199 MHz (estimated) Counted
    CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit
    mask of 0x00 (No unit mask) count 100000 samples  %        image name 
    symbol name 553519   85.7402  eddic                    _fini</p>
  </blockquote>
  
  <p>The other symbols looks good. </p>
  
  <p>My program is compiled with GCC 4.7. </p>
  
  <p>From what I understand, the symbol <code>_fini</code> is a deprecated construct for global destruction, so I don't get why my program spend so much time in this symbol.</p>
  
  <p>Can that result from a bad configuration of oprofile or of GCC ? </p>
  
  <p>I tried to profile the unoptimized code and the problem is not present. There are no such symbol with no optimizations. </p>
  
  <p>Is there a way to fix the profile or to avoid spend so much time in <code>_fini</code> ? </p>
  
  <p>I can't paste my paste as it very very long, I didn't isolate the problem. </p>
  
  <p>Thanks for any idea</p>