WSL2中已安装dot但KCachegrind无法显示控制流图求助
KCachegrind无法显示控制流图问题排查求助
环境信息
- 操作系统:WSL2
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal
- KCachegrind版本:
$ kcachegrind --version kcachegrind 25.04.1
- Dot版本:
$ dot -V dot - graphviz version 2.43.0 (0)
已执行排查步骤
- 直接测试dot功能:
echo "digraph G { A -> B }" | dot -Tpng -o test.png # test.png已成功生成
- 检查/tmp权限:
$ ls -ld /tmp drwxrwxrwt 9 root root 12288 Jun 9 14:39 /tmp
错误现象
运行KCachegrind时,控制流图无法显示,仅提示:
No graph available because the layouting process failed. Trying to run the following command did not work
dot -Tplain-ext
Please check thatdotis installed.
自行执行dot -Tplain-ext test.dot命令可正常输出,但运行KCachegrind时日志显示:
$ kcachegrind callgrind_original.out.55340 Selected "main" ControlFlowGraphView::refresh: Starting process QProcess(0x566cd5d2b660) , ' QProcess(0x566cd5d2b660) ' Running 'objdump -C -d --start-address=0x11E0 --stop-address=0x201A /home/user/prog/test/real'... ControlFlowGraphView::dotError: Got QProcess::WriteError from QProcess QProcess(0x566cd5d2b660) QProcess: Destroyed while process ("dot") is still running. ControlFlowGraphView::dotExited: QProcess QProcess(0x566cd5d2b660)
尝试以root身份运行KCachegrind时,出现DBus会话总线未找到的错误,即使执行提示的export命令也无法解决。
求助问题
导致该问题的原因是什么?如何让KCachegrind正常显示控制流图?
内容的提问来源于stack exchange,提问作者ColrblindMartian
相关产品推荐
相关产品推荐

