From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsI9B-0005HC-Jn for qemu-devel@nongnu.org; Thu, 27 Jun 2013 15:46:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsI9A-0000dy-8D for qemu-devel@nongnu.org; Thu, 27 Jun 2013 15:46:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsI9A-0000dl-06 for qemu-devel@nongnu.org; Thu, 27 Jun 2013 15:46:24 -0400 Message-ID: <51CC967E.9080508@redhat.com> Date: Thu, 27 Jun 2013 13:46:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <51CB9EB9.7030008@hds.com> <51CC1220.6000908@redhat.com> In-Reply-To: <51CC1220.6000908@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2VOBDIRMVUBIKKNGLPKOF" Subject: Re: [Qemu-devel] [PATCH v4] Add timestamp to error message List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VOBDIRMVUBIKKNGLPKOF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/27/2013 04:21 AM, Laszlo Ersek wrote: > comments below >=20 > 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)[]); >=20 > (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). >=20 > 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); >=20 > 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= =2E 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2VOBDIRMVUBIKKNGLPKOF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRzJZ+AAoJEKeha0olJ0NqzusH/RX//81OkXg+8Zmo1qlx2nJ8 CdXq3lKNAFfGGUD4vojL0dujrZocSxs9jw88FUrh3qzspg3q1wTOfqNm+B/43jmQ r92hdXycJihEDaYdpTWmKAaeqPK+tBDX3I64rn7bejP0aUsmLO/FGmVMbxS0awH/ OedjFsDqgyXWjMpQA7zDq9q9owUhhD7mHv1rHqlmF3R5i5MnpHji8X7aXOUoM9RR Nxzv6t+Wy6/j1p7R8OgKy3t3q3jaZrrA37Sjaiq95H/KtTLmyIcPxB+EYMCk9xlO NHJWLt3Em1LyWbAfO6mcWIasuS13e2ySUC0GlGMkic6Ot+Xw8Q5aBV/oQQp5tDM= =c+gS -----END PGP SIGNATURE----- ------enig2VOBDIRMVUBIKKNGLPKOF--