Profiling is a form of dynamic program analysis and it is the process of investigation of a program's behavior using information gathered as the program executes. This analysis is performed to determine which sections of a program to optimize, that is to increase its overall speed, decrease its memory requirement or sometimes both. A profiler is a performance analysis tool that measures only the frequency and duration of function calls, but there are other specific types of profilers in addition to more comprehensive profilers. The important feature od a profiler is that, it can measure the complete behavior of a program, right from invocation to termination. Instruction set simulation, hardware interrupts, performance counters, operating system hooks, and code instrumentation are the various techniques used by profilers to collect data.
There are two types of profilers based on the out put - one is flat profiler and the other is call graph profiler.
There are two types of profilers based on the out put - one is flat profiler and the other is call graph profiler.
- Flat Profiler - Flat profilers compute the average call times, from the calls, and do not break down the call times based on the callee or the context.
- Call Graph Profiler – These profilers show the call times, and frequencies of the functions, and also the call-chains involved based on the callee. But these profilers fail to preserve the content.
Uses of Profiling:
Profilers are the program analysis tools which plays an important role in understanding the program behavior.
Computer architects need such tools to evaluate how well programs will perform on new architectures.
Software writers use these tools to analyze their programs and identify critical sections of code. These tools helps the compiler writers to find out how well their instruction scheduling algorithm is performing.
No comments:
Post a Comment