用xperf获取符号 [英] Getting the symbols with xperf
问题描述
我通读了文档并使用了概述的命令,但是由于某种原因,我似乎没有得到任何符号,摘要表的功能列中只有一系列未知数",除了应用程序的最高设置外,所有内容我正在尝试调试....我将环境变量设置为Microsoft服务器,并且目录包含该应用程序的pdb.在调出摘要表之前,我还确保选择加载符号"项.
I read through the docs and used the commands outlined however for some reason I dont seem to be getting any symbols, just a series of "unknowns" in the function column of the summary table for everything except the topmost set of the app I was trying to debug.... I set the enviromental variable to the microsoft server and the direcories containg the pdb's for the app. I also made sure to select the "Load Symbols" item before bringing up the summary table.
根据我正在阅读的信息,在加载符号时,表格需要花费一些时间才能显示,但是对我而言,表格几乎立即显示,并且只有sprite.exe-> sprite.exe中最上面的项目才显示函数名称,函数的其他行要么为空白,要么为未知"
Arcording to the info I was reading it should take some time for the tabl to display while it loads the symbols, however for me the table displayed almost instantly and only the top most items in sprite.exe->sprite.exe had function names, the othe rows for function were either blank or "unknown"
我正在使用Vista SP1.
Im using Vista SP1.
这是我使用的批处理文件.我做了什么能阻止这些sybol加载的事情吗?
This is the batch file I used. Did I do anything that would prevent the sybols being loaded?
REM start profiler
xperf -on PROC_THREAD+LOADER+INTERRUPT+DPC+PROFILE^
-stackwalk profile -minbuffers 16 -maxbuffers 1024 -flushtimer 0^
-f tmp.etl
REM run the app we want to profile
sprite.exe
REM stop
xperf -d profile.etl
REM set symbol path
set _NT_SYMBOL_PATH = ^
C:\Projects\C++\fl lib\bin;^ REM dlls
C:\Projects\C++\fl lib\samples\bin;^ REM main exe
SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
REM display profile
xperf profile.etl
推荐答案
它使用的是哪个版本的dbghelp.dll
?使用安装在%SystemRoot%\system32
中的dbghelp.dll
版本时,我无法让PDB符号与kernrate
和其他实用程序一起使用.
What version of dbghelp.dll
is it using? I've had trouble getting PDB symbols working with kernrate
and other utilities when using the version of dbghelp.dll
that is installed in %SystemRoot%\system32
.
您可能需要将Windows调试工具的最新版本中的dbghelp.dll
和symsrv.dll
复制到XPerf可以找到的目录中.
You may need to copy dbghelp.dll
and symsrv.dll
from a recent version of Debugging Tools for Windows into a directory where XPerf can find it.
此外,您需要删除'='之前的空格,否则您将定义"_NT_SYMBOL_PATH
"变量(名称中包括尾随空格).
Also, you need to remove the space before the '=', or else you're defining the "_NT_SYMBOL_PATH
" variable (including the trailing space in the name).
在行尾添加注释也不起作用.续行字符(例如"^")通常需要是该行的最后一个字符.当我运行该语句时(在XP上),我最终得到"_NT_SYMBOL_PATH
"等于 C:\Projects\C++\fl lib\bin; REM dlls
",并出现关于下一行的错误.
Including comments at the end of a line is not going to work either. A line continuation character such as '^' typically needs to be the last character on the line. When I ran that statement (on XP), I ended up with "_NT_SYMBOL_PATH
" equal to " C:\Projects\C++\fl lib\bin; REM dlls
" and an error about the next line.
这篇关于用xperf获取符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!