So my boss, Mike Zintel, has showed me up. He started his blog and wrote this great article on memory management in the .NET Compact Framework and Windows CE. Don’t miss this one!
In any case, between reading the article and talking to Mike, I feel pretty guilty about the tools that we provide for our customers to tell how their app is performing. In v1 and even as we finish off v2, we really only have mscoree.stat to help out developers. See Developing Well Performing .NET Compact Framework Applications article if you would like more information on this. Mscoree.stat provides a simple static view of some counters in the .NET Compact Framework CLR at the end of the application run. Useful, but understandably not enough in many circumstances to find real issues.
First off, I want to enhance the counters in mscoree.stat. We have already added more information such as “Boxed Value Types” and the team is in the process of adding information about Windows.Forms, such as the number of controls, pens, etc.
The second thing is being able to take a live view of the mscoree.stat data – remote performance counters for the .NET Compact Framework. I have a prototype working today as you can see with the following picture. Basically this is just a runtime representation of the data from mscoree.stat over a network connection and displayed in a list view.
The application also publishes the data to PerfMon. The data that I am displaying in my sample instance below are the 5 memory heaps in the .NET Compact Framework and their current size while playing a game of Yahtzee. Throughout the game, you can see the GC Heap memory climbing since a GC does not occur. The large drop about two thirds of the way is from switching the application into the background. Here, we see that a full garbage collection occurs, including pitching JIT compiled code, significantly reducing the working set of the application while in the background. I then switched back to the application and resumed playing the game. This is only a simple sample of the data that can be gathered via remote performance counters.
We will get this stuff out in your hands as soon as possible – hopefully in the .NET Compact Framework 2.0 timeframe.
This posting is provided "AS IS" with no warranties, and confers no rights.