diff options
author | Etienne Champetier <champetier.etienne@gmail.com> | 2018-04-30 12:55:12 -0700 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-05-07 10:31:35 +0200 |
commit | ff6e62b288cab103f9dd4200b49ec6dc47375eb8 (patch) | |
tree | 5cee24e8f70e0c8aaaeb28001f220c8a3f6cbbbe /include/subdir.mk | |
parent | f87dff8f72097bd1f63b4921055060271eae977c (diff) | |
download | upstream-ff6e62b288cab103f9dd4200b49ec6dc47375eb8.tar.gz upstream-ff6e62b288cab103f9dd4200b49ec6dc47375eb8.tar.bz2 upstream-ff6e62b288cab103f9dd4200b49ec6dc47375eb8.zip |
build: log time taken by each packages/steps
The idea is to easily get the list of packages taking the most time to build,
and see if we can improve them
v1: Use SetupHostCommand as recommended by John
v2: add space after 'time:', remove useless /usr/bin/time from SetupHostCommand
Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
Diffstat (limited to 'include/subdir.mk')
-rw-r--r-- | include/subdir.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/subdir.mk b/include/subdir.mk index 79a80528ae..ed4f7537d5 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -43,6 +43,7 @@ log_make = \ $(if $(BUILD_LOG), \ set -o pipefail; \ mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ + gtime -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \ $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2).txt) |