Re: [Qemu-devel] [PATCH v2] Convert stderr message calling error_get_pretty() to error_report()

2013-08-13 Thread Seiji Aguchi
Luiz, Can you pick up to your tree? Seiji > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, August 07, 2013 3:10 PM > To: Seiji Aguchi > Cc: qemu-devel@nongnu.org; arm...@redhat.com; Tomoki Sekiyama; > lcapitul...@redhat.com &g

[Qemu-devel] [PATCH v2] Convert stderr message calling error_get_pretty() to error_report()

2013-08-05 Thread Seiji Aguchi
vel&m=137513283408601&w=2 But, it is not reasonable to convert them at one time because fprintf() is used everwhere in qemu. So, it should be done step by step with avoiding regression. Signed-off-by: Seiji Aguchi --- Change from v2 - Remove "\n" from strings because error_repor

Re: [Qemu-devel] [PATCH] Convert stderr message calling error_get_pretty() to error_report() to prepend timestamp

2013-07-29 Thread Seiji Aguchi
age- > From: Luiz Capitulino [mailto:lcapitul...@redhat.com] > Sent: Monday, July 29, 2013 8:35 PM > To: Markus Armbruster > Cc: Andreas Färber; Seiji Aguchi; ler...@redhat.com; qemu-devel@nongnu.org; > Tomoki Sekiyama > Subject: Re: [Qemu-devel] [PATCH] Convert stderr message callin

[Qemu-devel] [PATCH] Convert stderr message calling error_get_pretty() to error_report() to prepend timestamp

2013-07-22 Thread Seiji Aguchi
Convert stderr messages calling error_get_pretty() to error_report(). Timestamp is prepended by -msg timstamp option with it. This is suggested by Luiz Capitulino. http://marc.info/?l=qemu-devel&m=137331442628866&w=2 Signed-off-by: Seiji Aguchi --- arch_init.c |4

Re: [Qemu-devel] [PULL 6/6] add timestamp to error_report()

2013-07-12 Thread Seiji Aguchi
qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PULL 6/6] add timestamp to error_report() > > On Fri, 12 Jul 2013 08:58:03 +0200 > Paolo Bonzini wrote: > > > Il 10/07/2013 19:52, Luiz Capitulino ha scritto: > > > From: Seiji Aguchi > > > > > > [Issue]

Re: [Qemu-devel] [PATCH v6] add timestamp to error_report()

