PGPROF/en: Difference between revisions

Jump to navigation Jump to search
Updating to match new version of source page
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 68: Line 68:
}}
}}


The output can be cropped to show one of the categories. For example, the option <code>--cpu-profiling</code> will show only the CPU results.  
===Options===
*The output can be cropped to show one of the categories. For example, the option <code>--cpu-profiling</code> will show only the CPU results.  


The option <code>--cpu-profiling-mode top-down</code> will make the PGPROF show the main subroutine at the top and the rest of functions it called below:
*The option <code>--cpu-profiling-mode top-down</code> will make the PGPROF show the main subroutine at the top and the rest of functions it called below:
{{Command|pgprof --cpu-profiling-mode top-down -i a.prof  
{{Command|pgprof --cpu-profiling-mode top-down -i a.prof  
| result=
| result=
Line 84: Line 85:
  }}
  }}


To find out what part of your application takes the longest time to run you can use the option <code>--cpu-profiling-mode bottom-up</code> which orients the call tree to show each function followed by functions that called it and working backwards to the main function.
*To find out what part of your application takes the longest time to run you can use the option <code>--cpu-profiling-mode bottom-up</code> which orients the call tree to show each function followed by functions that called it and working backwards to the main function.
{{Command|pgprof --cpu-profiling-mode bottom-up -i a.prof
{{Command|pgprof --cpu-profiling-mode bottom-up -i a.prof
|result=
|result=
38,897

edits

Navigation menu