如何分析 Silverlight 应用程序? [英] How to profile a silverlight application?
问题描述
他们是否有任何支持 Silverlight 的分析器?我尝试过 ANTS(3.1 版)但没有成功?版本4支持吗?我可以尝试任何其他产品吗?
Is their any profilers that support Silverlight? I have tried ANTS (Version 3.1) without any success? Does version 4 support it? Any other products I can try?
已更新自 Silverlight 4 发布以来,现在可以对 SL 应用程序进行完整的分析……查看 这篇关于这个话题的文章
Updated since the release of Silverlight 4, it is now possible to do full profiling on SL applications... check out this article on the topic
在 PDC,我宣布 Silverlight 4 带有新的 CoreCLR 功能,可以通过 VS2010 分析器进行分析:这意味着我们第一次赋予您分析托管和本机代码(用户或平台)由 Silverlight 应用程序使用.呜呼.向 CLR 团队致敬.
At PDC, I announced that Silverlight 4 came with the new CoreCLR capability of being profile-able by the VS2010 profilers: this means that for the first time, we give you the power to profile the managed and native code (user or platform) used by a Silverlight application. woohoo. kudos to the CLR team.
旁注:从 silverlight 1-3 开始,人们只能使用 xperf(参见 XPerf:Silverlight 的 CPU 采样器)之类的东西,它非常强大,可以查看布局/文本/媒体/gfx/等管道,但只能提供本机调用堆栈.)
Sidenote: From silverlight 1-3, one could only use things like xperf (see XPerf: A CPU Sampler for Silverlight) which is very powerful to see the layout/text/media/gfx/etc pipelines, but only gives the native callstack.)
来自 SilverLite (PDC 视频,TechEd Iceland,VS2010,分析,Silverlight 4)
推荐答案
在此处安装 XPerf 和 xperfview:http://msdn.microsoft.com/en-us/library/cc305218.aspx
Install XPerf and xperfview as available here: http://msdn.microsoft.com/en-us/library/cc305218.aspx
(1) 启动您的示例
(2) xperf -on base
(2) xperf -on base
(3) 稍等一下
(4) xperf –d myprofile.etl
(4) xperf –d myprofile.etl
(5) 完成后,设置您的符号路径:
(5) when this is done, set your symbol path:
set _NT_SYMBOL_PATH= srvC:\symbolshttp://msdl.microsoft.com/downloads/symbols
(6) xperfview myprofile.etl
(6) xperfview myprofile.etl
(7) 跟踪 -> 加载符号
(7) Trace -> Load Symbols
- 选择要查看的 CPU 图形区域
- 右键单击并选择汇总表
(8) 接受 EULA 使用符号、展开 IExplore、展开 agcore.dll 或任何您的顶级模块
(8) Accept the EULA for using symbols, expand IExplore, expand agcore.dll or whatever is your top module
这篇关于如何分析 Silverlight 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!