complaining {
I always end up incredibly frustrated when I go to profile my code using Visual Studio 2008's profiler (from the Analyze menu option). It is one of the poorest designed features of VS, in my opinion, and I cringe every time I need use it.
当我使用Visual Studio 2008的分析器(来自Analyze菜单选项)分析我的代码时,我总是非常沮丧。在我看来,它是VS最差的设计特征之一,每次我需要使用它时都会感到畏缩。
}
I have a few questions concerning it's use, I'm hoping you guys can give me some pointers :-)
关于它的使用,我有几个问题,我希望你们能给我一些指示:-)
- Do you need to have your projects built in Debug or Release to profile them? One dialog (that I have no idea how to get back to) mentioned I should profile under Release. Okay - I do that - when I go to run the code, it tells me I'm missing PDB files. Awesome. So I go back to Debug mode, and I try to run it, and it tells me that half of my projects need to be recompiled with the /PROFILE switch on.
- Is it possible to profile C++/CLI projects? With the /PROFILE switch on, half of the time I get absolutely no output from my C++/CLI projects.
- Why, when attempting to profile C# projects, do they show up in the Report under Modules view Name list as 0x0000001, 0x0000002, 0x0000003, etc? Really, VS? Really? You can't take a guess at the names of my modules?
- For that matter, why are function names reported as 0x0A000011, 0x06000009, 0xA0000068, etc?
- Why, oh why, does VS rebuild EVERYTHING in the dependency tree of the executable being profiled? It might not be a problem if you have 5-6 projects in your solution, but when you have 70, it's almost quicker to not even bother with the profiler.
- Can you recommend any good guides on using the VS2008 profiler?
您是否需要在Debug或Release中构建项目以对其进行分析?一个对话框(我不知道如何回复)提到我应该在Release下进行简介。好的 - 我这样做 - 当我去运行代码时,它告诉我我缺少PDB文件。真棒。所以我回到调试模式,我尝试运行它,它告诉我,我的一半项目需要使用/ PROFILE开关重新编译。
是否可以分析C ++ / CLI项目?打开/ PROFILE开关后,有一半的时间我从C ++ / CLI项目中完全没有输出。
为什么在尝试分析C#项目时,它们是否显示在模块视图名称列表下的报告中,如0x0000001,0x0000002,0x0000003等?真的,VS?真?你不能猜测我模块的名字?
就此而言,为什么函数名称报告为0x0A000011,0x06000009,0xA0000068等?
为什么,VS为什么会在被分析的可执行文件的依赖关系树中重建所有内容?如果你的解决方案中有5-6个项目可能不是问题,但是当你有70个项目时,它甚至更加难以打扰探查器。
您能否推荐使用VS2008探测器的任何优秀指南?
4 个解决方案
#1
1.Do you need to have your projects built in Debug or Release to profile them?
1.您是否需要在Debug或Release中构建项目以对其进行分析?
Normally you use Release mode.
通常您使用发布模式。
6.Can you recommend any good guides on using the VS2008 profiler?
6.您能否建议使用VS2008探测器的任何优秀指南?
Step 1, download ANTS Profiler.
步骤1,下载ANTS Profiler。
Step 2, follow the easy to use on screen instructions.
第2步,按照易于使用的屏幕说明进行操作。
Step 3, look at the easy to read reports.
第3步,查看易于阅读的报告。
Seriously, the Microsoft profiler is garbage compared to ANTS.
说真的,与ANTS相比,Microsoft分析器是垃圾。
#2
If you're finding it difficult to use, there's a really great .NET profiler called nprof, and if you're debugging non-CLR projects, AMD has a really spectacular statistical profiler called Code Analyst.
如果你发现它很难使用,那么有一个非常棒的.NET分析器叫做nprof,如果你正在调试非CLR项目,那么AMD有一个非常引人注目的统计分析器叫做Code Analyst。
Both are free(!), and exceedingly easy to use. A much nicer alternative, and I expect from your post above you're about ready to ditch the VS builtin profiler anyway :)
两者都是免费的(!),非常容易使用。一个更好的选择,我希望从你的帖子上面你准备放弃VS内置探查器无论如何:)
#3
I have the same feeling about that thing. I ended up writing my own (all I wanted was decent method call timing info).
我对那件事情有同感。我最终写了自己的(我想要的只是体面的方法调用时间信息)。
#4
Just a general comment. There are a couple reasons people profile.
只是一般性评论。人们描述有几个原因。
- To get a variety of timing info.
- To find out what they could fix to make their program faster.
获得各种时间信息。
找出他们可以解决的问题,使他们的程序更快。
These are very different goals.
这些是非常不同的目标。
If your reason is the second one, using a profiler is not the only way. See here
如果你的理由是第二个,那么使用分析器不是唯一的方法。看这里
#1
1.Do you need to have your projects built in Debug or Release to profile them?
1.您是否需要在Debug或Release中构建项目以对其进行分析?
Normally you use Release mode.
通常您使用发布模式。
6.Can you recommend any good guides on using the VS2008 profiler?
6.您能否建议使用VS2008探测器的任何优秀指南?
Step 1, download ANTS Profiler.
步骤1,下载ANTS Profiler。
Step 2, follow the easy to use on screen instructions.
第2步,按照易于使用的屏幕说明进行操作。
Step 3, look at the easy to read reports.
第3步,查看易于阅读的报告。
Seriously, the Microsoft profiler is garbage compared to ANTS.
说真的,与ANTS相比,Microsoft分析器是垃圾。
#2
If you're finding it difficult to use, there's a really great .NET profiler called nprof, and if you're debugging non-CLR projects, AMD has a really spectacular statistical profiler called Code Analyst.
如果你发现它很难使用,那么有一个非常棒的.NET分析器叫做nprof,如果你正在调试非CLR项目,那么AMD有一个非常引人注目的统计分析器叫做Code Analyst。
Both are free(!), and exceedingly easy to use. A much nicer alternative, and I expect from your post above you're about ready to ditch the VS builtin profiler anyway :)
两者都是免费的(!),非常容易使用。一个更好的选择,我希望从你的帖子上面你准备放弃VS内置探查器无论如何:)
#3
I have the same feeling about that thing. I ended up writing my own (all I wanted was decent method call timing info).
我对那件事情有同感。我最终写了自己的(我想要的只是体面的方法调用时间信息)。
#4
Just a general comment. There are a couple reasons people profile.
只是一般性评论。人们描述有几个原因。
- To get a variety of timing info.
- To find out what they could fix to make their program faster.
获得各种时间信息。
找出他们可以解决的问题,使他们的程序更快。
These are very different goals.
这些是非常不同的目标。
If your reason is the second one, using a profiler is not the only way. See here
如果你的理由是第二个,那么使用分析器不是唯一的方法。看这里