From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by sourceware.org (Postfix) with ESMTPS id 62CEA3857025 for ; Mon, 28 Jun 2021 14:47:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 62CEA3857025 Received: by mail-pj1-x102a.google.com with SMTP id g24so10298483pji.4 for ; Mon, 28 Jun 2021 07:47:03 -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:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PTOI6Xj/s17R0aS3N671Z0/bUif2X/rZ/r0I59itJhI=; b=d3JJ+9EXEo1Ovuorb79nR3ofmkiGm6/81Y2K/L2QqexEvadDc9BChmf642lhDBo6tY ayjXPpijT8rpViOHQRHB2k0SBLMdxvL63lsjIrelvSvyiLeZYMmrzuwP/hec/2FVRtGy cKxaN8j59m39ZEktZ5EbWaX+/wtFPADDcDcfBTMxebxNA8thVO1ru7o/Ws+KlSpsB2YK b5zYelfBXh4xerBpbpnKNjXLZT63swHKHHu7TNLBDTNOaNYNYFGmX+btEk7GIlRTPCdz uC83lDmZ1ZM/bMyHTQti3HkEJx0sUOMSvRojlz3jSceWi7jd2D8ks+ApWm42PNZCxo34 DrzA== X-Gm-Message-State: AOAM532nr/3El7EjUpw56h4QqM9GLT6w48qB7sWHNwgJ1BWOPxKK6rmx bWzeVfVwxPSVXx+79hl871yL7zSMvIVnQw== X-Google-Smtp-Source: ABdhPJyPIyBCNRl0cEzui8xfbwiSgUK4CFTtKuRxaG2SB859yaGMaDt42amqb1ymfGXnI+n8hvooXg== X-Received: by 2002:a17:902:d88b:b029:128:cd59:ead2 with SMTP id b11-20020a170902d88bb0290128cd59ead2mr8394961plz.27.1624891622232; Mon, 28 Jun 2021 07:47:02 -0700 (PDT) Received: from [192.168.1.108] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id r10sm15469506pga.48.2021.06.28.07.47.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Jun 2021 07:47:01 -0700 (PDT) Subject: Re: [PATCH] AArch64: Add hp-timing.h To: Wilco Dijkstra Cc: Wilco Dijkstra via Libc-alpha References: <87pmw6uw73.fsf@oldenburg.str.redhat.com> <87h7hiuu3d.fsf@oldenburg.str.redhat.com> <20210628114927.GM13058@arm.com> From: Adhemerval Zanella Message-ID: <70c5dbe8-3e6c-5831-6f79-550e15356074@linaro.org> Date: Mon, 28 Jun 2021 11:46:59 -0300 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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 28 Jun 2021 14:47:05 -0000 On 28/06/2021 11:24, Wilco Dijkstra wrote: > Hi Adhemerval, > >> Any particular reason why you haven't enabled HP_TIMING_INLINE to 1? > > Well, what exactly is it used for? I've never quite understood the reasoning behind > hp-timing. It seems to me it just slows down ld.so with extra timing calls which are > unused 100% of the time. So I don't see a reason to enable it on AArch64. However > with the header in place, it's easy to set it to 1 and rebuild if needed. It is used for LD_DEBUG=statistics to give better profiling numbers (theoretically). However, the profiling is still measured in some parts even LD_DEBUG is not set unfortunately. It assumes that reading the clock is as fast as one instructions, that why it is only enabled for HP_TIMING_INLINE. Not sure if it is worth to enable on aarch64 indeed.