From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, berrange@redhat.com, qemu-block@nongnu.org,
armbru@redhat.com, dgilbert@redhat.com
Subject: [Qemu-devel] [PATCH v3 07/15] Move monitor.c to monitor/misc.c
Date: Thu, 13 Jun 2019 17:33:57 +0200 [thread overview]
Message-ID: <20190613153405.24769-8-kwolf@redhat.com> (raw)
In-Reply-To: <20190613153405.24769-1-kwolf@redhat.com>
Create a new monitor/ subdirectory and move monitor.c there. As the plan
is to move the monitor core into separate files, use the chance to
rename it to misc.c.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
docs/devel/writing-qmp-commands.txt | 2 +-
monitor.c => monitor/misc.c | 2 +-
MAINTAINERS | 4 ++--
Makefile.objs | 1 +
Makefile.target | 3 ++-
monitor/Makefile.objs | 1 +
monitor/trace-events | 11 +++++++++++
trace-events | 10 ----------
8 files changed, 19 insertions(+), 15 deletions(-)
rename monitor.c => monitor/misc.c (99%)
create mode 100644 monitor/Makefile.objs
create mode 100644 monitor/trace-events
diff --git a/docs/devel/writing-qmp-commands.txt b/docs/devel/writing-qmp-commands.txt
index 9dfc62bf5a..cc6ecd6d5d 100644
--- a/docs/devel/writing-qmp-commands.txt
+++ b/docs/devel/writing-qmp-commands.txt
@@ -470,7 +470,7 @@ it's good practice to always check for errors.
Another important detail is that HMP's "info" commands don't go into the
hmp-commands.hx. Instead, they go into the info_cmds[] table, which is defined
-in the monitor.c file. The entry for the "info alarmclock" follows:
+in the monitor/misc.c file. The entry for the "info alarmclock" follows:
{
.name = "alarmclock",
diff --git a/monitor.c b/monitor/misc.c
similarity index 99%
rename from monitor.c
rename to monitor/misc.c
index 006c650761..e5db04265d 100644
--- a/monitor.c
+++ b/monitor/misc.c
@@ -64,7 +64,7 @@
#include "qapi/qmp/json-parser.h"
#include "qapi/qmp/qlist.h"
#include "qom/object_interfaces.h"
-#include "trace-root.h"
+#include "trace.h"
#include "trace/control.h"
#include "monitor/hmp-target.h"
#ifdef CONFIG_TRACE_SIMPLE
diff --git a/MAINTAINERS b/MAINTAINERS
index 588c8d947a..231964c1da 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1916,7 +1916,7 @@ F: qapi/run-state.json
Human Monitor (HMP)
M: Dr. David Alan Gilbert <dgilbert@redhat.com>
S: Maintained
-F: monitor.c
+F: monitor/misc.c
F: hmp.[ch]
F: hmp-commands*.hx
F: include/monitor/hmp-target.h
@@ -2038,7 +2038,7 @@ QMP
M: Markus Armbruster <armbru@redhat.com>
S: Supported
F: qmp.c
-F: monitor.c
+F: monitor/misc.c
F: docs/devel/*qmp-*
F: docs/interop/*qmp-*
F: scripts/qmp/
diff --git a/Makefile.objs b/Makefile.objs
index c8337fa34b..dd39a70b48 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -130,6 +130,7 @@ trace-events-subdirs =
trace-events-subdirs += accel/kvm
trace-events-subdirs += accel/tcg
trace-events-subdirs += crypto
+trace-events-subdirs += monitor
ifeq ($(CONFIG_USER_ONLY),y)
trace-events-subdirs += linux-user
endif
diff --git a/Makefile.target b/Makefile.target
index ecd856e3a3..72c267f7dc 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -148,9 +148,10 @@ endif #CONFIG_BSD_USER
#########################################################
# System emulator target
ifdef CONFIG_SOFTMMU
-obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o numa.o
+obj-y += arch_init.o cpus.o gdbstub.o balloon.o ioport.o numa.o
obj-y += qtest.o
obj-y += hw/
+obj-y += monitor/
obj-y += qapi/
obj-y += memory.o
obj-y += memory_mapping.o
diff --git a/monitor/Makefile.objs b/monitor/Makefile.objs
new file mode 100644
index 0000000000..e783b0616b
--- /dev/null
+++ b/monitor/Makefile.objs
@@ -0,0 +1 @@
+obj-y += misc.o
diff --git a/monitor/trace-events b/monitor/trace-events
new file mode 100644
index 0000000000..abfdf20b14
--- /dev/null
+++ b/monitor/trace-events
@@ -0,0 +1,11 @@
+# See docs/devel/tracing.txt for syntax documentation.
+
+# misc.c
+monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p"
+monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"
+monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "event=%d data=%p rate=%" PRId64
+handle_hmp_command(void *mon, const char *cmdline) "mon %p cmdline: %s"
+handle_qmp_command(void *mon, const char *req) "mon %p req: %s"
+monitor_suspend(void *ptr, int cnt) "mon %p: %d"
+monitor_qmp_cmd_in_band(const char *id) "%s"
+monitor_qmp_cmd_out_of_band(const char *id) "%s"
diff --git a/trace-events b/trace-events
index 844ee58dd9..aeea3c2bdb 100644
--- a/trace-events
+++ b/trace-events
@@ -41,16 +41,6 @@ system_wakeup_request(int reason) "reason=%d"
qemu_system_shutdown_request(int reason) "reason=%d"
qemu_system_powerdown_request(void) ""
-# monitor.c
-monitor_protocol_event_handler(uint32_t event, void *qdict) "event=%d data=%p"
-monitor_protocol_event_emit(uint32_t event, void *data) "event=%d data=%p"
-monitor_protocol_event_queue(uint32_t event, void *qdict, uint64_t rate) "event=%d data=%p rate=%" PRId64
-handle_hmp_command(void *mon, const char *cmdline) "mon %p cmdline: %s"
-handle_qmp_command(void *mon, const char *req) "mon %p req: %s"
-monitor_suspend(void *ptr, int cnt) "mon %p: %d"
-monitor_qmp_cmd_in_band(const char *id) "%s"
-monitor_qmp_cmd_out_of_band(const char *id) "%s"
-
# dma-helpers.c
dma_blk_io(void *dbs, void *bs, int64_t offset, bool to_dev) "dbs=%p bs=%p offset=%" PRId64 " to_dev=%d"
dma_aio_cancel(void *dbs) "dbs=%p"
--
2.20.1
next prev parent reply other threads:[~2019-06-13 16:57 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 15:33 [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc Kevin Wolf
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 01/15] monitor: Remove unused password prompting fields Kevin Wolf
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 02/15] monitor: Split monitor_init in HMP and QMP function Kevin Wolf
2019-06-14 8:51 ` Markus Armbruster
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 03/15] monitor: Make MonitorQMP a child class of Monitor Kevin Wolf
2019-06-14 8:54 ` Markus Armbruster
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 04/15] monitor: Create MonitorHMP with readline state Kevin Wolf
2019-06-14 8:55 ` Markus Armbruster
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 05/15] monitor: Remove Monitor.cmd_table indirection Kevin Wolf
2019-06-14 5:51 ` Markus Armbruster
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 06/15] monitor: Rename HMP command type and tables Kevin Wolf
2019-06-14 5:52 ` Markus Armbruster
2019-06-14 6:01 ` Markus Armbruster
2019-06-13 15:33 ` Kevin Wolf [this message]
2019-06-14 6:04 ` [Qemu-devel] [PATCH v3 07/15] Move monitor.c to monitor/misc.c Markus Armbruster
2019-06-14 6:25 ` Markus Armbruster
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 08/15] monitor: Move {hmp, qmp}.c to monitor/{hmp, qmp}-cmds.c Kevin Wolf
2019-06-13 15:33 ` [Qemu-devel] [PATCH v3 09/15] monitor: Create monitor-internal.h with common definitions Kevin Wolf
2019-06-14 6:37 ` Markus Armbruster
2019-06-14 8:47 ` Kevin Wolf
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 10/15] monitor: Split out monitor/qmp.c Kevin Wolf
2019-06-14 6:46 ` Markus Armbruster
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 11/15] monitor: Split out monitor/hmp.c Kevin Wolf
2019-06-14 8:23 ` Markus Armbruster
2019-06-14 9:17 ` Dr. David Alan Gilbert
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 12/15] monitor: Split out monitor/monitor.c Kevin Wolf
2019-06-14 8:29 ` Markus Armbruster
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 13/15] monitor: Split Monitor.flags into separate bools Kevin Wolf
2019-06-14 8:48 ` Markus Armbruster
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 14/15] monitor: Replace monitor_init() with monitor_init_{hmp, qmp}() Kevin Wolf
2019-06-14 8:50 ` Markus Armbruster
2019-06-13 15:34 ` [Qemu-devel] [PATCH v3 15/15] vl: Deprecate -mon pretty=... for HMP monitors Kevin Wolf
2019-06-14 9:01 ` Markus Armbruster
2019-06-14 9:13 ` Kevin Wolf
2019-06-14 11:14 ` Markus Armbruster
2019-06-13 17:31 ` [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc no-reply
2019-06-14 9:06 ` Markus Armbruster
2019-06-14 9:32 ` Kevin Wolf
2019-06-15 20:31 ` Markus Armbruster
2019-06-17 8:53 ` Kevin Wolf
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=20190613153405.24769-8-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-block@nongnu.org \
--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 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).