From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] accel/tcg: assert insn_idx will always be valid before plugin_inject_cb
Date: Mon, 13 Sep 2021 15:06:03 +0100 [thread overview]
Message-ID: <87h7eova8w.fsf@linaro.org> (raw)
In-Reply-To: <a925ce89-7134-c26a-c967-942f98b71a29@linaro.org>
Richard Henderson <richard.henderson@linaro.org> writes:
> On 9/13/21 3:06 AM, Alex Bennée wrote:
>>> Also, existing strageness in insn_idx being incremented for non-insns?
>> It shouldn't be - it's just using the presence of the memory
>> instrumentation as a proxy for the start of a instruction and dealing
>> with the slightly different start of block boundary.
>>
>>> Should it be named something else? I haven't looked at how it's
>>> really used in the end.
>> We need the insn idx to find the registered callbacks for a given
>> instruction later. We could maybe embed a metadata TCGOp that could
>> track this for us but that might make TCG a bit more confusing as it
>> doesn't really need that information?
>
> We have a metadata op for marking instruction boundaries already:
> INDEX_op_insn_start.
Hmm so we have a separate list for speedy access:
/* list to quickly access the injected ops */
QSIMPLEQ_HEAD(, TCGOp) plugin_ops;
I wonder if we should drop that and just scan QTAILQ_HEAD(, TCGOp) ops
so we can be properly aligned with the current instruction.
Alternatively we could just emit INDEX_op_insn_start to the plugin list
as well?
>
>
> r~
--
Alex Bennée
next prev parent reply other threads:[~2021-09-13 14:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 14:59 [PATCH] accel/tcg: assert insn_idx will always be valid before plugin_inject_cb Alex Bennée
2021-09-12 21:37 ` Richard Henderson
2021-09-13 10:06 ` Alex Bennée
2021-09-13 12:55 ` Richard Henderson
2021-09-13 14:06 ` Alex Bennée [this message]
2021-09-13 14:11 ` Richard Henderson
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=87h7eova8w.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).