x86汇编指令执行数 [英] x86 assembly instruction execution count

查看:192
本文介绍了x86汇编指令执行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我有一个code和我想找到的次,每次流水线执行的数量。我不在乎是否通过分析或仿真的,但我想高precision结果。我碰到了一个论坛来过一次,给了一些脚本code这样做,但我失去了联系。谁能帮我集思广益一些方法来做到这一点?
问候

Hello everyone I have a code and I want to find the number of times each assembly line executed. I dont care whether through profiling or emulation, yet I want high precision results. I came across a forum once that gave some scripting code to do so, yet I lost the link. Can anyone help me brainstorm some ways to do so? Regards

修改
欧凯我觉得我一半。我已经做了按照一个职位由英特尔手册3A部分16.4.5规定的BTS(分公司跟踪店)一些研究。该功能提供了分支历史。所以,现在我需要你的帮助,以寻找是否有任何开源脚本或工具来做到这一点。等待检查您的反馈意见

Edit: Okey I think I am halfway there. I have done some research on the BTS (Branch Trace Store) provided by Intel Manual 3A section 16.4.5 according to one the posts. This feature provides branch history. So now I need your help to find if there are any open source scripts or tools to do this. Waiting to check your feedback

欢呼=)!

推荐答案

如果您的处理器支持,您可以启用转移跟踪店(BTS)。 BTS存储在内存中的predefined区日志中的所有分支机构采取的。每个条目都包含分支的源和目标。利用这一点,你可以指望有多少次是在每code段。

If your processor supports it, you can enable Branch Trace Store (BTS). BTS stores a log of all of the taken branches in a predefined area in memory. Each entry contains the branch source and destination. Using that, you can count how many times you were in each code segment.

看那的卷3A =HTTP ://www.intel.com/products/processor/manuals/相对=nofollow>英特尔软件开发人员手册,第16.4.5节(在当前版)的有关如何启用它的详细信息

Look at volume 3A of the Intel Software Developer's Manual, section 16.4.5 (in the current edition) for details on how to enable it.

这篇关于x86汇编指令执行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