I’m looking for some performance test results for -finstrument-functions.
I’m considering to use it as a profiling tool and therefore I need to know if the overhead isn’t too high (so it doesn’t mangle the results).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The overhead is the 2 additional calls to instrumenting functions for each user function call.
It is just 3-5 * 2 asm instructions. Also, The instrumenting functions themselves
will consume time. But if you will to use plain
-finstrument-functions, the code of cyg_profile functions is yours.Even if function is inlined, the __cyg_profile* is still called. So, estimate the number of functions calls in target application and multiply to 40-100 cpu ticks of overhead for each call.
You may be interested in sampling profilers, like
oprofileor linux kernelperf.