From patchwork Fri Dec 30 04:08:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 18727 Received: (qmail 75035 invoked by alias); 30 Dec 2016 04:09:43 -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 74445 invoked by uid 89); 30 Dec 2016 04:09:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL autolearn=no version=3.3.2 spammy=addprefix, sk:CPPFLAG, sk:cppflag, no X-HELO: homiemail-a47.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: Fri, 30 Dec 2016 09:38:57 +0530 Message-Id: <1483070938-2308-4-git-send-email-siddhesh@sourceware.org> In-Reply-To: <1483070938-2308-1-git-send-email-siddhesh@sourceware.org> References: <1483070938-2308-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 | 15 ++++++++++++++- Makeconfig | 4 ++-- configure | 3 ++- configure.ac | 2 +- elf/Makefile | 4 +++- elf/dl-tunables.c | 12 +++++++++++- elf/dl-tunables.h | 4 ++++ manual/install.texi | 18 +++++++++++++++++- 8 files changed, 54 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index 25619fc..b023b38 100644 --- a/INSTALL +++ b/INSTALL @@ -172,7 +172,20 @@ 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-$(