From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59647 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhSFZ-0004u3-LS for qemu-devel@nongnu.org; Mon, 24 Jan 2011 14:39:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhSFG-0003zb-Is for qemu-devel@nongnu.org; Mon, 24 Jan 2011 14:38:47 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:36660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhSFG-0003zC-Aw for qemu-devel@nongnu.org; Mon, 24 Jan 2011 14:38:34 -0500 Received: by wyg36 with SMTP id 36so4666622wyg.4 for ; Mon, 24 Jan 2011 11:38:33 -0800 (PST) Message-ID: <4D3DD531.8030501@gmail.com> Date: Mon, 24 Jan 2011 20:38:25 +0100 From: Stefano Bonifazi MIME-Version: 1.0 Subject: Re: [Qemu-devel] TCG flow vs dyngen References: <000001cbb58c$221f5a00$011aa8c0@side35ya3cah0n> <4D330D01.9060801@gmail.com> <4D3CA28C.5080907@landley.net> <4D3D9334.6050801@gmail.com> <4D3DBEC8.5090903@cse.iitd.ac.in> In-Reply-To: <4D3DBEC8.5090903@cse.iitd.ac.in> Content-Type: multipart/alternative; boundary="------------090907090307010007020603" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dushyant Bansal Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------090907090307010007020603 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 01/24/2011 07:02 PM, Dushyant Bansal wrote: > On Monday 24 January 2011 08:26 PM, Stefano Bonifazi wrote: >> On 01/24/2011 03:32 PM, Peter Maydell wrote: >>> >>> Being a JIT doesn't prohibit counting target instructions executed. >>> It just means that counting them generally requires generating >>> code to do the counting at runtime, so it's a more complicated >>> change to make than it would be in a non-JIT emulator. >>> >> What do you mean? Should I change the code of qemu-user for counting >> the instructions, or should I add code into the target binaries? > You should see this pdf > (www.ecs.syr.edu/faculty/yin/Teaching/TC2010/Proj4.pdf). It talks > about tracing the instructions. > > -- > Dushyant Wow thank you! It sounds incredibly interesting!! > What we really need is to insert a function call into the > translated code, so when each instruction is executed at runtime, our > inserted function will be > executed. Again wow!! Is that really possible? Some sort of callback triggered at every instruction execution? Do you have any another document explaining that? This pdf just gives instructions on how to do it on an old version of qemu (disas_insn doesn't exist at all on my code now), and does not explain what it is, what's behind that suggested code .. Also the code for single step would be of great help to me! I really needed that.. but when I tried it on qemu-user didn't work at all.. Thank you very much! Best regards, Stefano B. --------------090907090307010007020603 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 01/24/2011 07:02 PM, Dushyant Bansal wrote:
On Monday 24 January 2011 08:26 PM, Stefano Bonifazi wrote:
On 01/24/2011 03:32 PM, Peter Maydell wrote:

Being a JIT doesn't prohibit counting target instructions executed.
It just means that counting them generally requires generating
code to do the counting at runtime, so it's a more complicated
change to make than it would be in a non-JIT emulator.

What do you mean? Should I change the code of qemu-user for counting the instructions, or should I add code into the target binaries?
You should see this pdf (www.ecs.syr.edu/faculty/yin/Teaching/TC2010/Proj4.pdf). It talks about tracing the instructions.

--
Dushyant
Wow thank you! It sounds incredibly interesting!!
What we really need is to insert a function call into the
translated code, so when each instruction is executed at runtime, our inserted function will be
executed.
Again wow!! Is that really possible? Some sort of callback triggered at every instruction execution?
Do you have any another document explaining that?
This pdf just gives instructions on how to do it on an old version of qemu (disas_insn doesn't exist at all on my code now), and does not explain what it is, what's behind that suggested code ..
Also the code for single step would be of great help to me! I really needed that.. but when I tried it on qemu-user didn't work at all..
Thank you very much!
Best regards,
Stefano B.
 
 

--------------090907090307010007020603--