|
From: | Lei Li |
Subject: | Re: [Qemu-devel] TB chaining |
Date: | Thu, 22 Sep 2011 10:27:58 +0800 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 |
On 09/22/2011 09:58 AM, 陳韋任 wrote:
/* list of TBs jumping to this one. This is a circular list using the two least significant bits of the pointers to tell what is the next pointer: 0 = jmp_next[0], 1 = jmp_next[1], 2 = jmp_first */ struct TranslationBlock *jmp_next[2]; struct TranslationBlock *jmp_first;After tracing the code, I found the comment might be wrong. For example, if we link tb1 to tb2, i.e., tb1 -> tb2. Then "tb1->jmp_next[n] = tb2" and "tb2->jmp_first = tb1" (roughly speaking). I'm not sure if I misunderstand the comment "list of TBs jumping to this one", or it is just wrong.
Well, the comment is from source code. I don't catch why you think "list of TBS jumping to this one" is wrong. My understand is that TB chain be used forreduce switch from the translation cache to the guest code. It will be a circular list if there is no interrupt or exceptional. At mean while, it's just the date related to TB chain in TB struct, it's not about process of how TB chain work.
Regards, chenwj
-- Lei
[Prev in Thread] | Current Thread | [Next in Thread] |