From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50174 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phdnt-0004Ib-WA for qemu-devel@nongnu.org; Tue, 25 Jan 2011 02:59:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Phdnq-0000kr-B2 for qemu-devel@nongnu.org; Tue, 25 Jan 2011 02:59:05 -0500 Received: from smtp2.iitd.ernet.in ([202.141.68.44]:53387) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Phdnp-0000jy-IJ for qemu-devel@nongnu.org; Tue, 25 Jan 2011 02:59:02 -0500 Message-ID: <4D3E8232.3090805@cse.iitd.ac.in> Date: Tue, 25 Jan 2011 13:26:34 +0530 From: Dushyant Bansal 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> <4D3DD531.8030501@gmail.com> In-Reply-To: <4D3DD531.8030501@gmail.com> Content-Type: multipart/alternative; boundary="------------060302020600080609090003" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Bonifazi Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------060302020600080609090003 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit >> 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? Yes, this mechanism works. I have written a code to count different kinds of instructions. > Do you have any another document explaining that? No. But maybe you can try to understand this through qemu source code. Here are some resources for that http://stackoverflow.com/questions/4501173/a-call-to-those-who-have-worked-with-qemu > 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.. It exists in file qemu/target-i386/translate.c You are also talking about qemu source code privided here http://wiki.qemu.org/Download, right? If you need, I can give the source code of counting implementation with some documentation. Hope this helps. -- Dushyant --------------060302020600080609090003 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
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?
Yes, this mechanism works. I have written a code to count different kinds of instructions.
Do you have any another document explaining that?
No. But maybe you can try to understand this through qemu source code. Here are some resources for that http://stackoverflow.com/questions/4501173/a-call-to-those-who-have-worked-with-qemu
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..
It exists in file qemu/target-i386/translate.c You are also talking about qemu source code privided here http://wiki.qemu.org/Download, right?
If you need, I can give the source code of counting implementation with some documentation.
Hope this helps.

--
Dushyant
--------------060302020600080609090003--