qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH  v1 0/4] de-macrofy softmmu
@ 2018-12-17 15:01 Alex Bennée
  2018-12-17 15:01 ` [Qemu-devel] [PATCH v1 1/4] accel/tcg: export some cputlb functions Alex Bennée
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Alex Bennée @ 2018-12-17 15:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: cota, Alex Bennée

Hi,

This is a re-based re-spin of my RFC series with a few minor updates
thanks to updates to the softmmu code. The series is attempting to
achieve the same results we did with softfloat by replacing our nest of
macro expansions with some common helpers. By using __flatten__ to force
the whole function to be un-rolled the compiler can then dead-code away
parts of the common function not used in each particular instantiated
helper.

This is a win from a debugging point of view - no more "where is
helper_le_lduw_mmu defined" questions. I think it will also make
eventual instrumentation easier because there is exactly one slow path
load and store function to instrument.

Although the individual functions are now bigger (__flatten__ stops the
compiler ignoring inline if it wants to) the size of the resulting
binary is slightly smaller!

original - 73027224 bytes demacro - 66913848 bytes

Unfortunately in my simple boot test I see a slight performance
degradation:

original: 10 times (100.00%), avg time 5.358 (0.02 varience/0.13
deviation) demacro: 10 times (100.00%), avg time 5.760 (0.08
varience/0.29 deviation)

Emilio,

Any chance you could run this through your more comprehensive benchmark
suite?

Alex Bennée (4):
  accel/tcg: export some cputlb functions
  accel/tcg: introduce softmmu.c
  accel/tcg: use TLB helpers from softmmu.o
  accel/tcg: remove softmmu_template.h

 accel/tcg/Makefile.objs      |   1 +
 accel/tcg/cputlb.c           |  63 +----
 accel/tcg/cputlb.h           |  21 ++
 accel/tcg/softmmu.c          | 452 +++++++++++++++++++++++++++++++++++
 accel/tcg/softmmu_template.h | 446 ----------------------------------
 5 files changed, 485 insertions(+), 498 deletions(-)
 create mode 100644 accel/tcg/cputlb.h
 create mode 100644 accel/tcg/softmmu.c
 delete mode 100644 accel/tcg/softmmu_template.h

-- 
2.17.1

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

end of thread, other threads:[~2018-12-24  5:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-17 15:01 [Qemu-devel] [PATCH v1 0/4] de-macrofy softmmu Alex Bennée
2018-12-17 15:01 ` [Qemu-devel] [PATCH v1 1/4] accel/tcg: export some cputlb functions Alex Bennée
2018-12-17 15:01 ` [Qemu-devel] [PATCH v1 2/4] accel/tcg: introduce softmmu.c Alex Bennée
2018-12-17 15:01 ` [Qemu-devel] [PATCH v1 3/4] accel/tcg: use TLB helpers from softmmu.o Alex Bennée
2018-12-17 15:01 ` [Qemu-devel] [PATCH v1 4/4] accel/tcg: remove softmmu_template.h Alex Bennée
2018-12-17 16:15 ` [Qemu-devel] [PATCH v1 0/4] de-macrofy softmmu Alex Bennée
2018-12-17 17:29   ` Alex Bennée
2018-12-17 17:33   ` Emilio G. Cota
2018-12-24  5:21 ` no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).