qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
	mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com,
	dle-develop@lists.sourceforge.net, tomoki.sekiyama@hds.com,
	lcapitulino@redhat.com, pbonzini@redhat.com,
	Seiji Aguchi <seiji.aguchi@hds.com>
Subject: Re: [Qemu-devel] [PATCH v4] Add timestamp to error message
Date: Thu, 27 Jun 2013 13:46:06 -0600	[thread overview]
Message-ID: <51CC967E.9080508@redhat.com> (raw)
In-Reply-To: <51CC1220.6000908@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2178 bytes --]

On 06/27/2013 04:21 AM, Laszlo Ersek wrote:
> comments below
> 
> On 06/27/13 04:08, Seiji Aguchi wrote:
>> [Issue]
>> When we offer a customer support service and a problem happens
>> in a customer's system, we try to understand the problem by
>> comparing what the customer reports with message logs of the
>> customer's system.
>>

>> +extern void qemu_get_timestamp_str(char (*timestr)[]);
> 
> (a) The type of "timestr" is a valid one, it says "pointer to array of
> unknown size". The array type is an incomplete type (its size is
> unknown), but pointers can point to incomplete types (like to an opaque
> struct, which is also an incomplete type).
> 
> It's however quite unusual to write something like this, when a simple
> pointer-to-char would do.

Agreed; I made a similar comment against v3.

>>      error_print_loc();
>>      va_start(ap, fmt);
> 
> Does this print the timestamp to all kinds of monitors too? On stderr,
> the timestamp is great. When printed to an "interactive monitor", it
> could also help post-mortem debugging. But would it not confuse libvirt
> eg.? (Apologies if this has been discussed before.)

Libvirt would love to unconditionally enable timestamps in log output;
having coordination of any qemu log dumped alongside other libvirt log
output will indeed benefit from having a common timestamp synchronization.

Regarding monitor output, libvirt uses the QMP monitor, not the HMP
monitor, and this had better not prepend text to QMP output (since that
would result in non-JSON output).  It could be added as an additional
dictionary member within each QMP command, which would not impact
libvirt (which ignores dictionary elements it is not expecting, or
future libvirt could see if a timestamp was passed back).  HMP
passthrough commands called via QMP's 'human-monitor-command' might then
have the timestamp included, but that's not an issue since HMP output is
already not guaranteed stable.  But if you DO want to add it to QMP
return values, then it needs a followup patch.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]

  reply	other threads:[~2013-06-27 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27  2:08 [Qemu-devel] [PATCH v4] Add timestamp to error message Seiji Aguchi
2013-06-27 10:21 ` Laszlo Ersek
2013-06-27 19:46   ` Eric Blake [this message]
2013-06-28 18:54   ` Seiji Aguchi
2013-06-28 19:06     ` Laszlo Ersek
2013-06-28 19:25       ` Seiji Aguchi
2013-07-01 19:00     ` Seiji Aguchi

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=51CC967E.9080508@redhat.com \
    --to=eblake@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=dle-develop@lists.sourceforge.net \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seiji.aguchi@hds.com \
    --cc=stefanha@gmail.com \
    --cc=tomoki.sekiyama@hds.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).