1/19/2009

Profiling, Instrumentation and Sampling

For Profiling, wikipedia[1] says:
In software engineering, performance profiling(a.k.a performance analysis), is the investigation of a program's behavior using information gathered as the program executes (i.e. it is a form of dynamic program analysis, as opposed to static code analysis).
There are two ways to obtain Profiling information: either statistical sampling or code instrumentation[1][2]:
- Statistical Sampling probes the target program's program counter at regular intervals using operating system interrupts. Sampling profiles are typically less accurate and specific, but allow the target program to run at near full speed.
- Code Instrumentation, on the other hand, modify the target program with additional instructions to collect the required information. It's more disruptive, but allows the profiler to record all the interested events. Also, Instrumenting the program can cause changes in the performance of the program.

Popular Sampling Profilers area:
Intel VTune
Apple Shark
Amd CodeAnalyst

Popular Instrumenting Profiles are:
Gprof

Visual Studio Profiler supports profiling using both sampling and instrumenting methods.

Reference:
[1]http://www.usenix.org/events/coots99/full_papers/liang/liang_html/node9.html
[2]http://en.wikipedia.org/wiki/Performance_analysis
[3]http://en.wikipedia.org/wiki/Instrumenting
[4]http://en.wikipedia.org/wiki/Sampling_(statistics)
[5]http://www.perfeng.com/papers/bestprac.pdf
[6]https://computing.llnl.gov/tutorials/performance_tools/

No comments: