Today I’ve started to profile my applications to try to see if I have some memory leaks and performances bottlenecks.
I just started the inspection trying to look at some performance counters (especially to check if the memory allocated by my application kept growing)... but I had the surprise of the day when I couldn0t find any .Net related performance counter on my system.
At first I tried everything I knew to unload and reload performance counters, with the usual commands:
unlodctr .NETFramework
lodctr c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\corperfmonsymbols.ini
But they didn’t worked...
Then I started to look around some registry keys and I found this one:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NETFramework
that seemed to contains information related to the performance counters...I googled a bit and found this Microsoft knowledge base articles that clarified the thing: http://support.microsoft.com/?scid=kb%3Ben-us%3B312113&x=18&y=14
It seems that an application messed up with my registry trying to speedup its load times and in doing so it disabled the performance counters modifying the key ‘Library’ under ‘HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\.NETFramework\Performance’ to the non valid value ‘donotload_mscoree.dll’; Reverting this back to mscoree.dll and reloading the Perfmon utility I had my counters back.
It costed me only 1 hour and a half of my time!
Related Content
- Optimizing WMI query performances - avoid the nasty ‘select *’ (01/08/2010)
- Winforms: improving rendering performances with BackgroundImage and BackgroundImageLayout (26/08/2015)
- Passing a Delegate to an Attribute: a simple workaround (07/09/2010)
- 19th DotNetMarche Workshop “Community Tour 2011 - CMS Edition” (26/08/2015)
- WebNet European Conference, Slides and Samples (11/06/2012)
- More related document (9)