All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/1] user-mode: Prune build dependencies (part 3)
@ 2020-10-02  7:36 Philippe Mathieu-Daudé
  2020-10-02  7:36 ` [PATCH v4 1/1] qapi: Restrict code generated for user-mode Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-02  7:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Michael Roth, Markus Armbruster, Paolo Bonzini,
	Philippe Mathieu-Daudé,
	Richard Henderson

This is the third part of a series reducing user-mode
dependencies. By stripping out unused code, the build
and testing time is reduced (as is space used by objects).

Part 3:
- Reduce user-mode QAPI generated files

Since v3:
- Keep qdev.json in user-mode (no need for qdev-system
  stub for qapi_event_send_device_deleted, Paolo)
- Keep machine.json in user-mode (no need to restrict
  X86CPUFeatureWord to x86 architecture, Eduardo)

Since v2:
- Fixed UuidInfo placed in incorrect json
- Rebased on Meson
- Include X86CPUFeatureWord unmerged from part 2

Since v1:
- Addressed Richard and Paolo review comments

v3: https://www.mail-archive.com/qemu-devel@nongnu.org/msg746423.html
v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg688879.html
v1: https://www.mail-archive.com/qemu-devel@nongnu.org/msg688486.html

Based on https://github.com/ehabkost/qemu.git machine-next

Philippe Mathieu-Daudé (1):
  qapi: Restrict code generated for user-mode

 qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 15 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v4 1/1] qapi: Restrict code generated for user-mode
  2020-10-02  7:36 [PATCH v4 0/1] user-mode: Prune build dependencies (part 3) Philippe Mathieu-Daudé
@ 2020-10-02  7:36 ` Philippe Mathieu-Daudé
  2020-10-02  8:50   ` Paolo Bonzini
  2020-10-02  9:16   ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-02  7:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eduardo Habkost, Michael Roth, Markus Armbruster, Paolo Bonzini,
	Philippe Mathieu-Daudé,
	Richard Henderson

A lot of QAPI generated code is never used by user-mode.

Split out qapi_system_modules and qapi_system_or_tools_modules
from the qapi_all_modules array. We now have 4 groups:
- always used
- only used by system-mode
- not used by user-mode
- not used by tools

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 36 insertions(+), 15 deletions(-)

diff --git a/qapi/meson.build b/qapi/meson.build
index 7c4a89a882..10cf01ef65 100644
--- a/qapi/meson.build
+++ b/qapi/meson.build
@@ -14,39 +14,60 @@ util_ss.add(files(
 ))
 
 qapi_all_modules = [
+  'common',
+  'introspect',
+  'misc',
+]
+
+qapi_system_modules = [
   'acpi',
   'audio',
+  'dump',
+  'machine-target',
+  'migration',
+  'misc-target',
+  'net',
+  'pci',
+  'rdma',
+  'rocker',
+  'tpm',
+  'trace',
+]
+
+qapi_system_or_user_modules = [
+  'machine', # X86CPUFeatureWordInfo
+  'qdev',
+]
+
+qapi_system_or_tools_modules = [
   'authz',
   'block-core',
   'block',
   'char',
-  'common',
   'control',
   'crypto',
-  'dump',
   'error',
-  'introspect',
   'job',
-  'machine',
-  'machine-target',
-  'migration',
-  'misc',
-  'misc-target',
-  'net',
   'pragma',
-  'qdev',
-  'pci',
   'qom',
-  'rdma',
-  'rocker',
   'run-state',
   'sockets',
-  'tpm',
-  'trace',
   'transaction',
   'ui',
 ]
 
+if have_system
+  qapi_all_modules += qapi_system_modules
+endif
+
+if have_system or have_user
+  qapi_all_modules += qapi_system_or_user_modules
+endif
+
+if have_system or have_tools
+  qapi_all_modules += qapi_system_or_tools_modules
+endif
+
 qapi_storage_daemon_modules = [
   'block-core',
   'char',
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/1] qapi: Restrict code generated for user-mode
  2020-10-02  7:36 ` [PATCH v4 1/1] qapi: Restrict code generated for user-mode Philippe Mathieu-Daudé
