Received: from eggs.gnu.org ([2001:4830:134:3::10]:50834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brj5Y-0000dv-Hn for qemu-devel@nongnu.org; Wed, 05 Oct 2016 06:06:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brj5S-0008HD-Fo for qemu-devel@nongnu.org; Wed, 05 Oct 2016 06:06:11 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:45486 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brj5S-0008Gq-5M for qemu-devel@nongnu.org; Wed, 05 Oct 2016 06:06:06 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <874m50yxbk.fsf@fimbulvetr.bsc.es> <3cf0876d-6163-254d-68dd-601a713baccf@twiddle.net> <87r381ju8h.fsf@fimbulvetr.bsc.es> Date: Wed, 05 Oct 2016 12:06:04 +0200 In-Reply-To: (Richard Henderson's message of "Fri, 30 Sep 2016 11:56:34 -0700") Message-ID: <87k2dnt8j7.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC] Tracing guest register usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org, Paolo Bonzini , Peter Crosthwaite , Stefan Hajnoczi Richard Henderson writes: > On 09/30/2016 08:13 AM, Llu=C3=ADs Vilanova wrote: >>> (2) an internal state change >>> to DisasContext, reflected in INDEX_op_insn_start, with no changes to a= ny TCG >>> registers. So you'll not actually be tracking eflags at all. >>=20 >> I don't follow what you mean. AFAIK INDEX_op_insn_start does not change = the >> guest eflags. > It sets cc_op, which affects how eflags is computed. I see tcg_gen_insn_start() gets dc->cc_op as a second argument, but I really don't see where it gets modified (I'm looking at tcg_gen_code() on the INDEX_op_insn_start case). If you have the time, I'd like to understand that; I'm just curious. But regardless of this specific case, we still have all the instructions implemented with TCG helpers, which won't have any reguster usage informati= on. I was pretty convinced that was enough for some basic analysis using the trac= es, but I might just as well keep proper register usage on my instrumentation t= ree. Thanks, Lluis