From c2651d5beed520313f26c4401b2ec723db9c8a50 Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Mon, 23 Nov 2020 16:16:11 +0000 Subject: [PATCH] kbuild: Speed up ksym_dep_filter This commit reduces the input that tr and sed need to consider to a few lines and so makes the extraction of ksyms faster. On my machine at least, builds are greatly slowed down by tr. A single invocation of sed might be fast too but seems non-trivial. Bug: 174773617 Change-Id: I98698ff8603d816c55d4922ccb5936364b5fd906 Signed-off-by: Giuliano Procida Signed-off-by: Cyber Knight Signed-off-by: Richard Raya --- scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 1200bc44a195..da123690cf77 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -358,7 +358,7 @@ ksym_dep_filter = \ $(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \ boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \ *) echo "Don't know how to preprocess $(1)" >&2; false ;; \ - esac | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' + esac | fgrep '=== __KSYM_' | tr ";" "\n" | sed -rn 's/^.*=== __KSYM_(.*) ===.*$$/KSYM_\1/p' cmd_and_fixdep = \ $(echo-cmd) $(cmd_$(1)); \