From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 62EF21F8C6 for ; Mon, 9 Aug 2021 13:01:37 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 856E33851C33 for ; Mon, 9 Aug 2021 13:01:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 856E33851C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628514096; bh=iyVZjbqjCxMA2QIyFVaVwRAO0zSat4WVFXysAsNd+X8=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=E7FQkbQIc1TuUz3J7db+2jJDFnpittkUU1QaDMDIpLCyOCNVyXKuTkyDA5bF3eBEl Pcoj7dWPWxrkOjNmXJuPbYfzV5QJhpvA9YrVwOKkbtb86Q/u71oimmhK+lDf39nSdC SzIXvrKATR/cFiQ+joXEX60JkIDnadYoL9ilb6CE= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 7C769385482F for ; Mon, 9 Aug 2021 13:01:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7C769385482F Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-580-vHpj3Ya3MyypKUqI1B5Ilw-1; Mon, 09 Aug 2021 09:01:15 -0400 X-MC-Unique: vHpj3Ya3MyypKUqI1B5Ilw-1 Received: by mail-qv1-f72.google.com with SMTP id a2-20020a0562141302b02903303839b843so12218853qvv.13 for ; Mon, 09 Aug 2021 06:01:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=iyVZjbqjCxMA2QIyFVaVwRAO0zSat4WVFXysAsNd+X8=; b=ZgNBurX+54jTmdd6visdxref6JjJgHeh2uF+EgwLOgF4krY9DUs2JWKtBAhY+3aW40 Ac3yeXk7KawhIsd6QQSqlXVMZXk3Z1UYPHdrlmwoMVZZtIRul+PV+0zzM0K//ezrB82S rkTetWDbgLDLhcuzxFs/X/gb5eTLl92C2C28kF+Dy1Aks2eh08hDYN4PiO1Pepcgak2k EqQuI5xHOnvPp4d8wKOXYEXg56lK3k8XyTxkcI7dsj2LvBowIr0vhEzxSHcGElap95Cp 0EbenT2NtMYnM8PYBri+WHUEfzpibMLta4nntGqkbeU/5idI5OqhgLmCMLf7vOKZI6I2 NsgQ== X-Gm-Message-State: AOAM530bbjmT3D0jnUeME05UVHB4mH2TLTbHl/H/gXWEx4cEyhct+4Dp hlBCYjhIfyzEI1r6UVgs1w8MCdzLv7y2VeJ7cmi5jXrEpE2SZkbtnaqjKx01GtVZ62sPNfkpweo OGkDh27KOFATpUp2ocNXf9/zthw602m7AcCTOX7vNRytO1C4nt/U9O7E1ZgMxCiKSOgx10A== X-Received: by 2002:ac8:7dcb:: with SMTP id c11mr20418549qte.260.1628514074351; Mon, 09 Aug 2021 06:01:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIu59eUOYEaM/L5dDiTcW0TwKU0WqLQxnq4nzUBvt82cbap4O6Be416S/bZOYMXD9HBd04TQ== X-Received: by 2002:ac8:7dcb:: with SMTP id c11mr20418515qte.260.1628514074054; Mon, 09 Aug 2021 06:01:14 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id o27sm8872123qkk.124.2021.08.09.06.01.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 06:01:13 -0700 (PDT) Subject: Re: [PATCH] benchtests: Building benchmarks as static executables To: "H.J. Lu" , libc-alpha@sourceware.org References: <20210730212204.1832487-1-hjl.tools@gmail.com> Organization: Red Hat Message-ID: <0eca8e9c-630d-842e-2e3f-d6ed3f6fa29e@redhat.com> Date: Mon, 9 Aug 2021 09:01:12 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210730212204.1832487-1-hjl.tools@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/30/21 5:22 PM, H.J. Lu via Libc-alpha wrote: > Building benchmarks as static executables: > ========================================= > > To build benchmarks as static executables, on the build system, run: > > $ make STATIC-BENCHTESTS=yes bench-build > > You can copy benchmark executables to another machine and run them > without copying the source nor build directories. Looking forward to a v2. Fails to build for i686 with binutils 2.35, the README should mention architecture and minimum binutils required. Looks good on x86_64 which has has this feature for longer. > --- > benchtests/Makefile | 26 +++++++++++++++++++------- > benchtests/README | 10 ++++++++++ > 2 files changed, 29 insertions(+), 7 deletions(-) > > diff --git a/benchtests/Makefile b/benchtests/Makefile > index 1530939a8c..4fcd73131a 100644 > --- a/benchtests/Makefile > +++ b/benchtests/Makefile > @@ -110,11 +110,23 @@ else > bench-malloc := $(filter malloc-%,${BENCHSET}) > endif > > -$(addprefix $(objpfx)bench-,$(bench-math)): $(libm) > -$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm) > -$(addprefix $(objpfx)bench-,$(bench-pthread)): $(shared-thread-library) > -$(addprefix $(objpfx)bench-,$(bench-malloc)): $(shared-thread-library) > -$(addprefix $(objpfx)bench-,pthread-locks): $(libm) > +ifeq (${STATIC-BENCHTESTS},yes) > ++link-benchtests = $(+link-static-tests) > +link-libc-benchtests = $(link-libc-static) > +libm-benchtests = $(common-objpfx)math/libm.a > +thread-library-benchtests = $(static-thread-library) > +else > +link-libc-benchtests = $(link-libc) > ++link-benchtests = $(+link-tests) > +thread-library-benchtests = $(shared-thread-library) > +libm-benchtests = $(libm) > +endif > + > +$(addprefix $(objpfx)bench-,$(bench-math)): $(libm-benchtests) > +$(addprefix $(objpfx)bench-,$(math-benchset)): $(libm-benchtests) > +$(addprefix $(objpfx)bench-,$(bench-pthread)): $(thread-library-benchtests) > +$(addprefix $(objpfx)bench-,$(bench-malloc)): $(thread-library-benchtests) > +$(addprefix $(objpfx)bench-,pthread-locks): $(libm-benchtests) > > > > @@ -270,9 +282,9 @@ bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \ > > $(bench-link-targets): %: %.o $(objpfx)json-lib.o \ > $(link-extra-libs-tests) \ > - $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ > + $(sort $(filter $(common-objpfx)lib%,$(link-libc-benchtests))) \ > $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) > - $(+link-tests) > + $(+link-benchtests) > > $(bench-link-targets): LDFLAGS += $(link-bench-bind-now) > > diff --git a/benchtests/README b/benchtests/README > index 44736d7e63..4d83a05b4b 100644 > --- a/benchtests/README > +++ b/benchtests/README > @@ -62,6 +62,16 @@ otherwise the above command may try to build the benchmark again. Benchmarks > that require generated code to be executed during the build are skipped when > cross-building. > > +Building benchmarks as static executables: > +========================================= > + > +To build benchmarks as static executables, on the build system, run: > + > + $ make STATIC-BENCHTESTS=yes bench-build > + > +You can copy benchmark executables to another machine and run them > +without copying the source nor build directories. > + > Running subsets of benchmarks: > ============================== > > -- Cheers, Carlos.