summaryrefslogtreecommitdiff
path: root/scripts/Makefile
diff options
context:
space:
mode:
authorShile Zhang <shile.zhang@linux.alibaba.com>2019-12-04 03:46:32 +0300
committerIngo Molnar <mingo@kernel.org>2019-12-13 12:47:58 +0300
commit57fa1899428538e314a7e0d52a5b617af082389a (patch)
tree37d89c675d2f149bbf51961f45c68752c7929c34 /scripts/Makefile
parent1091670637be8bd34a39dd1ddcc0a10a7c88d4e2 (diff)
downloadlinux-57fa1899428538e314a7e0d52a5b617af082389a.tar.xz
scripts/sorttable: Implement build-time ORC unwind table sorting
The ORC unwinder has two tables: .orc_unwind_ip and .orc_unwind, which need to be sorted for binary search. Previously this sorting was done during bootup. Sort them at build time to speed up booting. Add the ORC tables sorting in a parallel build process to speed up the build. [ mingo: Rewrote the changelog and fixed some comments. ] Suggested-by: Andy Lutomirski <luto@amacapital.net> Suggested-by: Peter Zijlstra <peterz@infradead.org> Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Shile Zhang <shile.zhang@linux.alibaba.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Michal Marek <michal.lkml@markovi.net> Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-7-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/Makefile')
-rw-r--r--scripts/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 7491241e3a0d..b0e962611d50 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -24,6 +24,15 @@ HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
HOSTLDLIBS_sign-file = -lcrypto
HOSTLDLIBS_extract-cert = -lcrypto
+ifdef CONFIG_UNWINDER_ORC
+ifeq ($(ARCH),x86_64)
+ARCH := x86
+endif
+HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
+HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
+HOSTLDLIBS_sorttable = -lpthread
+endif
+
always := $(hostprogs-y) $(hostprogs-m)
# The following hostprogs-y programs are only build on demand