[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code |
Date: |
Thu, 14 Sep 2017 09:15:18 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 09/14/2017 08:20 AM, Lluís Vilanova wrote:
> Richard Henderson writes:
>
>> On 09/10/2017 09:27 AM, Lluís Vilanova wrote:
>>> TCG BBLs and instructions have multiple exit points from where to raise
>>> tracing events, but some of the necessary information in the generic
>>> disassembly infrastructure is not available until after generating these
>>> exit points.
>>>
>>> This patch adds support for "inline points" (where the tracing code will
>>> be placed), and "inline regions" (which identify the TCG code that must
>>> be inlined). The TCG compiler will basically copy each inline region to
>>> any inline points that reference it.
>
>> I am not keen on this.
>
>> Is there a reason you can't just emit the tracing code at the appropriate
>> place
>> to begin with? Perhaps I have to wait to see how this is used...
>
> As I tried to briefly explain on next patch, the main problem without inlining
> is that we will see guest_tb_after_trans twice on the trace for each TB in
> conditional instructions on the guest, since they have two exit points (which
> we
> capture when emitting goto_tb in TCG).
Without seeing the code, I suspect this is because you didn't examine the
argument to tcg_gen_exit_tb. You can tell when goto_tb must have been emitted
and avoid logging twice.
r~
- [Qemu-devel] [PATCH 2/7] trace: Add event "guest_inst_before", (continued)
- [Qemu-devel] [PATCH 2/7] trace: Add event "guest_inst_before", Lluís Vilanova, 2017/09/10
- [Qemu-devel] [PATCH 3/7] trace: Add event "guest_inst_info_before", Lluís Vilanova, 2017/09/10
- [Qemu-devel] [PATCH 4/7] tcg: Add support for "inlining" regions of code, Lluís Vilanova, 2017/09/10
- [Qemu-devel] [PATCH 5/7] trace: Add event "guest_bbl_after", Lluís Vilanova, 2017/09/10
- [Qemu-devel] [PATCH 6/7] trace: Add event "guest_inst_after", Lluís Vilanova, 2017/09/10