Sunday, March 23, 2008

 

Spelunking in the .NET Compact Framework

If you are using the .Net Compact Framework 3.5 and need to delve into memory allocations or performance related issues, then the Power Toys for .NET Compact Framework 3.5, released mid-December last year, are what you need. The word ‘toy’ in the title is perhaps a little misleading, as it contains some powerful tools:

  • NETCF CLR Profiler – provides detailed views of the managed heap for diagnosing various memory management issues.
  • NETCF Service Model Metadata Tool – allows you to generate a WCF client proxy to help consume WCF services on device.
  • App Configuration Tool – on device tool for specifying what version of NETCF an application will run against, displaying installed versions of NETCF and displaying information about GAC DLLs.
  • Remote Logging Configuration Tool – enables users to configure logging options on a NETCF device including: loader, interop, network, error and finalizer logs.
  • Remote Performance Monitor and GC Heap Viewer – provides real time counter data (ranging from Garbage Collector activity to type loading info) on a running NETCF application. The GC Heap Viewer feature allows you to capture a snapshot of the managed heap while your application is running to view live references, and allows you to compare multiple snapshots to find memory leaks.
  • NETCF Network Log Viewer – utility for viewing NETCF network log data.
If, like me, you are using the .NET Compact Framework 2.0, you still have access to the Remote Performance Monitor (SP1) and the GC Heap Viewer (SP2). Steven Pratschner's blog entry
“Analyzing Device Application Performance with the .Net Compact Framework Remote Performance Monitor” is a quick introduction to getting started with the RPM.

David Kline has a post describing the counters viewable through the RPM
here.

Quick Tip: if you click on “View GC Heap” in the RPM, don’t keep clicking it when nothing appears! It takes a while to gather the required info... :)
Why would anyone sane think a click hadn't registered? Well, I swap my mouse from left to right hand, and quite often remote desktop into machines without the mouse buttons reversed, so my finger sometimes 'forget' which button is a left-click!





    

Powered by Blogger