Michael S. Tsirkin <m...@redhat.com> writes: > On Wed, Apr 08, 2015 at 03:54:45PM +0100, Alex Bennée wrote: >> > diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c >> > index 8d01959..fefe7c7 100644 >> > --- a/hw/acpi/aml-build.c >> > +++ b/hw/acpi/aml-build.c >> > @@ -505,6 +505,28 @@ Aml *aml_call4(const char *method, Aml *arg1, Aml >> > *arg2, Aml *arg3, Aml *arg4) >> > return var; >> > } >> > >> > +/* >> > + * ACPI 1.0: 6.4.3.4 Memory32Fixed (Memory Resource Descriptor Macro) >> > + */ >> > +Aml *aml_memory32_fixed(uint64_t addr, uint64_t size, uint8_t rw_flag) >> > +{ >> > + Aml *var = aml_alloc(); >> >> This is more aimed at the ACPI maintainers but I wonder if there should >> be an aml_alloc_sized that pre-allocates the GArray? Otherwise we spend >> a lot of time realloc'ing while building these entries up. Or even a >> varidac build_append_bytes? > > Can you show measureable VM boot speedup from this? > If not, it's not worth bothering with.
Fair enough, this is a start-up thing and I guess you could probably only measure a difference in a highly targeted pathaological test case. -- Alex Bennée