All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PATCH 0/5] include: Trim some fat from osdep.h
Date: Tue,  8 Feb 2022 20:08:51 +0000	[thread overview]
Message-ID: <20220208200856.3558249-1-peter.maydell@linaro.org> (raw)

The osdep.h header is included by every C file we compile, so it helps
build times to keep it small. (As the comment at the top of the file
notes, in an ideal world this header would contain only things that
everybody needs and things where we need to apply a compatibility
workaround on some hosts.) This series trims more than 130 lines from
osdep.h (about 16% of its current size) by splitting some prototypes
that are used only in a few files out into new headers that are
included by those source files that need them.

(Looking at the size of osdep.h itself is not really the right metric,
because the real killer for compile time is going to be all the
system headers it pulls in; but it's easier to measure and looks
better for this series :-))

There's scope for more of this, I think, but there's no need to try to
do everything in one huge patchset.

thanks
-- PMM

Peter Maydell (5):
  include: Move qemu_madvise() and related #defines to new
    qemu/madvise.h
  include: Move qemu_mprotect_*() to new qemu/mprotect.h
  include: Move QEMU_MAP_* constants to mmap-alloc.h
  include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h
  include: Move hardware version declarations to new qemu/hw-version.h

 include/qemu/cacheinfo.h   |  21 ++++++
 include/qemu/hw-version.h  |  27 ++++++++
 include/qemu/madvise.h     |  95 ++++++++++++++++++++++++++
 include/qemu/mmap-alloc.h  |  23 +++++++
 include/qemu/mprotect.h    |  14 ++++
 include/qemu/osdep.h       | 132 -------------------------------------
 accel/tcg/translate-all.c  |   1 +
 backends/hostmem-file.c    |   1 +
 backends/hostmem.c         |   1 +
 hw/arm/nseries.c           |   1 +
 hw/ide/core.c              |   1 +
 hw/scsi/megasas.c          |   1 +
 hw/scsi/scsi-bus.c         |   1 +
 hw/scsi/scsi-disk.c        |   1 +
 hw/virtio/virtio-balloon.c |   1 +
 migration/postcopy-ram.c   |   1 +
 migration/qemu-file.c      |   1 +
 migration/ram.c            |   1 +
 plugins/loader.c           |   1 +
 softmmu/physmem.c          |   1 +
 softmmu/vl.c               |   1 +
 target/i386/cpu.c          |   1 +
 target/s390x/cpu_models.c  |   1 +
 tcg/region.c               |   3 +
 tcg/tcg.c                  |   1 +
 util/atomic64.c            |   1 +
 util/cacheflush.c          |   1 +
 util/cacheinfo.c           |   1 +
 util/osdep.c               |   3 +
 util/oslib-posix.c         |   1 +
 30 files changed, 208 insertions(+), 132 deletions(-)
 create mode 100644 include/qemu/cacheinfo.h
 create mode 100644 include/qemu/hw-version.h
 create mode 100644 include/qemu/madvise.h
 create mode 100644 include/qemu/mprotect.h

-- 
2.25.1



             reply	other threads:[~2022-02-08 21:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 20:08 Peter Maydell [this message]
2022-02-08 20:08 ` [PATCH 1/5] include: Move qemu_madvise() and related #defines to new qemu/madvise.h Peter Maydell
2022-02-08 23:01   ` Richard Henderson
2022-02-08 20:08 ` [PATCH 2/5] include: Move qemu_mprotect_*() to new qemu/mprotect.h Peter Maydell
2022-02-08 23:02   ` Richard Henderson
2022-02-08 20:08 ` [PATCH 3/5] include: Move QEMU_MAP_* constants to mmap-alloc.h Peter Maydell
2022-02-08 23:03   ` Richard Henderson
2022-02-08 20:08 ` [PATCH 4/5] include: Move qemu_[id]cache_* declarations to new qemu/cacheinfo.h Peter Maydell
2022-02-08 23:04   ` Richard Henderson
2022-02-08 20:08 ` [PATCH 5/5] include: Move hardware version declarations to new qemu/hw-version.h Peter Maydell
2022-02-08 23:06   ` Richard Henderson
2022-02-09  9:20   ` Philippe Mathieu-Daudé via
2022-02-09  9:25     ` Peter Maydell
2022-02-09 10:10       ` Philippe Mathieu-Daudé via
2022-02-09 13:44         ` Peter Maydell
2022-02-09  9:21 ` [PATCH 0/5] include: Trim some fat from osdep.h Philippe Mathieu-Daudé via
2022-02-18 12:18 ` Peter Maydell

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=20220208200856.3558249-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.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 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.