Amduprof缺少Golang来源

发布于 2025-02-06 04:56:16 字数 211 浏览 4 评论 0原文

我想使用Amduprof Profiler对我的程序进行介绍,但是设置root/source文件夹不起作用,而profiler仅显示拆卸代码。看来,尽管(或与)缺乏源代码,但由于功能的形式processName<地址偏移&gtseet>

我是做错事还是错过了一些探测器选项?我尝试使用“ release”/debug选项构建程序,但没有看到任何区别。

I want to profile my program with AMDuProf profiler, but setting root/source folder doesnt work and profiler show only disassembly code. It seems that despite (or together with) lacking source code it lacks debug symbols also as functions are in the form of processname<address offset>.

Am i doing something wrong or missing some profiler option? I tried to build program with "release"/debug option and didnt see any difference.

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

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

发布评论

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

评论(1

天煞孤星 2025-02-13 04:56:16

我让它起作用。首先,我用导出的,未压缩的矮人符号构建了应用程序:

GO构建-gcflags =“ all = -n -l -e” -ldflags =“ - compressdwarf = false” -o main.exe

下一步是要用cv2pdb工具将矮人符号转换为.pdb,因为我在Windows上运行Profiler非常重要。

即使我指定文件夹,profiler应该在其中搜索该.pdb文件(添加符号文件位置(S)字段),它也无法正常工作。我将.pdb文件手动复制到符号下的文件夹下载路径字段神奇地开始工作。

编辑:看来有特定的事情发生并偶然起作用。因此,这可能会起作用,但可能行不通。

EDIT2:Golang似乎可以使用debug_stripped flag使其可执行。手动删除标志时,Amduprof正确显示符号。更多信息: https://community.amd.com/t5/server-gurus-discussions/amd-uprof-for-golang-windows10/mp/mp/606820/highlight/highlight/true#m1831

I got it working. Firstly i built application with exported, uncompressed dwarf symbols:

go build -gcflags="all=-N -l -E" -ldflags="-compressdwarf=false" -o main.exe

Next step was to convert dwarf symbol to .pdb with cv2pdb tool as it was quite important that i run profiler on Windows.

It wasnt working even despite i specified folder where profiler should search for that .pdb file (the Add Symbol File Location(s) field). I copied .pdb file manually to the folder under Symbols Download Path field at it magically started to work.

Edit: it seems that something specific happened and worked by chance. So this may work, but probably will not.

Edit2: it seems that Golang is making executable with DEBUG_STRIPPED flag. When the flag is manually removed, AMDuProf is showing symbols correctly. More info: https://community.amd.com/t5/server-gurus-discussions/amd-uprof-for-golang-on-windows10/m-p/606820/highlight/true#M1831

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