VS2010 profiler seems to not resolve symbols from ngen'd images
I'm profiling a Windows service by attaching to it in the 'sampling' mode.
I open the results file, the "functions" view and I see the "hottest" function being displayed as [System.Runtime.Serialization.ni.dll]
without indication of the concrete .net function inside this assembly.
It looks like all other symbols from ngen'd assemblies (.ni.dll) are shown the same way. Also, I don't see any symbols from managed but not ngen'd assemblies in the list, which is quite strange.
Howe开发者_Go百科ver, all the native symbols resolve OK, like "AwareLock::Contention(int)" etc.
Also, the Output tab says:
Loaded symbols for C:\Windows\assembly\NativeImages_v2.0.50727_64\System.Runtime.Seri#\12aaff696a0c54773664b4c5407deaa2\System.Runtime.Serialization.ni.dll.
Also, I have not launched vsperfclrenv, but everything resolves OK in the concurrency profiling mode, so I thought that I don't need vsperfclrenv since VS2010 does everything for me.
I've tried running ngen update /debug /profile
but it didn't change a thing.
How do I setup my environment so that the sampling profiler of VS2010 resolves symbols in these managed assemblies?
Meanwhile, I'll try ngen uninstall
ing them.
When you open the Performance Report in VS2010 do you see any messages in the Error List? Without the right environment variables a component that is required to resolve managed symbols will not be injected into the process and only native images will be resolved.
If you are profiling a service you will need to use vsperfclrenv /globalsampleon
and then reboot to ensure that the environment variables are set correctly.
精彩评论