I'm not sure if your solution is a complete solution for counting instructions
is enough. If I understand QEMU correct, it links TBs together, removing the
need to go through the tb_find_fast in many but not all situations.
However, you could disable the TB linking, done in tb_find_fast I think
Hello Shane.
I have successfully added instruction counters to QEMU with a low run-time
overhead. I cannot give you the code but I can tell you how I did it.
1: Make sure that QEMU knows which block is the current_tb. What I did was to
update the goto_tb block to update the current_tb pointer