2013-07-08 Thread Seiji Aguchi
> > +DEF("msg", HAS_ARG, QEMU_OPTION_msg, > > +"-msg timestamp[=on|off]\n" > > +"change the format of messages\n" > > +"on|off controls leading timestamps (default:on)\n", > > Did you really intend to say it's on by default? Because it's actually > disab

[Qemu-devel] [PATCH v6] add timestamp to error_report()

2013-07-03 Thread Seiji Aguchi
tly, there is no timestamp in qemu's error messages. Therefore, we may not be able to understand the problem based on error messages. [Solution] Add a timestamp to qemu's error message logged by error_report() with g_time_val_to_iso8601(). Signed-off-by: Seiji Aguchi --- Changelog v5 -&g

Re: [Qemu-devel] [PATCH v5] Add timestamp to error_report()

2013-07-03 Thread Seiji Aguchi
> -Original Message- > From: Stefan Hajnoczi [mailto:stefa...@gmail.com] > Sent: Wednesday, July 03, 2013 5:14 AM > To: Seiji Aguchi > Cc: qemu-devel@nongnu.org; aligu...@us.ibm.com; berra...@redhat.com; > kw...@redhat.com; mtosa...@redhat.com; > arm...@redhat

Re: [Qemu-devel] [PATCH v5] Add timestamp to error_report()

2013-07-03 Thread Seiji Aguchi
> Patches need to make sense today, please do not add extra code with > potential future use in mind: > > 1. Other developers must be able to read and modify the current codebase >on its own. They do not know what potential future changes you were >thinking about. > > 2. You may never en

Re: [Qemu-devel] [PATCH v5] Add timestamp to error_report()

2013-07-02 Thread Seiji Aguchi
;(disabled by default)" if needed. > > > diff --git a/util/qemu-time.c b/util/qemu-time.c > > new file mode 100644 > > index 000..3862788 > > --- /dev/null > > +++ b/util/qemu-time.c > > @@ -0,0 +1,26 @@ > > +/* > > + * Time handling >

Re: [Qemu-devel] [PATCH v4] Add timestamp to error message

2013-07-01 Thread Seiji Aguchi
> > > void error_report(const char *fmt, ...) > > > { > > > va_list ap; > > > +char timestr[TIMESTAMP_LEN]; > > > + > > > +if (enable_timestamp_msg) { > > > +qemu_get_timestamp_str(×tr); > > > +error_printf("%s ", timestr); > > > +} > > > > > > error_print_lo

[Qemu-devel] [PATCH v5] Add timestamp to error_report()

2013-07-01 Thread Seiji Aguchi
tly, there is no timestamp in qemu's error messages. Therefore, we may not be able to understand the problem based on error messages. [Solution] Add a timestamp to qemu's error message logged by error_report() with g_time_val_to_iso8601(). Signed-off-by: Seiji Aguchi --- Changelog v4

Re: [Qemu-devel] [PATCH v4] Add timestamp to error message

2013-06-28 Thread Seiji Aguchi
> >> > >> I wonder if TIME_H is maybe a bit too nondescript and could conflict > >> with other guards. OK. I will use QEMU_TIME_H. Apologies for my curt reply. Seiji

Re: [Qemu-devel] [PATCH v3] Add timestamp to error message

2013-06-28 Thread Seiji Aguchi
Thank you for the review. > > +#include "qemu-common.h" > > + > > +/* "1970-01-01T00:00:00.99Z" + '\0' */ > > +#define TIMESTAMP_LEN 28 > > Self-documenting constants are nicer: > > #define TIMESTAMP_LEN (sizeof("1970-01-01T00:00:00.99Z")+1) I will fix it. > > extern void qemu_get_ti

Re: [Qemu-devel] [PATCH v4] Add timestamp to error message

2013-06-28 Thread Seiji Aguchi
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.) I will try to add timestamp t

[Qemu-devel] [PATCH v4] Add timestamp to error message

2013-06-26 Thread Seiji Aguchi
tf(). Signed-off-by: Seiji Aguchi --- Changelog v3 -> v4 - Correct email address of Signed-off-by. v2 -> v3 - Use g_time_val_to_iso8601() to get timestamp instead of copying libvirt's time-handling functions. According to discussion below, qemu doesn't need to tak

Re: [Qemu-devel] [PATCH v3] Add timestamp to error message

2013-06-26 Thread Seiji Aguchi
> Signed-off-by: Seiji Aguchi I used wrong email address to Signed-off-by. Please ignore this patch. Seiji > -Original Message- > From: qemu-devel-bounces+seiji.aguchi=hds@nongnu.org > [mailto:qemu-devel-bounces+seiji.aguchi=hds@nongnu.org] > On Behalf Of Seij

[Qemu-devel] [PATCH v3] Add timestamp to error message

2013-06-26 Thread Seiji Aguchi
tf(). Signed-off-by: Seiji Aguchi --- Changelog v2 -> v3 - Use g_time_val_to_iso8601() to get timestamp instead of copying libvirt's time-handling functions. According to discussion below, qemu doesn't need to take care if timestamp functions are async-signal safe or

Re: [Qemu-devel] [RFC][PATCH v2]Add timestamp to error message

2013-05-02 Thread Seiji Aguchi
: qemu-devel-bounces+seiji.aguchi=hds@nongnu.org > [mailto:qemu-devel-bounces+seiji.aguchi=hds@nongnu.org] > On Behalf Of Anthony Liguori > Sent: Wednesday, May 01, 2013 10:27 AM > To: Daniel P. Berrange; Eric Blake > Cc: kw...@redhat.com; dle-deve...@lists.sourceforge.net; Sei

[Qemu-devel] [RFC][PATCH v2]Add timestamp to error message

2013-04-29 Thread Seiji Aguchi
From: Seiji Aguchi [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. In this case, we often need to know when the probl

Re: [Qemu-devel] [PATCH v4] Add option to mlock qemu and guest memory

2013-04-02 Thread Seiji Aguchi
tch. Could you please apply it to your tree? Seiji > -Original Message- > From: Satoru Moriya > Sent: Thursday, March 28, 2013 12:43 AM > To: Anthony Liguori; qemu-devel@nongnu.org > Cc: Jan Kiszka; mtosa...@redhat.com; Paolo Bonzini; Seiji Aguchi; Tomoki > Seki

[Qemu-devel] [PATCH] Make guest OS bootable when hardware failure happens in log disk

2013-03-28 Thread Seiji Aguchi
checks in case where opening a log file and creating chardev fail. Signed-off-by: Seiji Aguchi --- hw/qdev-properties-system.c |2 +- hw/serial-isa.c | 11 +++ hw/serial-pci.c | 27 --- hw/serial.c

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-04 Thread Seiji Aguchi
> > [TODO] > > Other functions below are used to output error messages in qemu. > > - qerror_report() is called in many source codes. > > Not a problem, it ends up in qerror_print(), which calls error_report(). Thanks. > > > - fprintf() is called in vl.c. > > All over the place, not just vl.

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-04 Thread Seiji Aguchi
> > Do we really want to add timestamps to error messages unconditionally? > > I don't doubt it's useful in your scenario, but most of the time it's > > just annoying clutter. > > Agreed, I think it should be an option. OK. I will add the timestamp as an option. > Also remember that management

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-01 Thread Seiji Aguchi
> > Are gmtime() + strftime() unsuitable for some reason? > > They are not async-signal safe, so they are not usable in between a > fork() and exec*(). Libvirt avoids them because it DOES log information > including timestamps in between fork/exec (and prior to > writing libvirt's virtime.c, we

Re: [Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-01 Thread Seiji Aguchi
Hi Laszlo, Thank you for reviewing my patch! I will update my patch in accordance with your comment, using gmtime() + strftime() and gettimeofday(). Seiji

[Qemu-devel] [RFC][PATCH]Add timestamp to error message

2013-02-01 Thread Seiji Aguchi
ime.c. [TODO] Other functions below are used to output error messages in qemu. - qerror_report() is called in many source codes. - fprintf() is called in vl.c. A timestamp should be added to these messages as well. Signed-off-by: Seiji Aguchi --- util