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: AS17314 8.43.84.0/22 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, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (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 ADC2C1F8C6 for ; Mon, 9 Aug 2021 14:20:35 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D47403896809 for ; Mon, 9 Aug 2021 14:20:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D47403896809 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628518834; bh=/xzjI9V/LyPg0G4XGPgSf7VwnirEwRyFa/9yLFlNgkA=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=yqIUhKrLNmaadqQoMTOnrsgMCu1Ym5iOl8WE0ttHHbjsigdFaAJzu1RUNb/Ou+ZeS prX6ptZQ6aee9SJStCcv+76Lh56FgKpyp15rfZcIpXgt6qrcOLdvlpUaV5cDcD0tuL KWfSKRPhVl/AJ6LJUcL0HyuJp7ml1+Fr1AVTE+XY= Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 945DF3896815 for ; Mon, 9 Aug 2021 14:18:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 945DF3896815 Received: by mail-pl1-x631.google.com with SMTP id e19so2948740pla.10 for ; Mon, 09 Aug 2021 07:18:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/xzjI9V/LyPg0G4XGPgSf7VwnirEwRyFa/9yLFlNgkA=; b=iWI/5+VTtAzMuU2bLRCsjdim5xdfg/waIP5wlJiu6sGh08MrGOZJBceRwPymLtlc7c gK1/HfpGQ9l/cGirEfPLKOsbfidGTkINKA41B2yVD+Hg7iFXpo1bGNiuY/sWRkeBBm5g QYyIvgYuoGb8fbcJmE/LtEI+an7qVvtB+kwlY6x73rpXAfFXa0Ryq2XpwErCqCF6mu+q Ib/AxpAIjcc97e0gv7xhiNmMEfe2tS8j6IxkSGWp7pgN3IN6UaMKrtHHI5bF/QL3o2Kq zVsGx9juzgd25XapVumzvqglfkAYh09/Zvf85UEM6cB+0mQZWmM0eZVNgso5jQ9DMDVO a5lg== X-Gm-Message-State: AOAM531O+bti+VYNSkDB6y5rsLfjvLDNtRmvQUvE9OMipiEY7orCWT+m tlz72To+A41XciZG6jhEmGZEXUkO6YmKI6sm6ms= X-Google-Smtp-Source: ABdhPJzWn6GOda8Ld2gzEjZeYKOWgCBMLU4OwFD5/9v+xzaLCp/Au0+haDm8HDj8p1JlIn9Xb6cIBuWvi64/NnaCCyY= X-Received: by 2002:a05:6a00:2490:b029:3bb:2cb3:25dc with SMTP id c16-20020a056a002490b02903bb2cb325dcmr18736932pfv.48.1628518735724; Mon, 09 Aug 2021 07:18:55 -0700 (PDT) MIME-Version: 1.0 References: <20210730212204.1832487-1-hjl.tools@gmail.com> <0eca8e9c-630d-842e-2e3f-d6ed3f6fa29e@redhat.com> In-Reply-To: <0eca8e9c-630d-842e-2e3f-d6ed3f6fa29e@redhat.com> Date: Mon, 9 Aug 2021 07:18:19 -0700 Message-ID: Subject: Re: [PATCH] benchtests: Building benchmarks as static executables To: "Carlos O'Donell" Content-Type: text/plain; charset="UTF-8" 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: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: GNU C Library Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Mon, Aug 9, 2021 at 6:01 AM Carlos O'Donell wrote: > > 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. I sent out the v2 patch with On i686, there is no multiarch memove in libc.a, don't include multiarch memove in ifunc-impl-list.c in libc.a. > 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. > Thanks. -- H.J.