Share via


Profiling FAQ #4: The top sampled function is [ntdll.dll], now what do I do?!

One of our big missions here in VS Profiler land is to bring profiling tools to people who maybe haven't had access to one before.  I know before I started here, I never really needed to use the Microsoft Symbol Server.  However, for the profiler in sampling mode (and sometimes instrumentation), if you don't get symbols for the main system binaries, you could easily get yourself in a situation where every single function listed on the summary page is listed as [foo.dll].  That means that we didn't have symbols for your dll and so we couldn't figure out what the names of the native functions on the stack were when we took a sample.  All we can tell you is the name of the dll that the function was in. 

However, have no fear.  Symbol Server is here:
https://www.microsoft.com/whdc/devtools/debugging/debugstart.mspx

The profiler shares its symbol path with the debugger.  In the IDE, go to Tools->Options->Debugging->Symbols and add https://msdl.microsoft.com/download/symbolsto the list of symbol locations.  Now re-analyze your file.  In VSPerfReport.exe, there are two ways to set the symbol path.  First, you can set the environment variable _NT_SYMBOL_PATH=srv*https://msdl.microsoft.com/download/symbols .  Second, you can specify it directly to vsperfreport with  -symbolpath:srv * https://msdl.microsoft.com/download/symbols .  Read that linked article to see how to set it up to cache your symbols locally.

Still doesn't work?  Try using the -debugsympath flag on VSPerfReport.  It will list every location that it searches for the symbols.

Comments

  • Anonymous
    June 09, 2005
    I’ve pulled together all of the technical articles and walkthroughs from the various team member blogs...