vtune - 没有可用的符号
我过去曾多次使用过 vtune,通常不会遇到太多麻烦。不幸的是,每次使用之间的间隔往往很长,以至于我每次都忘记了如何使用它的某些方面。我知道行号和符号信息需要以某种方式存储。我认为所需要做的就是使用“程序数据库”(/Zi) 编译您的 exe,但我刚刚进行了采样,发现 vtune 报告没有可用的符号。
有什么我错过的吗?
I have used vtune several times in the past, usually without too much trouble. Unfortunately the gaps between each use are often so long that I forget some aspects of how to use it each time. I know that the line number and symbols information needs to be stored somehow. I thought that all that was required was to compile your exe with "Program Database" (/Zi), but I have just done a sampling and found that vtune reports there are no symbols available.
Is there anything I missed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有两种调试选项(检查 $> cl /?):
确保您拥有 .pdb 和清单文件(如果已生成)。
它不相关,但也可能关闭优化。
There are two options for debugging (check $> cl /?):
Make sure that you have .pdb and manifest file (if generated).
It's not related but maybe turn off optimizations as well.
就像 Bua 提到的那样,您肯定需要在启用调试信息的情况下进行编译。如果 pdb 文件与您正在分析的 exe 位于同一目录中,那么它应该能够找到它们。如果没有,您也可以尝试在 config -> 中显式添加 pdb 的路径选项->目录。 替代文本 http://software.intel.com/file/21331 添加项目符号目录。您可能还想添加符号服务器和符号缓存,因为这样您将获得所有 Microsoft 公共二进制文件的符号。上图显示了如何在 c:\websymbols 中添加带有符号缓存的符号服务器。通常,“符号服务器”的格式是以下形式的字符串:
示例:
形式:
希望这会有所帮助!
Like Bua mentioned, you definitely need to be compiling with debugging information enabled. If the pdb files are in the same directory as the exe that you're profiling, then it should be able to find them. If not, you can also try explicitly adding the path to the pdbs in config -> options -> directories. alt text http://software.intel.com/file/21331 Add an item with your symbols directory. You might also want to add a symbol server and symbol cache, because then you'll get symbols for all of Microsoft's public binaries. The image above shows how to add a symbol server with a symbol cache at c:\websymbols. Generally, the format for a "symbol server" is a string of the form:
an example:
of the form:
Hope this helps!
问题已解决:原来是工作目录设置错误;毕竟“/Zi”似乎就是所需要的。我不需要关闭优化。
The problem has been solved: It turned out that it was a mistake in setting the working directory; "/Zi" appears to be all that is required after all. I don't need to switch off optimization.