]> sourceware.org Git - systemtap.git/commitdiff
PR13155 prep: move kbuild make -j parallelism to general code
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 10 Oct 2011 13:36:48 +0000 (09:36 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 13 Oct 2011 18:06:57 +0000 (14:06 -0400)
* buildrun.cxx (run_make_cmd): Do it here, to cover all make invocations,
  (make_tracequeries) ... instead of here.

buildrun.cxx

index b33d3b5cd068b10384521ef4216987dcce85268d..c7fdf501e3e643917cbcde991f5b3fa3092f0e03 100644 (file)
@@ -65,14 +65,10 @@ run_make_cmd(systemtap_session& s, vector<string>& 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<string,string>& contents)
   // make the module
   vector<string> 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)
This page took 0.031034 seconds and 5 git commands to generate.