如何在“调用树”中跟踪.net框架方法在 Visual Studio 中进行分析时
我在 Visual Studio 2008 中使用探查器这样,但是当我分析这些代码时,我只能在“调用树”视图中找到自己编写的方法。如何跟踪 .NET Framework 中定义的内部/私有方法?
I'm using profiler in Visual Studio 2008 like this, but when I profiling these codes I can only find the methods written by myself in "Call Tree" view. How can I track the inner/private methods defined in .NET Framework?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我确实要问你的目的是什么。您是否正在尝试查找并消除性能问题?如果是这样,您所做的任何修复都只能在您的代码中进行。找到它们的一个简单方法是在 IDE 下运行程序,当程序运行缓慢时,暂停它并记录调用堆栈。这样做几次。如果有任何一行代码出现在多个示例中,则这些示例是在其请求的工作中发生的,因此,如果您能找到一种方法来避免执行该行代码,您将节省大量时间。调用树可能会显示这样一行,但要查看它节省了多少时间,您必须对树中出现该行的所有分支求和。如果你只是对堆栈进行采样,就不会有这个问题。
这里有更完整的解释。
这是一个详细的示例。
< a href="https://stackoverflow.com/questions/1777556/alternatives-to-gprof/1779343#1779343">有一些神话。性能调整。
I do have to ask what is your purpose. Are you trying to find and remove performance problems? If so, any fixes you make can only be in your code. A simple way to find them is to run the program under the IDE and, while it is being slow, pause it and record the call stack. Do this several times. If there is any line of code that appears on multiple samples, those samples are occurring within work being requested by it, so if you can find a way to avoid doing that line of code, you will save a large fraction of time. The call tree may show such a line, but to see how much time it saves, you have to sum over all the branches in the tree where it occurs. You don't have that problem if you just sample the stack.
Here's a more complete explanation.
Here's a blow-by-blow example.
There are some myths re. performance tuning.