From 06116bd15b1fb8b03e65e1166f5ddad929614246 Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sat, 14 Nov 2015 18:48:49 -0500 Subject: Fast PCH generator and optimized PCH files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ported update_pch.sh to Python with improved performance and features. The new script is invoked from the same update_pch.sh which calls it for each library in parallel, although it can be invoked directly. The ported script (update_pch) updates all PCH files in ~15 seconds where the old script took ~4500 seconds. In addition, the new script supports 3-tiered headers (system, module, and local) and is very flexible to support other improvement. It has a per-library optimal configuration settings that can be updated using another new scripts (update_pch_autotune.sh) which finds optimal per-PCH settings. PCH files have been generated using the new scripts which builds significantly faster (2-3x, depending on module and configuration) and the intermediate binaries are noticably smaller (by several GBs). The new script stamps each generated PCH file with the command that generated it to make it trivial for users to update them, and also adds the command to invoke another script (update_pch_bisect) that helps find missing headers or conflicting headers that may break the build after updating the PCH. Finally update_pch has built-in unit-tests for makefile parsing and other core functionality. Change-Id: Ib933b50e50374d7e2e7e3e95ba8799b0cc8a27fa Reviewed-on: https://gerrit.libreoffice.org/19965 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- desktop/inc/pch/precompiled_deployment.hxx | 150 +++------- desktop/inc/pch/precompiled_deploymentgui.hxx | 193 ++++++------ desktop/inc/pch/precompiled_deploymentmisc.hxx | 104 +++---- desktop/inc/pch/precompiled_sofficeapp.hxx | 390 +++++++++++++++---------- 4 files changed, 399 insertions(+), 438 deletions(-) (limited to 'desktop/inc') diff --git a/desktop/inc/pch/precompiled_deployment.hxx b/desktop/inc/pch/precompiled_deployment.hxx index 2a269e97edcf..0b60d8b60029 100644 --- a/desktop/inc/pch/precompiled_deployment.hxx +++ b/desktop/inc/pch/precompiled_deployment.hxx @@ -8,146 +8,72 @@ */ /* - This file has been autogenerated by update_pch.sh . It is possible to edit it - manually (such as when an include file has been moved/renamed/removed. All such + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). + + Generated on 2015-11-14 14:16:30 using: + ./bin/update_pch desktop deployment --cutoff=3 --exclude:system --exclude:module --exclude:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deployment.hxx "/opt/lo/bin/make desktop.build" --find-conflicts */ #include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include #include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/inc/pch/precompiled_deploymentgui.hxx b/desktop/inc/pch/precompiled_deploymentgui.hxx index 3c4ae1e19f74..23c501fa93d7 100644 --- a/desktop/inc/pch/precompiled_deploymentgui.hxx +++ b/desktop/inc/pch/precompiled_deploymentgui.hxx @@ -8,144 +8,115 @@ */ /* - This file has been autogenerated by update_pch.sh . It is possible to edit it - manually (such as when an include file has been moved/renamed/removed. All such + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). + + Generated on 2015-11-14 14:16:29 using: + ./bin/update_pch desktop deploymentgui --cutoff=3 --exclude:system --exclude:module --exclude:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deploymentgui.hxx "/opt/lo/bin/make desktop.build" --find-conflicts */ #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include #include -#include -#include -#include -#include -#include +#include #include -#include +#include #include #include #include -#include -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include +#include #include +#include #include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include +#include +#include #include #include #include #include +#include +#include #include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/inc/pch/precompiled_deploymentmisc.hxx b/desktop/inc/pch/precompiled_deploymentmisc.hxx index e6fbc1b9560d..f4ea04e80a33 100644 --- a/desktop/inc/pch/precompiled_deploymentmisc.hxx +++ b/desktop/inc/pch/precompiled_deploymentmisc.hxx @@ -8,86 +8,78 @@ */ /* - This file has been autogenerated by update_pch.sh . It is possible to edit it - manually (such as when an include file has been moved/renamed/removed. All such + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). + + Generated on 2015-11-14 14:16:31 using: + ./bin/update_pch desktop deploymentmisc --cutoff=3 --exclude:system --exclude:module --exclude:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_deploymentmisc.hxx "/opt/lo/bin/make desktop.build" --find-conflicts */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include +#include +#include +#include #include #include #include #include #include #include +#include +#include #include +#include #include #include #include +#include #include #include #include #include #include #include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/inc/pch/precompiled_sofficeapp.hxx b/desktop/inc/pch/precompiled_sofficeapp.hxx index 40dca8259e6b..3d5baa38b6a8 100644 --- a/desktop/inc/pch/precompiled_sofficeapp.hxx +++ b/desktop/inc/pch/precompiled_sofficeapp.hxx @@ -8,195 +8,267 @@ */ /* - This file has been autogenerated by update_pch.sh . It is possible to edit it - manually (such as when an include file has been moved/renamed/removed. All such + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). + + Generated on 2015-11-14 14:16:31 using: + ./bin/update_pch desktop sofficeapp --cutoff=6 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./desktop/inc/pch/precompiled_sofficeapp.hxx "/opt/lo/bin/make desktop.build" --find-conflicts */ -#include "config_folders.h" -#include "officecfg/Office/Linguistic.hxx" -#include "officecfg/Setup.hxx" -#include "officecfg/System.hxx" #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include +#include +#include #include #include +#include +#include #include +#include +#include #include +#include #include +#include #include +#include +#include #include +#include +#include #include +#include +#include #include #include +#include +#include +#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include #include +#include #include +#include #include #include +#include #include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit