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:


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:

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