Profiling tools
You can use profiling tools to identify which portions of the program are executed most frequently or where most of the time is spent.
Profiling tools are typically used after a basic tool, such as the vmstat or iostat commands, shows that a CPU bottleneck is causing a performance problem.
Before you begin locating hot spots in your program, you need a fully functional program and realistic data values.