qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, dgilbert@redhat.com,
	Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] monitor: Add dump-stack command
Date: Tue, 07 May 2019 13:21:05 +0200	[thread overview]
Message-ID: <87sgtqcxy6.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <2f1ec028-0bfd-d571-6a34-b8f3adc35a13@ozlabs.ru> (Alexey Kardashevskiy's message of "Thu, 2 May 2019 12:15:40 +1000")

Alexey Kardashevskiy <aik@ozlabs.ru> writes:

> On 02/05/2019 10:44, David Gibson wrote:
>> On Wed, May 01, 2019 at 03:35:21PM +1000, Suraj Jitindar Singh wrote:
>>> Add a monitor command "dump-stack" to be used to dump the stack for the
>>> current cpu.
>> 
>> So, you can already get guest backtraces by using the gdbstub
>
> Not in the field - this requires QEMU to run with -s which is not
> usually the case.

If I understand help correctly, you can hot-add a gdbserver with HMP
command gdbserver.  Makes me think ...

> But since we almost always deal with QEMUs run by libvirt and HMP/QMP is
> always available, one could write a script doing QMP's
> "human-monitor-command x/16g" or "virsh qemu-monitor-command --hmp
> x/16g" to read the guest memory and MSR:LE and dump the stack with the
> exception frame.
>
>
>> functionality.  I can see some benefit in allowing this more easily
>> through hmp, but whether it's worth the code size, I'm less certain.

... David's "why not use gdb" should be considered once more.

> It still seems easier than running an external script talking to HMP/QMP
> as you would not want to write such script in bash but rather in a
> better language which might not be installed on the client machine (like
> missing python3 on many RHEL :) ). Thanks,

Your point "while it's possible to trace the stack with nothing but
x/16g and a general purpose programming language, we shouldn't make our
users jump through this hoop" is valid.

However, the new command is actually competing with gdb.  How much of
gdb do we want to build into QEMU to avoid the inconvenience of having
to install gdb and hot-add a gdb server?


  parent reply	other threads:[~2019-05-07 11:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01  5:35 [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command Suraj Jitindar Singh
2019-05-01  5:35 ` Suraj Jitindar Singh
2019-05-01  5:35 ` [Qemu-devel] [PATCH 2/2] ppc: Add dump-stack implementation Suraj Jitindar Singh
2019-05-01  5:35   ` Suraj Jitindar Singh
2019-05-01  9:48   ` Alexey Kardashevskiy
2019-05-01  9:48     ` Alexey Kardashevskiy
2019-05-02  0:43     ` David Gibson
2019-05-02  0:43       ` David Gibson
2019-05-02  3:47       ` Alexey Kardashevskiy
2019-05-02  3:47         ` Alexey Kardashevskiy
2019-05-06  3:39         ` David Gibson
2019-05-02 13:59   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2019-05-02 13:59     ` Greg Kurz
2019-05-07 11:24   ` [Qemu-devel] " Markus Armbruster
2019-05-01 10:44 ` [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command Dr. David Alan Gilbert
2019-05-01 10:44   ` Dr. David Alan Gilbert
2019-05-02  0:44 ` David Gibson
2019-05-02  0:44   ` David Gibson
2019-05-02  2:15   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2019-05-02  2:15     ` Alexey Kardashevskiy
2019-05-07 11:21     ` Markus Armbruster [this message]
2019-05-07 11:09 ` [Qemu-devel] " Markus Armbruster
2019-05-08 10:26   ` Dr. David Alan Gilbert
2019-05-08 13:10     ` Markus Armbruster
2019-05-08 13:15       ` Dr. David Alan Gilbert
2019-06-21  0:51 ` Suraj Jitindar Singh
2019-06-24  8:57   ` Markus Armbruster

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=87sgtqcxy6.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sjitindarsingh@gmail.com \
    /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).