wpf VS2015 Profiler 中的外部代码
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33482789/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
External code in VS2015 Profiler
提问by dotNET
VS2015 includes some new tools for diagnosing WPF applications performance. My solution contains more than one project (e.g. View and ViewModel projects). When I start my View project in diagnose mode and measure CPU usage, a considerable portion of it is being utilized by the VM project, which is shown as "External Code" in the results. How can I tell diagnostic tools to include all projects of my solution when diagnosing.
VS2015 包含一些用于诊断 WPF 应用程序性能的新工具。我的解决方案包含多个项目(例如 View 和 ViewModel 项目)。当我在诊断模式下启动我的 View 项目并测量 CPU 使用率时,其中相当一部分被 VM 项目利用,这在结果中显示为“外部代码”。我如何告诉诊断工具在诊断时包含我的解决方案的所有项目。
Edit
编辑
(Note for the people who skip comments)
(跳过评论的人请注意)
I know about the "External Code" checkbox available in "Filter View" dropdown. The problem with that option is that if I turn it on, it starts showing lower-level Framework functions in the call stack too (things like nt.dll, presentationcore.dll etc), which means that a function of my VM may get buried 20 levels deep into the call hierarchy. I need a way to ask it to filter any Framework-level functions and just show code from the current solution.
我知道“过滤视图”下拉列表中可用的“外部代码”复选框。该选项的问题在于,如果我打开它,它也会开始在调用堆栈中显示较低级别的框架函数(例如 nt.dll、presentationcore.dll 等),这意味着我的 VM 的函数可能会被埋没深入调用层次结构的 20 个级别。我需要一种方法来要求它过滤任何框架级函数并只显示当前解决方案中的代码。
回答by AndreN
When you have the diagnostic view up, look for a dropdown that says "Filter View". It's in the area below the graph but above the listview. Click the dropdown and check the "Show External Code" checkbox.
当您打开诊断视图时,查找显示“过滤视图”的下拉菜单。它位于图表下方但列表视图上方的区域中。单击下拉列表并选中“显示外部代码”复选框。
(Also, who downvoted this question without leaving a comment? That's entirely unhelpful. If you thought the question was trivial, why not say that while answering the question?)
(另外,谁在没有留下评论的情况下对这个问题投了反对票?这完全没有帮助。如果你认为这个问题微不足道,为什么不在回答问题时说出来?)

