From: Aurelien Jarno <aurelien@aurel32.net>
To: Jun Koi <junkoi2004@gmail.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>,
Alexander Graf <agraf@suse.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: Missing singlestep for already-translated code?
Date: Thu, 15 Apr 2010 12:02:53 +0200 [thread overview]
Message-ID: <4BC6E44D.5080406@aurel32.net> (raw)
In-Reply-To: <g2lfdaac4d51004142110tacdb33b8h8b434cf63fea598a@mail.gmail.com>
Jun Koi a écrit :
> On Wed, Apr 14, 2010 at 12:28 AM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
>> Alexander Graf wrote:
>>> On 13.04.2010, at 15:36, Jan Kiszka wrote:
>>>
>>>> Jun Koi wrote:
>>>>> Hi,
>>>>>
>>>>> I am looking into the singlestep command in monitor interface, and it
>>>>> seems that we only take into account the singlestep flag when we are
>>>>> translating code.
>>>>> So for the already-translated code, we will miss singlestep?
>>>> This feature is broken. For TCG, it should at least flush the
>>>> translation buffer, and for KVM it has to enable single-stepping in the
>>>> kernel. That's what happens automatically when you call cpu_single_step.
>>>> I guess 'singlestep' wants to be somehow orthogonal to this. But this is
>>>> the wrong approach.
>>>>
>>>> Does anyone actually used this feature or still does so? It looks fairly
>>>> redundant to me, kind of a poor-man's gdb front-end as part of the
>>>> monitor console.
>>> Not sure what it does, but I use -singlestep quite a lot to get register dumps for instructions when using -d cpu.
>> Ah, "singlestep" is not about stopping the VM after each instruction but
>> about limiting the TB length to a single instruction. Badly named and
>> poorly documented.
>>
>> In that case, the dynamic switch should already be fine by adding a
>> tb_flush() on enable. Still, someone should also patch at least the docs.
>>
What's the real point of flushing the tb to get it retranslated again?
It will be retranslated in the exact same way.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
next prev parent reply other threads:[~2010-04-15 10:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-13 4:03 [Qemu-devel] Missing singlestep for already-translated code? Jun Koi
2010-04-13 9:21 ` [Qemu-devel] " takasi-y
2010-04-13 9:48 ` Jun Koi
2010-04-13 13:36 ` Jan Kiszka
2010-04-13 14:10 ` Alexander Graf
2010-04-13 15:28 ` Jan Kiszka
2010-04-15 4:10 ` Jun Koi
2010-04-15 8:59 ` Jan Kiszka
2010-04-15 10:02 ` Aurelien Jarno [this message]
2010-04-15 10:13 ` Jan Kiszka
2010-04-15 11:41 ` Aurelien Jarno
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=4BC6E44D.5080406@aurel32.net \
--to=aurelien@aurel32.net \
--cc=agraf@suse.de \
--cc=jan.kiszka@siemens.com \
--cc=junkoi2004@gmail.com \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.