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..., and then your solution should be enough. For detecting contidional and uncondiftional branches, you could alter the code in translate.c to add information about the reason for why the TB was ended in the TB struct. Torbjörn
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shane Brennan Sent: den 20 februari 2007 02:35 To: Andersson Torbjorn Subject: RE: [Qemu-devel] Counting Instructions and Looking for ConditionalBranches Hi Torbjorn, Thank you for the advice. I am currently counting instructions by placing a counter in the cpu_exec function in cpu_exec.c Everytime a new tb is grabbed from the tb_find_fast() function I update the instruction counter. This seems to be an accurate instruction count. I am also able to detect when branches and jumps occur by comparing the PCs of consecutive tb's. However, I am currently unable to tell which of the branch/jumps are conditional, and which are unconditional. Do you have any advice on monitoring for unconditional branches? Any advice you can provide me with would be greatly appreciate! ~Shane Brennan
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel