From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHr1y-0008Cq-IX for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:18:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHr1w-0001Y4-IW for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:18:13 -0400 Received: from mail-vk0-x22e.google.com ([2607:f8b0:400c:c05::22e]:34249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHr1w-0001Xy-2r for qemu-devel@nongnu.org; Tue, 28 Jun 2016 07:18:12 -0400 Received: by mail-vk0-x22e.google.com with SMTP id c2so17199724vkg.1 for ; Tue, 28 Jun 2016 04:18:12 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <878txpd1u7.fsf@fimbulvetr.bsc.es> References: <878txpd1u7.fsf@fimbulvetr.bsc.es> From: Peter Maydell Date: Tue, 28 Jun 2016 12:17:52 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Executed Host Instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ayaz Akram , "qemu-devel@nongnu.org Developers" On 28 June 2016 at 11:50, Llu=C3=ADs Vilanova wrote: > Ayaz Akram writes: > >> Hi All, >> I want to count number of host instructions (only for guest code) execu= ted >> when qemu emulates an application. I wonder if helper functions are >> supported with tcg back end as well, which can be a possible solution fo= r >> the mentioned problem ? If not, is there any other solution in someone's >> mind ? > > If you don't care about helpers, you can use QEMU's log functionality (-d > out_asm). Note that this doesn't directly count instructions -- it only displays the assembly at translate time, and you'd then have to calculate the actual executions based on -d exec logging, and adjust it to deal with exceptions. It ought to be possible to use the icount machinery to trace instruction execution counts, but we don't do it today. thanks -- PMM