qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: 陳韋任 <chenwj@iis.sinica.edu.tw>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, 陳韋任 <chenwj@iis.sinica.edu.tw>,
	"James Greensky" <gsky51@gmail.com>
Subject: Re: [Qemu-devel] icount and tb chaining
Date: Thu, 19 Jan 2012 10:42:51 +0800	[thread overview]
Message-ID: <20120119024251.GA33572@cs.nctu.edu.tw> (raw)
In-Reply-To: <CAFEAcA---LiibV94NEM3JO8d0r7Kk5Qyma2Uvq93PFxetK8VOA@mail.gmail.com>

On Wed, Jan 18, 2012 at 07:50:19PM +0000, Peter Maydell wrote:
> On 18 January 2012 19:43, James Greensky <gsky51@gmail.com> wrote:
> > On Tue, Jan 17, 2012 at 7:03 PM, 陳韋任 <chenwj@iis.sinica.edu.tw> 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	other threads:[~2012-01-19  2:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 19:00 [Qemu-devel] icount and tb chaining James Greensky
2012-01-12 19:02 ` James Greensky
2012-01-13  3:41 ` 陳韋任
2012-01-13 18:39   ` James Greensky
2012-01-17 18:50     ` Peter Maydell
2012-01-17 19:06       ` Laurent Desnogues
2012-01-17 19:08         ` Laurent Desnogues
2012-01-17 19:55       ` James Greensky
2012-01-18  3:22     ` 陳韋任
2012-01-18 19:49       ` James Greensky
2012-01-19 10:32         ` 陳韋任
2012-01-24 19:00           ` James Greensky
2012-01-17 15:06 ` 陳韋任
2012-01-17 19:52   ` James Greensky
2012-01-18  3:03     ` 陳韋任
2012-01-18 19:43       ` James Greensky
2012-01-18 19:50         ` Peter Maydell
2012-01-19  2:42           ` 陳韋任 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120119024251.GA33572@cs.nctu.edu.tw \
    --to=chenwj@iis.sinica.edu.tw \
    --cc=gsky51@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).