From 10dda57d5c6412570f80c117e1edf60e334bb3e6 Mon Sep 17 00:00:00 2001 From: Sultan Alsawaf Date: Wed, 27 Apr 2022 18:59:53 -0700 Subject: [PATCH] buildrun.cxx: skip objtool processing for tracequery and typequery modules The tracequery and typequery modules are never loaded, so objtool's instruction rewrites for things like jump targets aren't needed. Since objtool is slow and uses a lot of memory, skip it when compiling the tracequery and typequery modules. --- buildrun.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/buildrun.cxx b/buildrun.cxx index 492f6bc47..b1e94ce34 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -1049,6 +1049,8 @@ make_tracequeries(systemtap_session& s, const map& contents) omf << "CONFIG_MODULE_SIG := n" << endl; // PR23488: need to override this kconfig, else we get no useful struct decls omf << "CONFIG_DEBUG_INFO_REDUCED := " << endl; + // objtool is slow and uses a lot of memory, skip it since these modules aren't loaded + omf << "CONFIG_STACK_VALIDATION := " << endl; // PR18389: disable GCC's Identical Code Folding, since the stubs may look identical omf << "EXTRA_CFLAGS += $(call cc-option,-fno-ipa-icf)" << endl; @@ -1128,6 +1130,9 @@ make_typequery_kmod(systemtap_session& s, const vector& headers, string& // PR23488: need to override this kconfig, else we get no useful struct decls omf << "CONFIG_DEBUG_INFO_REDUCED := " << endl; + + // objtool is slow and uses a lot of memory, skip it since these modules aren't loaded + omf << "CONFIG_STACK_VALIDATION := " << endl; // NB: We use -include instead of #include because that gives us more power. // Using #include searches relative to the source's path, which in this case -- 2.43.5