qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Suraj Jitindar Singh <sjitindarsingh@gmail.com>,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH 1/2] monitor: Add dump-stack command
Date: Wed, 8 May 2019 14:15:05 +0100	[thread overview]
Message-ID: <20190508131505.GI2718@work-vm> (raw)
In-Reply-To: <87pnot148a.fsf@dusky.pond.sub.org>

* Markus Armbruster (armbru@redhat.com) wrote:
> "Dr. David Alan Gilbert" <dgilbert@redhat.com> writes:
> 
> > * Markus Armbruster (armbru@redhat.com) wrote:
> >> Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:
> >> 
> >> > Add a monitor command "dump-stack" to be used to dump the stack for the
> >> > current cpu.
> >> 
> >> I guess this is just for debugging.  Correct?
> >> 
> >> Shouldn't this be "info stack", to match "info registers" and "info
> >> cpustats"?
> >
> > Since this is primarily about walking the guests stack frames and not
> > walking qemu internal data structures, I think it's probably OK to be
> > a dump-stack rather than an info subcommand.
> 
> Well, "info registers" is also about the guest's state and not QEMU
> internal state.  Arguably, so are "info pic", "info tlb", ...

When doing an 'info registers' you don't have to interpret or parse 
much guest state, you just print it, and it's guest state that's
held separately (similarly a separate piece of state for info pic, info
tlb etc).  You might check the register state a little when you
decide which bits to print or how to format them, but that's about as
far as it goes.  So each of the 'info's (or query for qmp) correspond
to one logical chunk of qemu and/or guest state.

Printing a stack is a much hairier thing, with knowledge of guest
stack layout and potentially some heuristics.

> We have a long-standing tradition of using "info" for "pure"
> information-retrieving commands.  I rather like that pattern.
> 
> Ultimately your choice as the HMP maintainer, of course.

Dave

--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2019-05-08 13:17 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
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 [this message]
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=20190508131505.GI2718@work-vm \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --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).