0

I have a program to run, say a program that sorts a list of numbers.

How can I know the distribution of the number of each instruction was run (i.e. the fraction of the instructions being run is "add", "sub" and so on)?

I'm using Ubuntu on an i7-3770 processor.

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
Joseph
  • 1
  • 1
    can you elaborate please? – Enamul Hassan Nov 24 '15 at 00:24
  • 1
    The question is not clear, but I guess an instrumentation tool could help you. Take a look at PIN from Intel. https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool – aminfar Nov 24 '15 at 17:45
  • Thanks for the comment. I'm new in computer architecture so maybe my wording is not clear. What I mean is how to count the number of certain instruction (or type of instruction, opcode, etc.) being executed (but not the total number of all instructions). – Joseph Nov 25 '15 at 01:57

0 Answers0