qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 00/18] Clean up includes to reduce compile time


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 00/18] Clean up includes to reduce compile time
Date: Wed, 31 Jan 2018 09:31:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Philippe Mathieu-Daudé <address@hidden> writes:

> On 01/30/2018 07:21 AM, Markus Armbruster wrote:
>> We have awfully many "touch it, recompile the world" headers.  Right
>> now, I count about fifty that are prerequisites of more than half the
>> objects in my "build everything" tree.
>> 
>> Some of them are that way by necessity.  Many of them are not.  This
>> series takes care of six I happen to touch, because serve as their
>> maintainer:
>> 
>>     include/qapi/qmp/qdict.h
>>     include/qapi/qmp/qlist.h
>>     include/qapi/qmp/qnull.h
>>     include/qapi/qmp/qnum.h
>>     include/qapi/qmp/qobject.h
>>     include/qemu/option.h
>> 
>> Before this series, touching any of these recompiles more than 95% of
>> my objects.  That's more than 4500 compiler runs.  After this series,
>> only 0.3% - 8% of my objects get recompiled.
>
> nice cleanup :)
>
> No more comment than what Eric said (mostly newlines),
> and Zoltan regarding <qemu/osdep.h>, so
> Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

Thanks!

> Is there a way to check if an header got used or not?
> (thinking about a patchew check to not add headers until effectively used).

The only one I know is "drop the include and see whether it still
compiles".  Would be nice if the compiler could report superfluous
headers.

For a header, "compiles" means a .c file containing just two includes
(qemu/osdep.h and the header) compiles.  Many of our headers don't.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]