Visual Studio 2005 Visual Studio 2005 NET CF

  • Slides: 30
Download presentation

Visual Studio 2005性能分析器

Visual Studio 2005性能分析器

远程性能监视器(Visual Studio 2005) 设置 安装. NET CF 2. 0 SP 1 把设备连接到开发机上 在设备上打开性能计数器 HKLMSoftwareMicrosoft.

远程性能监视器(Visual Studio 2005) 设置 安装. NET CF 2. 0 SP 1 把设备连接到开发机上 在设备上打开性能计数器 HKLMSoftwareMicrosoft. NETCompact. Framework Perf. Monitor Counters = 1 性能计数器的数据存在文件中 Application_Filename. stat 在分析完毕后记得把性能计数器关掉 Counters = 0

远程性能监视器(Visual Studio 2008) 安装 下载. NET Compact Framework 3. 5 Power Toys CTP http:

远程性能监视器(Visual Studio 2008) 安装 下载. NET Compact Framework 3. 5 Power Toys CTP http: //www. microsoft. com/downloads/details. aspx? Family. Id=C 8174 C 14 -A 27 D-4148 -BF 01 -86 C 2 E 0953 EAB&displaylang=en 包含以下组件 Remote Performance Monitor CLR Profiler Application Configuration Tool Service. Model Metadata Utility Remote Logging Configuration Tool Network Log Viewer

远程性能监视器(Visual Studio 2008) 运行 运行. NET CF Remote Performance Monitor 连接到设备上

远程性能监视器(Visual Studio 2008) 运行 运行. NET CF Remote Performance Monitor 连接到设备上

探测内存泄露 Event Handler的内存泄露 public class Shopping. Cart { public event Event. Handler<Event. Args> On.

探测内存泄露 Event Handler的内存泄露 public class Shopping. Cart { public event Event. Handler<Event. Args> On. Change; public void Process. Cart() { Logger l = new Logger(); // hook up event handler this. On. Change += new Event. Handler<Event. Args>(l. On. Change. Handler); Shopping. Form (root) Shopping. Cart Event. Handler // process order. . } } public class Logger { public void On. Change. Handler(object sender, Event. Args e) { // handle log event … } } Logger

修正内存泄露 修正Event Handler的内存泄露 public class Shopping. Cart { public event Event. Handler<Event. Args> On.

修正内存泄露 修正Event Handler的内存泄露 public class Shopping. Cart { public event Event. Handler<Event. Args> On. Change; public void Process. Cart() { Logger l = new Logger(); // hook up event handler this. On. Change += new Event. Handler<Event. Args>(l. On. Change. Handler); Shopping. Form (root) Shopping. Cart Event. Handler // process order. . // detach event handler this. On. Change -= new Event. Handler<Event. Args>(l. On. Change. Handler); } } Logger

解析函数 远程性能监视器 Counter: Objects Finalized Finalizer Logging 使用Net. CFLogging. exe 解决方案 实现 Dispose 调用

解析函数 远程性能监视器 Counter: Objects Finalized Finalizer Logging 使用Net. CFLogging. exe 解决方案 实现 Dispose 调用 object. Dispose

参考资源. NET Compact Framework Team Blog http: //blogs. msdn. com/netcfteam Visual Studio for Devices

参考资源. NET Compact Framework Team Blog http: //blogs. msdn. com/netcfteam Visual Studio for Devices Team Blog http: //blogs. msdn. com/vsdteam Windows Mobile Team Blog http: //blogs. msdn. com/windowsmobile MSDN 上的 Windows Mobile 开发中心 http: //msdn 2. microsoft. com/zh-cn/windowsmobile/default. aspx Mobile Side http: //Mobile. Side. cn

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.