Getting the symbols with xperf

ε祈祈猫儿з 提交于 2019-12-23 02:31:33

问题


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

回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/597211/getting-the-symbols-with-xperf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!