From: Frank Ch. Eigler Date: Mon, 10 Oct 2011 13:36:48 +0000 (-0400) Subject: PR13155 prep: move kbuild make -j parallelism to general code X-Git-Tag: release-1.7~151^2~88 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=70fb16aa696d94d2687596c1cbc9691c0477050f;p=systemtap.git PR13155 prep: move kbuild make -j parallelism to general code * buildrun.cxx (run_make_cmd): Do it here, to cover all make invocations, (make_tracequeries) ... instead of here. --- diff --git a/buildrun.cxx b/buildrun.cxx index b33d3b5cd..c7fdf501e 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -65,14 +65,10 @@ run_make_cmd(systemtap_session& s, vector& make_cmd, make_cmd.push_back("--no-print-directory"); } - // NB: there appears to be no parallelism opportunity in the - // module-building makefiles, so while the following works, it - // doesn't seem to accomplish anything measurable as of F13. -#if 0 + // Exploit SMP parallelism, if available. long smp = sysconf(_SC_NPROCESSORS_ONLN); - if (smp > 1) - make_cmd.push_back("-j" + lex_cast(smp)); -#endif + if (smp >= 1) + make_cmd.push_back("-j" + lex_cast(smp+1)); if (strverscmp (s.kernel_base_release.c_str(), "2.6.29") < 0) { @@ -620,10 +616,6 @@ make_tracequeries(systemtap_session& s, const map& contents) // make the module vector make_cmd = make_make_objs_cmd(s, dir); make_cmd.push_back ("-i"); // ignore errors, give rc 0 even in case of tracepoint header nits - // parallelize the make job, since we have lots of little modules to build - long smp = sysconf(_SC_NPROCESSORS_ONLN); - if (smp >= 1) - make_cmd.push_back("-j" + lex_cast(smp+1)); bool quiet = (s.verbose < 4); int rc = run_make_cmd(s, make_cmd, quiet, quiet); if (rc)