Visual Studio Profiler
从VS2005起,Visual Studio就自带一个Profiler工具,用于分析程序的性能瓶颈。最近使用了一下VS2005中的该功能,感觉有很多Bug。用Sampling模式,程序运行时Crash;用Instrument模式时,Profiler使用了大量的磁盘空间,超过30G,最后报告错误说没有收集到数据。
改用Vs2008,发现两个模式都可以正常使用了,看起来有进步。
使用Visual Studio的Profiler方便之处在于集成度很高,可以很容易的查看瓶颈代码的源代码。
名词解释:
Some profilers operate by sampling. A sampling profiler 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.
Some profilers instrument the target program with additional instructions to collect the required information. Instrumenting the program can cause changes in the performance of the program, causing inaccurate results and heisenbugs. Instrumenting can potentially be very specific but slows down the target program as more specific information is collected.
本文由IT Farmer的博客创作,欢迎转载并保留对本博的链接。 Tags:profiler,Visual Studio,VS2008
