Philippe Mathieu-Daudé <f4...@amsat.org> 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é <f4...@amsat.org>
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.