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:

The profiler shares its symbol path with the debugger.  In the IDE, go to Tools->Options->Debugging->Symbols and add to 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* .  Second, you can specify it directly to vsperfreport with  -symbolpath:srv* .  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 (1)

  1. I’ve pulled together all of the technical articles and walkthroughs from the various team member blogs…

Skip to main content