Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guest instruction count statistics collection and display #12

Open
grigory-rechistov opened this issue Mar 8, 2016 · 2 comments
Open

Comments

@grigory-rechistov
Copy link
Owner

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.

@lisitsynSA
Copy link

I take it.

@grigory-rechistov
Copy link
Owner Author

Not done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants