From: Paolo Bonzini <pbonzini@redhat.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: Pavel Butsykin <pbutsykin@virtuozzo.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
Luiz Capitulino <lcapitulino@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 7/9] log: report HMP command and event
Date: Mon, 14 Mar 2016 15:36:11 +0100 [thread overview]
Message-ID: <56E6CC5B.1080302@redhat.com> (raw)
In-Reply-To: <1457954501-26528-8-git-send-email-den@openvz.org>
On 14/03/2016 12:21, Denis V. Lunev wrote:
> From: Pavel Butsykin <pbutsykin@virtuozzo.com>
Please explain the usecase here. Is it for debugging the hypervisor or
for something else?
Paolo
> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> CC: Stefan Hajnoczi <stefanha@redhat.com>
> CC: Paolo Bonzini <pbonzini@redhat.com>
> CC: Luiz Capitulino <lcapitulino@redhat.com>
> CC: Markus Armbruster <armbru@redhat.com>
> CC: Eric Blake <eblake@redhat.com>
> ---
> include/qemu/log.h | 1 +
> monitor.c | 4 ++++
> util/log.c | 2 ++
> 3 files changed, 7 insertions(+)
>
> diff --git a/include/qemu/log.h b/include/qemu/log.h
> index 55bceae..9264bbf 100644
> --- a/include/qemu/log.h
> +++ b/include/qemu/log.h
> @@ -43,6 +43,7 @@ static inline bool qemu_log_separate(void)
> #define CPU_LOG_PAGE (1 << 14)
> #define LOG_TRACE (1 << 15)
> #define LOG_QMP (1 << 16)
> +#define LOG_HMP (1 << 17)
>
> /* Returns true if a bit is set in the current loglevel mask
> */
> diff --git a/monitor.c b/monitor.c
> index eec4e58..4bf4f31 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -2893,6 +2893,8 @@ static void handle_hmp_command(Monitor *mon, const char *cmdline)
> QDict *qdict;
> const mon_cmd_t *cmd;
>
> + qemu_log_mask(LOG_HMP, "HMP command: %s\n", cmdline);
> +
> cmd = monitor_parse_command(mon, &cmdline, mon->cmd_table);
> if (!cmd) {
> return;
> @@ -4053,11 +4055,13 @@ static void monitor_event(void *opaque, int event)
> }
> mon->reset_seen = 1;
> mon_refcount++;
> + qemu_log_mask(LOG_HMP, "HMP: new connection established\n");
> break;
>
> case CHR_EVENT_CLOSED:
> mon_refcount--;
> monitor_fdsets_cleanup();
> + qemu_log_mask(LOG_HMP, "HMP: connection closed\n");
> break;
> }
> }
> diff --git a/util/log.c b/util/log.c
> index 5fc517b..795aaea 100644
> --- a/util/log.c
> +++ b/util/log.c
> @@ -133,6 +133,8 @@ const QEMULogItem qemu_log_items[] = {
> "complete traces" },
> { LOG_QMP, "qmp",
> "log the QMP commands and events" },
> + { LOG_HMP, "hmp",
> + "log the HMP commands and events" },
> { 0, NULL, NULL },
> };
>
>
next prev parent reply other threads:[~2016-03-14 14:36 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 11:21 [Qemu-devel] [PATCH v2 0/9] log: assorted improvements Denis V. Lunev
2016-03-14 11:21 ` [Qemu-devel] [PATCH 1/9] trace: do not always call exit() in trace_enable_events Denis V. Lunev
2016-03-14 14:25 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 2/9] qemu-log: fix cpu_reset log target Denis V. Lunev
2016-03-14 14:24 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 3/9] log: improve code in do_qemu_set_log Denis V. Lunev
2016-03-14 14:28 ` Paolo Bonzini
2016-03-16 11:20 ` Denis V. Lunev
2016-03-16 11:25 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 4/9] log: move qemu_log_close/qemu_log_flush from header to log.c Denis V. Lunev
2016-03-14 14:29 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 5/9] log: improve performance of qemu_log and qemu_log_mask if disabled Denis V. Lunev
2016-03-14 14:30 ` Paolo Bonzini
2016-03-14 15:07 ` Denis V. Lunev
2016-03-14 11:21 ` [Qemu-devel] [PATCH 6/9] log: log QMP commands and replies Denis V. Lunev
2016-03-14 14:33 ` Paolo Bonzini
2016-03-14 14:38 ` Daniel P. Berrange
2016-03-14 15:00 ` Denis V. Lunev
2016-03-14 15:05 ` Denis V. Lunev
2016-03-14 15:26 ` Daniel P. Berrange
2016-03-14 16:10 ` Denis V. Lunev
2016-03-14 16:37 ` Paolo Bonzini
2016-03-14 16:11 ` Daniel P. Berrange
2016-03-14 16:16 ` Denis V. Lunev
2016-03-14 16:40 ` Paolo Bonzini
2016-03-16 13:09 ` Denis V. Lunev
2016-03-16 13:11 ` Paolo Bonzini
2016-03-17 15:31 ` Daniel P. Berrange
2016-03-14 11:21 ` [Qemu-devel] [PATCH 7/9] log: report HMP command and event Denis V. Lunev
2016-03-14 14:36 ` Paolo Bonzini [this message]
2016-03-14 15:08 ` Denis V. Lunev
2016-03-14 16:35 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 8/9] log: report QAPI event Denis V. Lunev
2016-03-14 14:33 ` Paolo Bonzini
2016-03-14 11:21 ` [Qemu-devel] [PATCH 9/9] log: adds a timestamp to each log entry Denis V. Lunev
2016-03-14 14:39 ` Paolo Bonzini
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=56E6CC5B.1080302@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=lcapitulino@redhat.com \
--cc=pbutsykin@virtuozzo.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 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.