@ 2020-10-02  8:50   ` Paolo Bonzini
  2020-10-02  9:16   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2020-10-02  8:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Michael Roth, Markus Armbruster, Eduardo Habkost, Richard Henderson

On 02/10/20 09:36, Philippe Mathieu-Daudé wrote:
> A lot of QAPI generated code is never used by user-mode.
> 
> Split out qapi_system_modules and qapi_system_or_tools_modules
> from the qapi_all_modules array. We now have 4 groups:
> - always used
> - only used by system-mode
> - not used by user-mode
> - not used by tools
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 36 insertions(+), 15 deletions(-)
> 
> diff --git a/qapi/meson.build b/qapi/meson.build
> index 7c4a89a882..10cf01ef65 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -14,39 +14,60 @@ util_ss.add(files(
>  ))
>  
>  qapi_all_modules = [
> +  'common',
> +  'introspect',
> +  'misc',
> +]
> +
> +qapi_system_modules = [
>    'acpi',
>    'audio',
> +  'dump',
> +  'machine-target',
> +  'migration',
> +  'misc-target',
> +  'net',
> +  'pci',
> +  'rdma',
> +  'rocker',
> +  'tpm',
> +  'trace',
> +]
> +
> +qapi_system_or_user_modules = [
> +  'machine', # X86CPUFeatureWordInfo
> +  'qdev',
> +]
> +
> +qapi_system_or_tools_modules = [
>    'authz',
>    'block-core',
>    'block',
>    'char',
> -  'common',
>    'control',
>    'crypto',
> -  'dump',
>    'error',
> -  'introspect',
>    'job',
> -  'machine',
> -  'machine-target',
> -  'migration',
> -  'misc',
> -  'misc-target',
> -  'net',
>    'pragma',
> -  'qdev',
> -  'pci',
>    'qom',
> -  'rdma',
> -  'rocker',
>    'run-state',
>    'sockets',
> -  'tpm',
> -  'trace',
>    'transaction',
>    'ui',
>  ]
>  
> +if have_system
> +  qapi_all_modules += qapi_system_modules
> +endif
> +
> +if have_system or have_user
> +  qapi_all_modules += qapi_system_or_user_modules
> +endif
> +
> +if have_system or have_tools
> +  qapi_all_modules += qapi_system_or_tools_modules
> +endif
> +
>  qapi_storage_daemon_modules = [
>    'block-core',
>    'char',
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4 1/1] qapi: Restrict code generated for user-mode
  2020-10-02  7:36 ` [PATCH v4 1/1] qapi: Restrict code generated for user-mode Philippe Mathieu-Daudé
  2020-10-02  8:50   ` Paolo Bonzini
@ 2020-10-02  9:16   ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-02  9:16 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael Roth, Paolo Bonzini, Markus Armbruster, Eduardo Habkost,
	Richard Henderson

On 10/2/20 9:36 AM, Philippe Mathieu-Daudé wrote:
> A lot of QAPI generated code is never used by user-mode.
> 
> Split out qapi_system_modules and qapi_system_or_tools_modules
> from the qapi_all_modules array. We now have 4 groups:
> - always used
> - only used by system-mode
> - not used by user-mode
> - not used by tools
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  qapi/meson.build | 51 ++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 36 insertions(+), 15 deletions(-)
> 
> diff --git a/qapi/meson.build b/qapi/meson.build
> index 7c4a89a882..10cf01ef65 100644
> --- a/qapi/meson.build
> +++ b/qapi/meson.build
> @@ -14,39 +14,60 @@ util_ss.add(files(
>  ))
>  
>  qapi_all_modules = [
> +  'common',
> +  'introspect',
> +  'misc',
> +]
> +
> +qapi_system_modules = [
>    'acpi',
>    'audio',
> +  'dump',
> +  'machine-target',
> +  'migration',
> +  'misc-target',
> +  'net',
> +  'pci',
> +  'rdma',
> +  'rocker',
> +  'tpm',
> +  'trace',
> +]
> +
> +qapi_system_or_user_modules = [
> +  'machine', # X86CPUFeatureWordInfo
> +  'qdev',

I forgot the justification for this one:

     'qdev', # DEVICE_DELETED

> +]
> +
> +qapi_system_or_tools_modules = [
>    'authz',
>    'block-core',
>    'block',
>    'char',
> -  'common',
>    'control',
>    'crypto',
> -  'dump',
>    'error',
> -  'introspect',
>    'job',
> -  'machine',
> -  'machine-target',
> -  'migration',
> -  'misc',
> -  'misc-target',
> -  'net',
>    'pragma',
> -  'qdev',
> -  'pci',
>    'qom',
> -  'rdma',
> -  'rocker',
>    'run-state',
>    'sockets',
> -  'tpm',
> -  'trace',
>    'transaction',
>    'ui',
>  ]
>  
> +if have_system
> +  qapi_all_modules += qapi_system_modules
> +endif
> +
> +if have_system or have_user
> +  qapi_all_modules += qapi_system_or_user_modules
> +endif
> +
> +if have_system or have_tools
> +  qapi_all_modules += qapi_system_or_tools_modules
> +endif
> +
>  qapi_storage_daemon_modules = [
>    'block-core',
>    'char',
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-02  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02  7:36 [PATCH v4 0/1] user-mode: Prune build dependencies (part 3) Philippe Mathieu-Daudé
2020-10-02  7:36 ` [PATCH v4 1/1] qapi: Restrict code generated for user-mode Philippe Mathieu-Daudé
2020-10-02  8:50   ` Paolo Bonzini
2020-10-02  9:16   ` Philippe Mathieu-Daudé

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.