This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In bisect{,-runner}.pl, refactor the code for CPU probing and make jobs.
authorNicholas Clark <nick@ccl4.org>
Tue, 10 Apr 2012 08:37:41 +0000 (10:37 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 May 2013 07:19:27 +0000 (09:19 +0200)
commit0bc550ba196833e65284f8977c95b37af2e7de00
treed31e1df18ec414522d552f666c5fce86e13c1588
parentff9c1ae817f5e4013e88b98792d9dba6b0010a29
In bisect{,-runner}.pl, refactor the code for CPU probing and make jobs.

Move the code that attempts various ways to probe for the number of CPUs
from bisect-runner.pl to bisect.pl. Skip the probe entirely if a -j (--jobs)
options is passed to bisect.pl. For --jobs=0 (or -j0) entirely skip adding
-j to the make command line. (For heretical versions of make which don't use
-j for parallelism).

Previously the probe code always ran for each call to bisect-runner.pl,
which is completely redundant if bisect-runner.pl is being called for
argument validation or help text, and inefficient even when building, as the
number of CPUs rarely changes during a bisect run. Additionally there was no
way to avoid a -j in the make command line, which isn't going to fly on
systems where the make utility doesn't have a -j option.
Porting/bisect-runner.pl
Porting/bisect.pl