Search code examples
windowspdb-filesxperf

xperf can't load my DLL's symbols


I'm trying to use xperf to profile my DLL, but it refuses to use my DLL's PDB file. Running xperf on the .etl with -symbols, I get:

DBGHELP: mydll- private symbols & lines
         C:\mydll\debugu\mydll.pdb - unmatched

Which leads me to believe it thinks my PDB doesn't match the DLL the application is using. This is wrong; it does match. I've confirmed the path of the DLL the application is linking with using procexp, completely rebuilt the project, and so on. It still thinks it doesn't match.

Any ideas on what could be wrong?


Solution

  • Sorry, I asked this question and forgot about it.

    There were actually two problems.

    The first is that xperf was actually using an older cached version of my symbols. This was fixed by deleting it from the symbol cache.

    The second was that when I loaded symbols in xperfview, it didn't actually put my up-to-date pdb into the symbols cache. The pdb was in a directory that I confirmed was included in the _NT_SYMBOL_PATH variable, however. Unfortunately, I don't remember the exact command used to fix this, but I believe it was an 'xperf file.etl -symbols' variant. This command correctly parsed the etl and loaded/cached all of the relevant symbols as it encountered them. After this, xperfview could correctly show my symbols.

    Note that I had to re-run the command any time my pdb changed, because xperfview still wouldn't touch anything that wasn't already in the symbol cache. I'm still not sure why it behaves this way on my machine, other people don't seem to have this problem.