Issues in the gprof output report #17640
Unanswered
Pavankumar2605
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have followed these steps to generate profiling data from gprof:
Also added compiler flags like -fno-inline-functions, -fno-builtin, -no-pie as suggested in many online forums.
gprof app_name gmon.out > analysis.txt
Note: My embedded application is multithreaded running on Linux platform. It has infinite 'for' loop to keep the main thread alive. But I am limiting this 'for' loop to few thousands of iterations and returning from the main() function to get the gmon.out file generated.
The below points made me doubt the correctness of the profiling data:
main() function and its details is not shown in the gprof output file.
There is a function that gets called inside the 'for' loop in my application which I know is taking a lot of time(as it is using ioctl() calls everytime and confirmed that it takes too much time with testing). But gprof output file shows that it is taking very less time to get executed.
Beta Was this translation helpful? Give feedback.
All reactions