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: James Greensky
Subject: Re: [Qemu-devel] icount and tb chaining
Date: Tue, 17 Jan 2012 11:52:09 -0800

On Tue, Jan 17, 2012 at 7:06 AM, 陳韋任 <address@hidden> wrote:
>> a jump with the least significant bits = 2. This falls through to tb
>> add jump, which then updates the jmp_first field of the current tb.
>
>  I don't know if tb_add_jump's second parameter will be two or not, but
> look at TranslationBlock (exec-all.h),
>
> struct TranslationBlock {
>
>  struct TranslationBlock *jmp_next[2];
>
> }
>
> and tb_add_jump (exec-all.h).
>
> static inline void tb_add_jump(TranslationBlock *tb, int n,
>                               TranslationBlock *tb_next)
> {
>    /* NOTE: this test is only needed for thread safety */
>    if (!tb->jmp_next[n]) { <--- what if n is 2?
>    }
> }
>
> 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

if (!tb->jmp_next[n]) { <--- what if n is 2?

This is my question, if n is two, it would actually be checking the
jmp_first field immediatedly following the jmp_next array in the tb
structure.  This function only updates the jmp_first field and doesn't
touch jmp_next when n is 2. Does anybody know why this is? It seems
like you would like to leave the tb chaining as it was, because you
are going to execute the same translation block again, it just jumped
out to replenish the icount_decr counter. -Jim



reply via email to

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