Amduprof缺少Golang来源
我想使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我让它起作用。首先,我用导出的,未压缩的矮人符号构建了应用程序:
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#m1831I 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 underSymbols 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