使用 xperf 获取符号

发布于 2024-07-13 22:17:36 字数 825 浏览 6 评论 0原文

我通读了文档并使用了概述的命令,但由于某种原因,我似乎没有得到任何符号,只是摘要表的功能列中的一系列“未知数”,除了我正在尝试的应用程序的最顶层集合之外的所有内容调试....我将环境变量设置为微软服务器和包含应用程序的pdb的目录。 我还确保在显示汇总表之前选择“加载符号”项。

根据我正在阅读的信息,在加载符号时,表格应该需要一些时间才能显示,但是对我来说,表格几乎立即显示,并且只有 sprite.exe->sprite.exe 中最上面的项目具有函数名称,函数的其他行要么是空白,要么是“未知”,

我使用的是 Vista SP1。

这是我使用的批处理文件。 我是否做了任何会阻止加载符号的事情?

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

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.

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"

Im using Vista SP1.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

爱本泡沫多脆弱 2024-07-20 22:17:36

它使用什么版本的dbghelp.dll? 当使用安装在 %SystemRoot%\system32dbghelp.dll 版本时,我无法将 PDB 符号与 kernrate 和其他实用程序一起使用代码>.

您可能需要将 dbghelp.dllsymsrv.dll 从最新版本的 Windows 调试工具复制到 XPerf 可以找到的目录中。

另外,您需要删除“=”之前的空格,否则您将定义“_NT_SYMBOL_PATH” 变量(包括名称中的尾随空格)。

在行尾添加注释也是行不通的。 行继续字符(例如“^”)通常需要是该行的最后一个字符。 当我运行该语句(在 XP 上)时,我最终得到了“_NT_SYMBOL_PATH ” 等于“  C:\Projects\C++\fl lib\bin; REM dlls”,并且下一行出现错误。

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.

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.

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).

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.

埋葬我深情 2024-07-20 22:17:36

尝试设置

TRACE_FORMAT_SEARCH_PATH

环境变量。 如果这不起作用,您可能必须使用 TracePdb.exe 从 PDB 手动提取 TMF 文件(或者至少使用常规路径而不是 SYM* 路径)。 这是迄今为止使用 ETL 跟踪/XPerf 最烦人的部分

Try setting the

TRACE_FORMAT_SEARCH_PATH

environment variable. If that doesn't work, you may have to manually extract the TMF files from your PDBs using TracePdb.exe (or at least use a regular path instead of a SYM* path). This is by far the most annoying part of using ETL traces / XPerf

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文