All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] include: Trim some fat from osdep.h
@ 2022-02-08 20:08 Peter Maydell
  2022-02-08 20:08 ` [PATCH 1/5] include: Move qemu_madvise() and related #defines to new qemu/madvise.h Peter Maydell
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Peter Maydell @ 2022-02-08 20:08 UTC (permalink / raw)
  To: qemu-devel

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



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

end of thread, other threads:[~2022-02-18 12:20 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-08 20:08 [PATCH 0/5] include: Trim some fat from osdep.h Peter Maydell
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

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.