From patchwork Sat Dec 31 15:40:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 18739 Received: (qmail 115722 invoked by alias); 31 Dec 2016 15:41:08 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 115635 invoked by uid 89); 31 Dec 2016 15:41:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.1 required=5.0 tests=AWL, BAYES_99, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=no version=3.3.2 spammy=addprefix, sk:CPPFLAG, sk:cppflag, __name X-HELO: homiemail-a119.g.dreamhost.com From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Cc: fweimer@redhat.com, carlos@redhat.com Subject: [PATCH 3/4] Enhance --enable-tunables to select tunables frontend at build time Date: Sat, 31 Dec 2016 21:10:30 +0530 Message-Id: <1483198831-2232-4-git-send-email-siddhesh@sourceware.org> In-Reply-To: <1483198831-2232-1-git-send-email-siddhesh@sourceware.org> References: <1483198831-2232-1-git-send-email-siddhesh@sourceware.org> At the GNU Tools Cauldron 2016, the state of the current tunables patchset was considered OK with the addition of a way to select the frontend to be used for the tunables. That is, to avoid being locked in to one type of frontend initially, it should be possible to build tunables with a different frontend with something as simple as a configure switch. To that effect, this patch enhances the --enable-tunables option to accept more values than just 'yes' or 'no'. The current frontend (and default when enable-tunables is 'yes') is called 'valstring', to select the frontend where a single environment variable is set to a colon-separated value string. More such frontends can be added in future. * Makeconfig (have-tunables): Check for non-negative instead of positive. * configure.ac: Add 'valstring' as a valid value for --enable-tunables. * configure: Regenerate. * elf/Makefile (have-tunables): Check for non-negative instead of positive. (CPPFLAGS-dl-tunables.c): Define TUNABLES_FRONTEND for dl-tunables.c. * elf/dl-tunables.c (GLIBC_TUNABLES): Define only when TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring. (tunables_strdup): Likewise. (disable_tunables): Likewise. (parse_tunables): Likewise. (__tunables_init): Process GLIBC_TUNABLES envvar only when. TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring. * elf/dl-tunables.h (TUNABLES_FRONTEND_valstring): New macro. (TUNABLES_FRONTEND_yes): New macro, define as TUNABLES_FRONTEND_valstring by default. * manual/install.texi: Document new acceptable values for --enable-tunables. * INSTALL: Regenerate. --- INSTALL | 18 +++++++++++++++++- Makeconfig | 4 ++-- configure | 3 ++- configure.ac | 2 +- elf/Makefile | 4 +++- elf/dl-tunables.c | 12 +++++++++++- elf/dl-tunables.h | 4 ++++ manual/install.texi | 17 ++++++++++++++++- 8 files changed, 56 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index 25619fc..55d52c5 100644 --- a/INSTALL +++ b/INSTALL @@ -172,7 +172,23 @@ will be used, and CFLAGS sets optimization options for the compiler. '--enable-tunables' Tunables support allows additional library parameters to be customized at runtime. This is an experimental feature and affects - startup time and is thus disabled by default. + startup time and is thus disabled by default. This option can take + the following values: + + 'no' + This is the default if the option is not passed to configure. + This disables tunables. + + 'yes' + This is the default if the option is passed to configure. + This enables tunables and selects the default frontend + (currently 'valstring'). + + 'valstring' + This enables tunables and selects the 'valstring' frontend for + tunables. This frontend allows users to specify tunables as a + colon-separated list in a single environment variable + 'GLIBC_TUNABLES'. '--build=BUILD-SYSTEM' '--host=HOST-SYSTEM' diff --git a/Makeconfig b/Makeconfig index b173e4c..1a2db6d 100644 --- a/Makeconfig +++ b/Makeconfig @@ -935,7 +935,7 @@ CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \ $(libof-$(