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:

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


No comments: