All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 01/13] build-sys: move qmp-introspect per target
Date: Mon, 17 Dec 2018 08:06:00 +0100	[thread overview]
Message-ID: <8736qw8wfb.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20181216140902.23986-2-marcandre.lureau@redhat.com> ("Marc-André Lureau"'s message of "Sun, 16 Dec 2018 18:08:50 +0400")

Marc-André Lureau <marcandre.lureau@redhat.com> writes:

> The following patches are going to introduce per-target #ifdef in the
> schemas.
>
> The introspection data is statically generated once, and must thus be
> built per-target to reflect target-specific configuration.
>
> Drop "do_test_visitor_in_qmp_introspect(&qmp_schema_qlit)" since the
> schema is no longer in a common object. It is covered by the per-target
> query-qmp-schema test instead.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  tests/test-qobject-input-visitor.c | 1 -
>  Makefile.objs                      | 2 --
>  Makefile.target                    | 2 ++
>  3 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c
> index caa90b3d7e..609334adf6 100644
> --- a/tests/test-qobject-input-visitor.c
> +++ b/tests/test-qobject-input-visitor.c
> @@ -1271,7 +1271,6 @@ static void test_visitor_in_qmp_introspect(TestInputVisitorData *data,
>                                             const void *unused)
>  {
>      do_test_visitor_in_qmp_introspect(data, &test_qmp_schema_qlit);
> -    do_test_visitor_in_qmp_introspect(data, &qmp_schema_qlit);
>  }
>  
>  int main(int argc, char **argv)
> diff --git a/Makefile.objs b/Makefile.objs
> index 56af0347d3..0388d5157d 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -13,7 +13,6 @@ util-obj-y += qapi/qapi-visit.o
>  util-obj-y += $(QAPI_MODULES:%=qapi/qapi-visit-%.o)
>  util-obj-y += qapi/qapi-events.o
>  util-obj-y += $(QAPI_MODULES:%=qapi/qapi-events-%.o)
> -util-obj-y += qapi/qapi-introspect.o
>  
>  chardev-obj-y = chardev/
>  
> @@ -94,7 +93,6 @@ common-obj-$(CONFIG_FDT) += device_tree.o
>  
>  common-obj-y += qapi/qapi-commands.o
>  common-obj-y += $(QAPI_MODULES:%=qapi/qapi-commands-%.o)
> -common-obj-y += qapi/qapi-introspect.o
>  common-obj-y += qmp.o hmp.o
>  endif
>  
> diff --git a/Makefile.target b/Makefile.target
> index 44ec4b630c..c882292ae1 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -156,6 +156,8 @@ endif
>  
>  GENERATED_FILES += hmp-commands.h hmp-commands-info.h
>  
> +obj-y += qapi/qapi-introspect.o
> +
>  endif # CONFIG_SOFTMMU
>  
>  dummy := $(call unnest-vars,,obj-y)

Having to compile this multiple times is a bit sad, since it's fairly
big:

$ ls -lh qapi/qapi-introspect.c
-rw-rw-r--. 1 armbru armbru 518K Dec 17 07:56 qapi/qapi-introspect.c
$ size x86_64-softmmu/qapi/qapi-introspect.o
   text	   data	    bss	    dec	    hex	filename
  16302	 289472	     48	 305822	  4aa9e	x86_64-softmmu/qapi/qapi-introspect.o

To compile its target-independent part just once, we'd have to split it
up.  May or may not improve compile time.  We can figure it out when
compiling all of it multiple times bother us.

Reviewed-by: Markus Armbruster <armbru@redhat.com>

  reply	other threads:[~2018-12-17  7:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-16 14:08 [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3) Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 01/13] build-sys: move qmp-introspect per target Marc-André Lureau
2018-12-17  7:06   ` Markus Armbruster [this message]
2018-12-16 14:08 ` [Qemu-devel] [PATCH 02/13] qapi-commands: don't initialize command list in qmp_init_marshall() Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 03/13] qapi-commands: rename init_marshal() to register_commands() Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 04/13] RFC: qapi: learn to split the schema by 'top-unit' Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 05/13] qapi: add a top-unit 'target' schema Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 06/13] qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386 Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 07/13] qapi: make s390 commands depend on TARGET_S390X Marc-André Lureau
2018-12-18 18:00   ` Markus Armbruster
2018-12-16 14:08 ` [Qemu-devel] [PATCH 08/13] target.json: add a note about query-cpu* not being s390x-specific Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 09/13] qapi: make query-gic-capabilities depend on TARGET_ARM Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 10/13] qapi: make query-cpu-model-expansion depend on s390 or x86 Marc-André Lureau
2018-12-18 12:35   ` Markus Armbruster
2018-12-16 14:09 ` [Qemu-devel] [PATCH 11/13] qapi: make query-cpu-definitions depend on specific targets Marc-André Lureau
2018-12-18 18:01   ` Markus Armbruster
2018-12-16 14:09 ` [Qemu-devel] [PATCH 12/13] qapi: remove qmp_unregister_command() Marc-André Lureau
2018-12-16 14:09 ` [Qemu-devel] [PATCH 13/13] qapi: move RTC_CHANGE to the target schema Marc-André Lureau
2018-12-18 18:19 ` [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3) Markus Armbruster

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=8736qw8wfb.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --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 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.