From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnbWZ-0008AE-Ap for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:50:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnbWX-00085q-35 for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:50:23 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:64841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnbWW-00085e-So for qemu-devel@nongnu.org; Wed, 18 Jan 2012 14:50:21 -0500 Received: by pbdd2 with SMTP id d2so1088037pbd.4 for ; Wed, 18 Jan 2012 11:50:19 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <20120117150647.GA61848@cs.nctu.edu.tw> <20120118030333.GA1026@cs.nctu.edu.tw> Date: Wed, 18 Jan 2012 19:50:19 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] icount and tb chaining List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: James Greensky Cc: qemu-devel@nongnu.org, =?UTF-8?B?6Zmz6Z+L5Lu7?= On 18 January 2012 19:43, James Greensky wrote: > On Tue, Jan 17, 2012 at 7:03 PM, =E9=99=B3=E9=9F=8B=E4=BB=BB wrote: >> I think those numbers (0, 1, and 2) means tb_add_jump 2nd parameter here= , so >> it's intentionally to check jmp_first when n is 2. Since tb->jmp_first i= s never >> to be zero, then condition is always false (do nothing) when n is 2. > Chenwj, you are correct, the check bypasses the whole function, I was > not paying enough attention to that check, it should never be null, in > which case the code doesn't get executed and the chaining remains > unchanged. The question that occurs to me is, is this working like this by design, or is it a bug that just happens to have no ill effects? The fact that the condition in tb_add_jump() is commented as "only needed for thread safety" suggests the latter to me... -- PMM