From: Alon Levy <alevy@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2 3/4] qxl: add debug_cs and cmdlog_cs
Date: Sat, 30 Apr 2011 01:19:44 +0300 [thread overview]
Message-ID: <20110429221944.GD13837@amber.local> (raw)
In-Reply-To: <4DBAAA92.60409@redhat.com>
On Fri, Apr 29, 2011 at 02:09:54PM +0200, Gerd Hoffmann wrote:
> On 04/28/11 10:29, Alon Levy wrote:
> >With this you can output the command log and/or the guest debug (driver)
> >output to a chardev instead of stderr:
> >
> >-global qxl-vga.cmdlog_chardev=qxl_cmdlog_chardev
> >-global qxl-vga.debug_chardev=qxl_debug_chardev
> >
> >useful for debugging. if no chardev is specified prints to stderr like the old
> >code.
>
> Hmm. That is a bit too much ad-hoc debug hacking IMHO. Also I'm
> not sure I like the idea to send debug stuff through chardev instead
> of just writing them to stderr or some logfile.
>
> I do see why you are doing that though. Unfortunaly qemu has no
> sane debug logging infrastructure. This is long overdue IMHO, so we
> don't need hacks like this one and also don't reinvent stuff over
> and over.
The bigger hack called "qxl_terse" I didn't even send :) ok, so now I get
to either keep this in my closet or think of how to do a minimal acceptable
qemu logging infrastructure that would let me register a logging handle and
use that to redirect to a chardev (they would all default to being muxed over
stdio?)
QemuLogger *qemu_create_logger(const char *logger_id);
- logger_id is used to match to the chardev given on the command line
- need to prevent collision, so probably easier to have a logger_id be an int
and have that looked up to a string in an automatically generated table?
struct QemuLogger {
CharDriverState *chr;
};
And command line would be:
-chardev bla,id=myid -debug qxl,myid
qxl->logger = qemu_create_logger("qxl");
qemu_chr_write(qxl->logger->chr, ..)
logger creation would have to happen before command line parsing, so in the device initialization.
Sounds right?
>
> cheers,
> Gerd
>
next prev parent reply other threads:[~2011-04-30 3:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 8:29 [Qemu-devel] [PATCHv2 0/4] qxl: debug related fixes Alon Levy
2011-04-28 8:29 ` [Qemu-devel] [PATCHv2 1/4] qxl: interface_get_command: fix reported mode Alon Levy
2011-04-29 12:01 ` Gerd Hoffmann
2011-04-29 21:53 ` Alon Levy
2011-04-28 8:29 ` [Qemu-devel] [PATCHv2 2/4] qxl: add mode to debugprint on destroy primary Alon Levy
2011-04-29 12:01 ` Gerd Hoffmann
2011-04-29 21:54 ` Alon Levy
2011-04-28 8:29 ` [Qemu-devel] [PATCHv2 3/4] qxl: add debug_cs and cmdlog_cs Alon Levy
2011-04-29 12:09 ` Gerd Hoffmann
2011-04-29 22:19 ` Alon Levy [this message]
2011-05-02 9:02 ` [Qemu-devel] debug logging (was: Re: [PATCHv2 3/4] qxl: add debug_cs and cmdlog_cs) Gerd Hoffmann
2011-05-02 10:12 ` Alon Levy
2011-05-02 10:25 ` [Qemu-devel] debug logging Gerd Hoffmann
2011-05-02 10:33 ` Alon Levy
2011-05-02 10:37 ` Jan Kiszka
2011-05-02 11:00 ` Markus Armbruster
2011-05-02 11:50 ` Alon Levy
2011-05-02 12:43 ` Jan Kiszka
2011-05-02 13:04 ` Alon Levy
2011-05-02 14:09 ` Paolo Bonzini
2011-04-28 8:29 ` [Qemu-devel] [PATCHv2 4/4] qxl: allow QXL_IO_LOG also in vga Alon Levy
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=20110429221944.GD13837@amber.local \
--to=alevy@redhat.com \
--cc=kraxel@redhat.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.