[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about direct block chaining
From: |
Richard Henderson |
Subject: |
Re: Question about direct block chaining |
Date: |
Mon, 18 Apr 2022 08:37:54 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 |
On 4/18/22 07:54, Taylor Simpson wrote:
I implemented both approaches for inner loops and didn't see speedup in my
benchmark. So, I have a couple of questions
1) What are the pros and cons of the two approaches (lookup_and_goto_ptr and
goto_tb + exit_tb)?
goto_tb can only be used within a single page (plus other restrictions, see
translator_use_goto_tb). In addition, as documented, the change in cpu state must be
constant, beginning with a direct jump.
lookup_and_goto_ptr can handle any change in cpu state, including indirect
jumps.
2) How can I verify that direct block chaining is working properly?
With -d exec, I see lines like the following with goto_tb + exit_tb but
NOT lookup_and_goto_ptr
Linking TBs 0x7fda44172e00 [0050ac38] index 1 -> 0x7fda44173b40
[0050ac6c]
Well, that's one way. I would have also suggested simply looking at -d op output, for the
various branchy cases you're considering, to see that all of the exits are as expected.
r~