I would like to determine how many instructions it would take for a core to finish a process. Is there a way to determine that? Hence, in a microcontroller you are able to determine the instruction size of functions, I would like to do the same inside Linux. Thanks in advance.
EDIT:[SOLVED] Most suited to my applications was to just
perf stat -p <pid>
and
perf stat <command>
There are various ways to do that:
The size in all cases is 0x39 (57) bytes.
If you want the number of instructions of a given function, you can still use objdump:
...will list the disassembly. For the exact number of instruction you need to subtract to to the line count:
For a dynamic solution you can use perf stat:
If you run a command a few times you will most likely see that the values fluctuates between runs. Hence, this is no exact science.