[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 03/29] qapi: Split error.json off common.json
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v4 03/29] qapi: Split error.json off common.json |
Date: |
Mon, 12 Aug 2019 07:23:33 +0200 |
In my "build everything" tree, changing a type in qapi/common.json
triggers a recompile of some 3600 out of 6600 objects (not counting
tests and objects that don't depend on qemu/osdep.h).
One common dependency is QapiErrorClass: it's used only in in
qapi/error.h, which uses nothing else, and is widely included.
Move QapiErrorClass from common.json to new error.json. Touching
common.json now recompiles only some 2900 objects.
Cc: Eric Blake <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
---
qapi/common.json | 24 ------------------------
qapi/error.json | 29 +++++++++++++++++++++++++++++
qapi/qapi-schema.json | 1 +
include/qapi/error.h | 2 +-
MAINTAINERS | 2 ++
qapi/Makefile.objs | 2 +-
6 files changed, 34 insertions(+), 26 deletions(-)
create mode 100644 qapi/error.json
diff --git a/qapi/common.json b/qapi/common.json
index 99d313ef3b..3d4e8de1e0 100644
--- a/qapi/common.json
+++ b/qapi/common.json
@@ -4,30 +4,6 @@
# = Common data types
##
-##
-# @QapiErrorClass:
-#
-# QEMU error classes
-#
-# @GenericError: this is used for errors that don't require a specific error
-# class. This should be the default case for most errors
-#
-# @CommandNotFound: the requested command has not been found
-#
-# @DeviceNotActive: a device has failed to be become active
-#
-# @DeviceNotFound: the requested device has not been found
-#
-# @KVMMissingCap: the requested operation can't be fulfilled because a
-# required KVM capability is missing
-#
-# Since: 1.2
-##
-{ 'enum': 'QapiErrorClass',
- # Keep this in sync with ErrorClass in error.h
- 'data': [ 'GenericError', 'CommandNotFound',
- 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
-
##
# @IoOperationType:
#
diff --git a/qapi/error.json b/qapi/error.json
new file mode 100644
index 0000000000..3fad08f506
--- /dev/null
+++ b/qapi/error.json
@@ -0,0 +1,29 @@
+# -*- Mode: Python -*-
+
+##
+# = QMP errors
+##
+
+##
+# @QapiErrorClass:
+#
+# QEMU error classes
+#
+# @GenericError: this is used for errors that don't require a specific error
+# class. This should be the default case for most errors
+#
+# @CommandNotFound: the requested command has not been found
+#
+# @DeviceNotActive: a device has failed to be become active
+#
+# @DeviceNotFound: the requested device has not been found
+#
+# @KVMMissingCap: the requested operation can't be fulfilled because a
+# required KVM capability is missing
+#
+# Since: 1.2
+##
+{ 'enum': 'QapiErrorClass',
+ # Keep this in sync with ErrorClass in error.h
+ 'data': [ 'GenericError', 'CommandNotFound',
+ 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json
index 38af54d6b3..920b03b0aa 100644
--- a/qapi/qapi-schema.json
+++ b/qapi/qapi-schema.json
@@ -80,6 +80,7 @@
# stable order, it's best to include each sub-schema just once, or
# include it first right here.
+{ 'include': 'error.json' }
{ 'include': 'common.json' }
{ 'include': 'sockets.json' }
{ 'include': 'run-state.json' }
diff --git a/include/qapi/error.h b/include/qapi/error.h
index 51b63dd4b5..3f95141a01 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -119,7 +119,7 @@
#ifndef ERROR_H
#define ERROR_H
-#include "qapi/qapi-types-common.h"
+#include "qapi/qapi-types-error.h"
/*
* Overall category of an error.
diff --git a/MAINTAINERS b/MAINTAINERS
index d6de200453..adc64cfe33 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1874,6 +1874,7 @@ M: Markus Armbruster <address@hidden>
S: Supported
F: include/qapi/error.h
F: include/qemu/error-report.h
+F: qapi/error.json
F: util/error.c
F: util/qemu-error.c
@@ -2062,6 +2063,7 @@ F: monitor/monitor-internal.h
F: monitor/qmp*
F: monitor/misc.c
F: monitor/monitor.c
+F: qapi/error.json
F: docs/devel/*qmp-*
F: docs/interop/*qmp-*
F: scripts/qmp/
diff --git a/qapi/Makefile.objs b/qapi/Makefile.objs
index c5a29e86e2..dd3f5e6f94 100644
--- a/qapi/Makefile.objs
+++ b/qapi/Makefile.objs
@@ -6,7 +6,7 @@ util-obj-y += qmp-event.o
util-obj-y += qapi-util.o
QAPI_COMMON_MODULES = audio authz block-core block char common crypto
-QAPI_COMMON_MODULES += dump introspect job machine migration misc net
+QAPI_COMMON_MODULES += dump error introspect job machine migration misc net
QAPI_COMMON_MODULES += qdev qom rdma rocker run-state sockets tpm
QAPI_COMMON_MODULES += trace transaction ui
QAPI_TARGET_MODULES = machine-target misc-target
--
2.21.0
- [Qemu-devel] [PATCH v4 11/29] typedefs: Separate incomplete types and function types, (continued)
[Qemu-devel] [PATCH v4 02/29] Include generated QAPI headers less, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 06/29] trace: Eliminate use of TARGET_FMT_plx, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 13/29] Clean up inclusion of exec/cpu-common.h, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 05/29] queue: Drop superfluous #include qemu/atomic.h, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 03/29] qapi: Split error.json off common.json,
Markus Armbruster <=
[Qemu-devel] [PATCH v4 14/29] migration: Move the VMStateDescription typedef to typedefs.h, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 10/29] ide: Include hw/ide/internal a bit less outside hw/ide/, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 09/29] Include migration/qemu-file-types.h a lot less, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 17/29] Include qom/object.h slightly less, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 25/29] numa: Move remaining NUMA declarations from sysemu.h to numa.h, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 23/29] numa: Don't include hw/boards.h into sysemu/numa.h, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 24/29] Include sysemu/hostmem.h less, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 19/29] Include qemu/queue.h slightly less, Markus Armbruster, 2019/08/12
[Qemu-devel] [PATCH v4 28/29] sysemu: Move the VMChangeStateEntry typedef to qemu/typedefs.h, Markus Armbruster, 2019/08/12