You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a mechanism to count how many times each of simulated opcode got executed.
Requirements for a solution
It should only be active when INSTR_STAT macro is defined. I.e., it should be conditionally built in.
It should maintain an array of counters to keep statistics for individual opcodes. After every instruction is simulated, the corresponding counter should be incremented by one.
At the end of simulation, the results table should be produced. It should look like this:
Opcode Count
-------------------
Nop 1000
Halt 1
Push 1234
...
It can be implemented in a generic manner to support all variants of interpreters
After the implementation is ready, it will be nice to compare performance of two builds - interpreter with stats enabled and disabled, to see the performance overhead such collection creates.
The text was updated successfully, but these errors were encountered:
Add a mechanism to count how many times each of simulated opcode got executed.
Requirements for a solution
INSTR_STAT
macro is defined. I.e., it should be conditionally built in.After the implementation is ready, it will be nice to compare performance of two builds - interpreter with stats enabled and disabled, to see the performance overhead such collection creates.
The text was updated successfully, but these errors were encountered: