"Muhammed Fawzy" <mfawzymkh@xxxxxxxxxxx> writes: > I see, so even writing a plugin to alter the instruction stream > wouldn't help? In this case, probably not. The call to mcount is generated very late. > is it possible to have a flag for gcc to store registers around mcount > calls - through a patch or something, right now apple implementation > for mcount doesn't store registers - except for ebx, esi , and edi, > which technically render the -pg switch broken when profiling fast > call functions, where arguments are passed in ecx and edx > any help regarding this issue is REALLY appreciated. Sure, that is possible. Look for FUNCTION_PROFILER in the relevant backend. Ian