0

I would like to identify and analyze different machine instruction executed and required clock cycle for each of them, throughout running of a code.

Is there any way to do this simply? Dynamic binary translation might be a way but i am looking for more easier mechanism.

Thanks in advance

1 Answers1

0

If you are programming, consider using a performance analysis tool such as a profiling tool, such as Intel VTune (http://en.wikipedia.org/wiki/VTune), or oprof.

It is much less common for most programmers to have access to a cycle accurate simulator, although in the embedded space it is quite common.

Dynamic binary translation is probably NOT a good way to measure your program at individual instruction granularity. DBT tools like http://www.pintool.org/ do allow you to insert code to read timers. You could do this around individual instructions is way too slow, and the instrumentation adds too much overhead. But doing this at function granularity can be okay. Basic block granularity, i.e. every branch, borderline.

Bottom line: try a profiling tool like VTune first. Then go looking for a cycle accurate simulator.

Krazy Glew
  • 7,210
  • 2
  • 49
  • 62