Received: from eggs.gnu.org ([208.118.235.92]:43606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1See2Z-0007BV-AM for qemu-devel@nongnu.org; Tue, 12 Jun 2012 23:14:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1See2X-0001Gf-8T for qemu-devel@nongnu.org; Tue, 12 Jun 2012 23:14:38 -0400 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:35527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1See2V-0001Fj-Ne for qemu-devel@nongnu.org; Tue, 12 Jun 2012 23:14:37 -0400 Received: from csmailer.cs.nctu.edu.tw (localhost [127.0.0.1]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 6BF47D65 for ; Wed, 13 Jun 2012 11:14:27 +0800 (CST) Received: from alumni.cs.nctu.edu.tw (alumni.cs.nctu.edu.tw [140.113.235.116]) by csmailer.cs.nctu.edu.tw (Postfix) with ESMTP id 51925D64 for ; Wed, 13 Jun 2012 11:14:27 +0800 (CST) Received: (from chenwj@localhost) by alumni.cs.nctu.edu.tw (8.14.4/8.14.4/Submit) id q5D3EQEg009322 for qemu-devel@nongnu.org; Wed, 13 Jun 2012 11:14:26 +0800 (CST) (envelope-from chenwj) Date: Wed, 13 Jun 2012 11:14:26 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7IChXZWktUmVuIENoZW4p?= Message-ID: <20120613031426.GA8174@cs.nctu.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] How to measure guest memory access (qemu_ld/qemu_st) time? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi all, I suspect that guest memory access (qemu_ld/qemu_st) account for the ma= jor of time spent in system mode. I would like to know precisely how much (if po= ssible). We use tools like perf [1] before, but since the logic of guest memory ac= cess aslo embedded in the host binary not only helper functions, the result cannot = be relied. The current idea is adding helper functions before/after guest me= mory access logic. Take ARM guest on x86_64 host for example, should I add the= helper functions before/after tcg_gen_qemu_{ld,st} in target-arm/translate.c or tcg_out_qemu_{ld,st} in tcg/i386/tcg-target.c? Or there is a better way t= o know how much time QEMU spend on handling guest memory access? Any suggestion/comment is welcomed. Thanks! Regards, chenwj [1] https://perf.wiki.kernel.org/index.php/Main_Page --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj