From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#44674: 28.0.50; Adding current-cpu-time for performance tests
Date: Mon, 16 Nov 2020 11:48:42 +0100
Message-ID:
References:
<8EE5DC1E-5585-4585-B6E9-58717149ADA6@gnu.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="33336"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= ,
44674@debbugs.gnu.org, Stefan Monnier
To: Eli Zaretskii
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 16 11:55:55 2020
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1kecAt-0008Ug-I7
for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 11:55:55 +0100
Original-Received: from localhost ([::1]:41654 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1kecAs-0004Jt-Ke
for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 05:55:54 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36794)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1kec5C-0007t1-LZ
for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 05:50:02 -0500
Original-Received: from debbugs.gnu.org ([209.51.188.43]:43654)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1kec5C-00032C-Ay
for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 05:50:02 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1kec5C-0003hH-96
for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 05:50:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Mon, 16 Nov 2020 10:50:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 44674
X-GNU-PR-Package: emacs
Original-Received: via spool by 44674-submit@debbugs.gnu.org id=B44674.160552374614126
(code B ref 44674); Mon, 16 Nov 2020 10:50:02 +0000
Original-Received: (at 44674) by debbugs.gnu.org; 16 Nov 2020 10:49:06 +0000
Original-Received: from localhost ([127.0.0.1]:55191 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1kec4I-0003fk-7L
for submit@debbugs.gnu.org; Mon, 16 Nov 2020 05:49:06 -0500
Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:46657)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1kec4B-0003fA-Dp
for 44674@debbugs.gnu.org; Mon, 16 Nov 2020 05:49:05 -0500
Original-Received: by mail-ot1-f44.google.com with SMTP id g19so15499325otp.13
for <44674@debbugs.gnu.org>; Mon, 16 Nov 2020 02:48:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc:content-transfer-encoding;
bh=kxoCBhDRjkiuuaVO+N19ZUx9yZaHBW6tgzlzUe/bWlA=;
b=leURvgotbP6UFZo1nFW/+ZBon1tESoI5pEB2Qy0AC8DColJ1P7pHDjLVRGcu6FcI+5
4yxIoV3IYiRsz5DgFOcI7HSjzo+h8ULIz4TX+23LqhAIAfIc/ZF96HRV/yS6xL/5VJzJ
qlKPGj8XEr7RRG69BHnBzHX9N5b/lQji+t1bAB4B2DMVflcZy/GeRiZET3Ssgw69ny9u
W2Wf3rsUUhOXo86p1D0s8ybVqtMSopV4nzkzUxudESEz+VNpBMRVbSwlYSVAkec+vsHb
RIBg21ZE9E9D95ebi51tFJpOHq3YxswWqCl1ksxeblM3hDthqtuORkxCC1ugYRGNtiX/
lAYg==
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:content-transfer-encoding;
bh=kxoCBhDRjkiuuaVO+N19ZUx9yZaHBW6tgzlzUe/bWlA=;
b=ubWfgP7Y3sQ8chegdnjkR9MtvZrspztRcKXkRTNd/cZ6TOyjqjZvCp1zq6o0vGR4XX
iDlW7C1ieO4q+GVdYFiusgG/CQJUqCRdR8mEftSWIRMl38u0IPUeu0ArLBHC2UppO7q2
zqbx/Uz1gA3cwbuxBGp/dRrDy4l1qgHDFwAMOboPXdK9brhLubLcIt9eFrIgbQ9k5Pwe
UZ2gWEv/uIL6S4NtIphs2qrX3ivXxsiOYXl8XLmoFgBN/DTU4p5MWBazRBqZCi9gsUga
28DlDPpZIP1Jrf1P6xJ5dUt9eBER7yLmLIEumhv4MuyiGS/wDQiRntEHgi4O9iLoV94M
QeKw==
X-Gm-Message-State: AOAM533JE9gdDHJfRflmSC5ML7SDiwLEy22WOkWy022Bet0BgLqSxMPj
qTjXqpO7/+Ss8hoDvNO2uyU80xSc7gi8VlV+jRs=
X-Google-Smtp-Source: ABdhPJwHQZVfjkSE2iYWk+sLoS+CHflf+2wGspfee9qDdjWpaOZ07xWgoVafA+wZhLnwBa7/VYwhvqltsdiO7DAfT5o=
X-Received: by 2002:a9d:72c4:: with SMTP id d4mr10029147otk.149.1605523733602;
Mon, 16 Nov 2020 02:48:53 -0800 (PST)
In-Reply-To: <8EE5DC1E-5585-4585-B6E9-58717149ADA6@gnu.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors"
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.io gmane.emacs.bugs:193418
Archived-At:
Am Mo., 16. Nov. 2020 um 11:40 Uhr schrieb Eli Zaretskii :
>
> On November 16, 2020 12:11:34 PM GMT+02:00, "Mattias Engdeg=C3=A5rd" wrote:
> > > +The return value is a pair (CPU-TICKS . TICKS-PER-SEC).
> >
> > Perhaps not ideal to cons in a timing primitive where low overhead is
> > called for.
> > What about just returning an integer and have a different way to get
> > at TICKS-PER-SEC?
> > After all, the timer frequency is not specific to each measurement.
> >
> > Ideally the returned value should be a fixnum to minimise overhead,
> > but it may restrict the range on 32-bit platforms.
> >
> > I also agree with Phillipp's comment about clock_gettime.
>
> AFAUI, CLOCK_PROCESS_CPUTIME_ID accounts for all the threads, so might no=
t be what we want even if it is supported, since other threads might be inv=
olved which we aren't interested in (e.g., GTK threads).
clock (on GNU/Linux) is a thin wrapper around
CLOCK_PROCESS_CPUTIME_ID, see
https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dsysdeps/unix/sysv/li=
nux/clock.c;hb=3Daac0f62c47beee5b546bacc330acc2dd21cda0dc.