Skip to content
Snippets Groups Projects
  1. Aug 21, 2019
  2. Aug 16, 2019
    • Markus Armbruster's avatar
      sysemu: Split sysemu/runstate.h off sysemu/sysemu.h · 54d31236
      Markus Armbruster authored
      
      sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
      to the system-emulator.  Evidence:
      
      * It's included widely: in my "build everything" tree, changing
        sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
        objects (not counting tests and objects that don't depend on
        qemu/osdep.h, down from 5400 due to the previous two commits).
      
      * It pulls in more than a dozen additional headers.
      
      Split stuff related to run state management into its own header
      sysemu/runstate.h.
      
      Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
      also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
      to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.
      
      Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
      add qemu/main-loop.h.
      
      Suggested-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <20190812052359.30071-30-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      [Unbreak OS-X build]
      54d31236
    • Markus Armbruster's avatar
      Clean up inclusion of sysemu/sysemu.h · d5938f29
      Markus Armbruster authored
      
      In my "build everything" tree, changing sysemu/sysemu.h triggers a
      recompile of some 5400 out of 6600 objects (not counting tests and
      objects that don't depend on qemu/osdep.h).
      
      Almost a third of its inclusions are actually superfluous.  Delete
      them.  Downgrade two more to qapi/qapi-types-run-state.h, and move one
      from char/serial.h to char/serial.c.
      
      hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and
      stubs/semihost.c define variables declared in sysemu/sysemu.h without
      including it.  The compiler is cool with that, but include it anyway.
      
      This doesn't reduce actual use much, as it's still included into
      widely included headers.  The next commit will tackle that.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-27-armbru@redhat.com>
      Reviewed-by: default avatarAlex Bennée <alex.bennee@linaro.org>
      d5938f29
    • Markus Armbruster's avatar
      Include hw/boards.h a bit less · 12e9493d
      Markus Armbruster authored
      
      hw/boards.h pulls in almost 60 headers.  The less we include it into
      headers, the better.  As a first step, drop superfluous inclusions,
      and downgrade some more to what's actually needed.  Gets rid of just
      one inclusion into a header.
      
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-23-armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      12e9493d
    • Markus Armbruster's avatar
      Include hw/hw.h exactly where needed · 650d103d
      Markus Armbruster authored
      
      In my "build everything" tree, changing hw/hw.h triggers a recompile
      of some 2600 out of 6600 objects (not counting tests and objects that
      don't depend on qemu/osdep.h).
      
      The previous commits have left only the declaration of hw_error() in
      hw/hw.h.  This permits dropping most of its inclusions.  Touching it
      now recompiles less than 200 objects.
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarAlistair Francis <alistair.francis@wdc.com>
      Message-Id: <20190812052359.30071-19-armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      650d103d
    • Markus Armbruster's avatar
      Include generated QAPI headers less · 2ae16a6a
      Markus Armbruster authored
      
      Some of the generated qapi-types-MODULE.h are included all over the
      place.  Changing a QAPI type can trigger massive recompiling.  Top
      scorers recompile more than 1000 out of some 6600 objects (not
      counting tests and objects that don't depend on qemu/osdep.h):
      
          6300 qapi/qapi-builtin-types.h
          5700 qapi/qapi-types-run-state.h
          3900 qapi/qapi-types-common.h
          3300 qapi/qapi-types-sockets.h
          3000 qapi/qapi-types-misc.h
          3000 qapi/qapi-types-crypto.h
          3000 qapi/qapi-types-job.h
          3000 qapi/qapi-types-block-core.h
          2800 qapi/qapi-types-block.h
          1300 qapi/qapi-types-net.h
      
      Clean up headers to include generated QAPI headers only where needed.
      Impact is negligible except for hw/qdev-properties.h.
      
      This header includes qapi/qapi-types-block.h and
      qapi/qapi-types-misc.h.  They are used only in expansions of property
      definition macros such as DEFINE_PROP_BLOCKDEV_ON_ERROR() and
      DEFINE_PROP_OFF_AUTO().  Moving their inclusion from
      hw/qdev-properties.h to the users of these macros avoids pointless
      recompiles.  This is how other property definition macros, such as
      DEFINE_PROP_NETDEV(), already work.
      
      Improves things for some of the top scorers:
      
          3600 qapi/qapi-types-common.h
          2800 qapi/qapi-types-sockets.h
           900 qapi/qapi-types-misc.h
          2200 qapi/qapi-types-crypto.h
          2100 qapi/qapi-types-job.h
          2100 qapi/qapi-types-block-core.h
           270 qapi/qapi-types-block.h
      
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Tested-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <20190812052359.30071-3-armbru@redhat.com>
      2ae16a6a
  3. Aug 14, 2019
  4. Jul 15, 2019
  5. Jul 04, 2019
  6. Jul 02, 2019
  7. Jun 18, 2019
  8. Jun 17, 2019
Loading