程序性能分析profiling

MSVS2015提供了性能分析的工具可供使用。

链接:https://msdn.microsoft.com/en-us/library/mt210448.aspx


LINUX下参考这篇文章:

http://baptiste-wicht.com/posts/2011/09/profile-c-application-with-callgrind-kcachegrind.html


Callgrind is a tool in part of the Valgrind toolchain. 


MS VS下操作的详细步骤参考 

Beginners Guide to Performance Profiling

 https://msdn.microsoft.com/en-us/library/ms182372(v=vs.110).aspx

准备工作:

Prerequisites

These are a few things that you can do before you start profiling to make sure that you do not encounter unnecessary problems.

Run as administrator   If you are not an administrator on the computer that you are using, you should run Visual Studio as an administrator to make sure that you have the permissions that are necessary for some of the features in the profiling tools. To do this, click the Start button, locate the Visual Studio application icon, right-click the icon, and then click Run as administrator.

Set the active build configuration to Release   Debug builds insert additional diagnostic code into your application and do not include optimizations that the compiler performs in release builds. Profiling the release version of your application provides more accurate data about the performance of your application. To change the active configuration, on the Build menu click Configuration Manager and in the dialog box, under Active solution configurations, select Release.

Get Windows symbols files   If you profile code that calls Windows functions, you should make sure that you have the most current .pdb files. Without these files your report views will list Windows function names that are cryptic and difficult to understand. For more information about how to make sure that you have the files you need, see How to: Reference Windows Symbol Information.


We recommend that you begin analyzing your data by examining the Hot Path, then the list of functions that are doing the most work, and finally by focusing on other functions by using the Summary Timeline. You can also view profiling suggestions and warnings in the Error List window.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值