From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HIbT7-0006sM-3Y for qemu-devel@nongnu.org; Sat, 17 Feb 2007 21:08:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HIbT6-0006sA-Bp for qemu-devel@nongnu.org; Sat, 17 Feb 2007 21:08:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HIbT6-0006s7-6x for qemu-devel@nongnu.org; Sat, 17 Feb 2007 21:08:00 -0500 Received: from wx-out-0506.google.com ([66.249.82.235]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HIbT5-0004A1-PD for qemu-devel@nongnu.org; Sat, 17 Feb 2007 21:07:59 -0500 Received: by wx-out-0506.google.com with SMTP id i30so1988328wxd for ; Sat, 17 Feb 2007 18:07:59 -0800 (PST) Message-ID: <4f2c8b9a0702171807h606ab69ak56a8c92d030c3d55@mail.gmail.com> Date: Sat, 17 Feb 2007 18:07:59 -0800 From: "Shane Brennan" Sender: loopuniverse@gmail.com MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9073_8153253.1171764479079" Subject: [Qemu-devel] Counting Instructions and Looking for Conditional Branches Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_9073_8153253.1171764479079 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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. ~Shane ------=_Part_9073_8153253.1171764479079 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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.

~Shane
------=_Part_9073_8153253.1171764479079--