-
Notifications
You must be signed in to change notification settings - Fork 5
gprof
Shuai YUAN edited this page Nov 12, 2018
·
8 revisions
-
https://hpc.llnl.gov/software/development-environment-software/gprof
-
https://stackoverflow.com/questions/9608949/gprof-time-spent-in-particular-lines-of-code
- Function Call Counting: it counts for every instrumented function, how many times the function is called and from where. gcc inserts at the beginning of each instrumented function a call to a special library function to count the calls. This creates ‘Arcs’: information about who is calling what, how many times. Think about directed edges in a graph. Counting is done with _mcount() or in the case of GNU for ARM with __gnu_mcount_nc().
- Program Counter Sampling: at a period time, the current PC (Program Counter) gets sampled, creating a histogram of PC over addresses. This is typically done with a profile() function.