完善分支错过了非条件说明

发布于 2025-02-12 03:13:19 字数 309 浏览 2 评论 0原文

我想了解我从事的程序的分支预测行为。为此,我使用perf工具。我录制了:

perf record -e branches,branch-misses

并与之可视化,

perf report --hierarchy -M intel

我会得到结果,但我不明白如何解释它们。我在左列中有百分比,但是根据正常说明发生了错误预测,例如添加RAX,RCR或移动RSI QWord Ptr [R14+0x8]等。

这是什么意思?在这些地方发生错误预测如何发生?如何解释它们。

I want to understand branch prediction behavior of a program I work on. For this, I use the perf tool. I recorded with:

perf record -e branches,branch-misses

and visualizing it with

perf report --hierarchy -M intel

I get results, but I don't understand how to interpret them. I have percentages in the left column, but instead of branches, mispredictions happen on normal instructions, for example, add rax, rcr, or move rsi QWORD PTR [r14+0x8], etc.

What does it mean? How is it possible for mispredictions happen in these places? How to interpret them.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文