]> git.ipfire.org Git - thirdparty/automake.git/commit
[ng] automake: remove support for threaded execution
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Jul 2012 20:14:59 +0000 (22:14 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 31 Jul 2012 02:39:18 +0000 (04:39 +0200)
commitc0012b0230754ce6d1d42c2e85d9787bf5bd9e30
treea0fb0654402d12d1cf787fe4d5becf53f82cd6d2
parent53b5d112dcdad674b5ea4a85b9ce2401b1023291
[ng] automake: remove support for threaded execution

Why are we removing such a nice feature, especially in a world where
multicore systems are becoming the norm?

First, that feature adds a lot of complexity to the Automake script,
which might get in the way of future refactorings.  And the Automake-NG
fork is about refactorings and cleanups at least as much as about new
features and better GNU make integration.

Also, the performance enhancements offered by threaded Automake seem
to be fairly limited:
<http://lists.gnu.org/archive/html/automake/2009-11/msg00004.html>
albeit admittedly not excessively so:
<http://www.open-mpi.org/community/lists/devel/2010/09/8524.php>

In addition, we should really be pushing peoples towards non-recursive
build systems -- refer to Peter Miller's article "Recursive Make
Considered Harmful" <http://miller.emu.id.au/pmiller/books/rmch/>.
In such a non-recursive setup, there is just just one 'Makefile.am',
and thus little point in trying to launch a thread for each
'Makefile.am'.

In the end, however, the consideration that tipped the balance in favor
of this change is that we want to reach a point, during the yet-to-come
maturity of Automake-NG, where the 'automake' script will be just a thin
layer around the provided helper scripts and makefile fragments (with
maybe a *small* smattering of preprocessing), as well as around autom4te
(for the proper parsing of configure.ac).  At such a point, a threaded
execution would bring no real benefit.

* NG-NEWS: Update.
* doc/automake-ng.texi, NG-NEWS: Likewise.
* configure.ac: Don't check for 'ithreads' support in perl.
Drop AC_SUBST 'PERL_THREADS'.
* bootstrap.sh (PERL_THREADS): Don't define.
(dosubst): Don't substitute it.
* lib/Automake/Config.in ($perl_threads): Define no more.
(@EXPORT): Drop it.
* aclocal.in ($perl_threads): Remove, no more needed.
* automake.in (BEGIN) [$perl_threads]: Don't require nor import
the 'threads' and 'Thread::Queue' modules.
(QUEUE_MESSAGE, QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
Delete constants.
($required_conf_file_queue): Delete variable.
($nthreads): Likewise, and thus ...
(get_number_of_threads): ... delete this function, whose only
purpose was to initialize that variable.
(handle_makefiles_serial): Delete, its body inlined in the main
code.
(require_file_internal): Don't take the '$QUEUE' argument, nor
handle threading/serialization calling back ...
(queue_required_file_check_or_copy): ... this function, which
has thus been removed.
(require_libsource_with_macro): Adjust 'require_file_internal'
call to new signature.
(require_conf_file): Likewise, in the process dropping any
handling of threading/serialization.
(handle_makefiles_threaded): This is no more called anywhere,
so delete it, together with ...
(require_queued_file_check_or_copy): ... this, which has in
that its only caller.
* lib/Automake/Location.pm (serialize, deserialize): Delete
as unused.
* lib/Automake/Channels.pm (setup_channel_queue,
pop_channel_queue): Likewise.
(@EXPORT): Adjust.
(BEGIN) [$perl_threads]: Don't require nor import 'threads'.
(%_default_options): Remove 'ordered', 'queue' and 'queue_key'
keys, that were only required for serialization during threaded
Automake.
(_merge_options, _print_message): No need to handle those
options.
Adjust creation of channels 'automake', 'verb' and 'fatal'.
(_enqueue, _dequeue): Delete as unused.
(msg): Adjust a comment.
(verb): Don't try to display informations about the current
thread.
* lib/Automake/DisjConditions.pm (CLONE): Delete, no more
needed.
* t/ax/am-test-lib.sh (require_tool): Drop handing of
requirement 'perl-threads'; it is not used by any test now.
* t/parallel-am.sh: Remove as obsolete.
* t/parallel-am2.sh: Likewise.
* t/parallel-am3.sh: Likewise.
* t/pm/Condition-t.pl: Likewise.
* t/pm/DisjConditions-t.pl: Likewise.
* t/werror3.sh: Don't test with AUTOMAKE_JOBS=2.
* Makefile.am (check-coverage-run, recheck-coverage-run): Don't
export 'WANT_NO_THREADS' to "yes", nor unset 'AUTOMAKE_JOBS'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
19 files changed:
Makefile.am
NG-NEWS
aclocal.in
automake.in
bootstrap.sh
configure.ac
doc/automake-ng.texi
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/Config.in
lib/Automake/DisjConditions.pm
lib/Automake/Location.pm
t/ax/am-test-lib.sh
t/parallel-am.sh [deleted file]
t/parallel-am2.sh [deleted file]
t/parallel-am3.sh [deleted file]
t/pm/Condition-t.pl [deleted file]
t/pm/DisjConditions-t.pl [deleted file]
t/werror3.sh