无法使xperfview加载DLL的符号 [英] Trouble getting xperfview to load symbols for DLL
问题描述
我一直在用xperf对抗牙齿和指甲,以获取我正在分析的工具的符号.我在该工具中运行的代码在.exe和.dll之间分开-要分析的重要内容在.dll中.我跑了xperf:
I have been fighting tooth and nail with xperf to get symbols for a tool I'm profiling. My code that runs within the tool is split between the .exe and a .dll -- the important stuff to profile being in the .dll. I ran xperf:
xperf -on PROC_THREAD+LOADER+INTERRUPT+DPC+PROFILE -stackwalk profile
然后我将工具运行了一段时间,然后
And then I ran my tool for a bit, and then
xperf -d profile.etl
然后我尝试了xperfview.我加载了概要文件,打开了加载符号",并打开了摘要表.根本没有任何符号-在功能列中,模块实际上是未知"的.我在此上搜索了其他线程,这是我尝试过的事情:
Then I tried xperfview. I loaded up the profile, toggled "load symbols" on, and opened the summary table. No symbols at all -- literally module came up "unknown" in the function column. I've scoured other threads on this and here's what I've tried:
- 我设置了环境变量_NT_SYMBOL_PATH和_NT_SYMCACHE
- 我清除了符号缓存并运行xperf -symbols -i profile_results.etl.
- 我从Windows调试工具的最新版本中复制了dbghelp.dll,并重复了上述操作.
完成所有这些操作后,我现在可以正确显示大多数不是我自己的代码的模块的函数名称,但是我无法显示我的dll.该dll是在发布模式下(带有优化)进行编译的,但是我将Visual Studio项目专门设置为创建pdb,我已经验证了该pdb是否存在并且它在我的_NT_SYMBOL_PATH上的目录中.有谁知道我该如何解决这个问题,或者至少进一步调试它?
After doing all this I now get function names showing up properly for most of the modules that are not my own code, but I can't get my dll to show up. The dll is being compiled in release mode (with optimization) but I set the Visual Studio project specifically to create a pdb, I've verified that the pdb exists and that it is within a directory on my _NT_SYMBOL_PATH. Does anyone know how I can fix this, or at least debug it further?
推荐答案
You can set some environment variables to enable diagnostic logging during symbol loading:
- DBGHELP_DBGOUT = 1
- DBGHELP_LOG = C:\ dbghelp.log
这篇关于无法使xperfview加载DLL的符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!