[Qemu-devel] Counting Instructions and Looking for Conditional Branches
From:
Shane Brennan
Subject:
[Qemu-devel] Counting Instructions and Looking for Conditional Branches
Date:
Sat, 17 Feb 2007 18:07:59 -0800
I am wondering if anyone knows where in the QEMU
source code I can create a counter to count the number of executed
instructions? In addition, where I can place an IF statement to see if
a conditional branch instruction is about to execute.
I need to do this to create a basic block vector for SimPoint. I
have found that the function cpu-exec in cpu-exec.c is probably going
to be involved, but I would appreciate any help in narrowing things
down. Basically, all I need to do is at every instruction I increase a
counter. Then, I see if that instruction is a conditional branch. If it
is, I print some characters to a file, and reset the counter. I would
greatly appreciate any help.