https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111643
--- Comment #14 from Lukas Grätz <lukas.gra...@tu-darmstadt.de> --- (In reply to Andrew Pinski from comment #13) > (In reply to Andrew Pinski from comment #12) > > Gcc does have tail call optimization which should allow the instrumentation > > with less overhead. Though tail call optimization happens at -O2 and above > > only (by default). > > The only improvement to this would be fall through alias which allows the > removal of the jump to the other function. A direct non-conditional jump is > usually predictable so the overhead should be small still. Thanks! I thought that there was still some stack involved also causing some overhead for every function call (in comparison to a pure non-conditional jump). When I have time next week, I will try to look into that in detail.