qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] icount and tb chaining


From: 陳韋任
Subject: Re: [Qemu-devel] icount and tb chaining
Date: Thu, 19 Jan 2012 10:42:51 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Jan 18, 2012 at 07:50:19PM +0000, Peter Maydell wrote:
> On 18 January 2012 19:43, James Greensky <address@hidden> wrote:
> > On Tue, Jan 17, 2012 at 7:03 PM, 陳韋任 <address@hidden> 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 is 
> >> 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...

  `git blame` shows Fabrice wrote that comment, so maybe only he knows the real
reason.

  Is the "thread" in the comment the same as in multi-thread?

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]