From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cluster-e.mailcontrol.com (cluster-e.mailcontrol.com [85.115.58.190]) by sourceware.org (Postfix) with ESMTPS id 35BD03858023 for ; Thu, 29 Jul 2021 08:30:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 35BD03858023 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=EMEA.NEC.COM Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=EMEA.NEC.COM Received: from mail2.neceur.com (mail2.neceur.com [195.47.207.4]) by rly66e.srv.mailcontrol.com (MailControl) with ESMTPS id 16T8TpmU046684 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 29 Jul 2021 09:29:52 +0100 Received: from intmail1.neceur.com (intmail1.neceur.com [172.29.14.11]) by mail2.neceur.com (8.15.2/8.15.2/SUSE Linux 0.8) with ESMTP id 16T8Tp0m000441; Thu, 29 Jul 2021 09:29:51 +0100 Received: from av2.neceur.com (av2.neceur.com [172.29.177.7]) by intmail1.neceur.com (8.14.7/8.14.7) with ESMTP id 16T8Tpsx019914; Thu, 29 Jul 2021 09:29:51 +0100 Received: from av2.neceur.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A69C2CA051; Thu, 29 Jul 2021 09:29:51 +0100 (BST) Received: from av2.neceur.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9BEA9CA050; Thu, 29 Jul 2021 09:29:51 +0100 (BST) Received: from EUX13SRV1.EU.NEC.COM (unknown [172.29.155.138]) by av2.neceur.com (Postfix) with ESMTPS; Thu, 29 Jul 2021 09:29:51 +0100 (BST) Received: from EUX13SRV2.EU.NEC.COM (172.29.155.139) by EUX13SRV1.EU.NEC.COM (172.29.155.138) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 29 Jul 2021 09:29:50 +0100 Received: from EUX13SRV2.EU.NEC.COM ([172.29.155.139]) by EUX13SRV2.EU.NEC.COM ([172.29.155.139]) with mapi id 15.00.1497.015; Thu, 29 Jul 2021 09:29:51 +0100 From: Christian Weiss To: Florian Weimer CC: "libc-help@sourceware.org" , Felix Uhl Subject: RE: Runtime discrepancy clock_gettime + funcition instrumentation Thread-Topic: Runtime discrepancy clock_gettime + funcition instrumentation Thread-Index: AQHXhFKhiVjHeyDJSciWrhGLYZ+sTatZnrxw Date: Thu, 29 Jul 2021 08:29:50 +0000 Message-ID: <627a16f6a80a4cb8b1f0e35f7f4daf34@EUX13SRV2.EU.NEC.COM> References: <5175db58f09c413b9c652d5dc45a2248@EUX13SRV2.EU.NEC.COM> <87fsvx60f0.fsf@oldenburg.str.redhat.com> <87zgu54jkx.fsf@oldenburg.str.redhat.com> In-Reply-To: <87zgu54jkx.fsf@oldenburg.str.redhat.com> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.29.208.56] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSVA-9.1.0.1600-8.1.0.1054-22232.006 X-TMASE-Version: IMSVA-9.1.0.1600-8.1.1054-22232.006 X-TMASE-Result: 10--4.906400-10.000000 X-TMASE-MatchedRID: y/2oPz6gbviYLyCLOSg+w6wOh3D3JSTGtfZHDDhfIFeeLRPBGqw/vq0R omhWPJaQQXWtCNKybvNJxuUhgdCPvsFOqnV4Q/VErSAIWhdbeu8S12tj9Zvd88xA+XwuUQ4a8gv cSKVCSkLYOVIP8QXmW4P3Ll5LaBN18oWuLhK0Tf1vv0X3ufpm/AvxMaV6x4s89cojdQgVnk15Ka rcUrnN8Px9dzl/NPYIruy+9QdyNSmlPP6xdBMHMB3EEAbn+GRbsuIso71Vk6IG2yXKuUsCoqT0m Bz7aSTNFwWA3v10tFZ77384BTKUT/s6AFvEdeZfytPf0+gM21Z9LQinZ4QefBziNLWewPgd+gtH j7OwNO1J4MCrOTno52+pHcbe7hgHStBKVL/eYP2aXN8EGLU5ENLhCrpXiBVAvCd0nM96i3uYeQ1 p/cfPidJgGQzpgI41uy6Eax2WHwGwLpbdWkR2V08jxvONzeaafEwSr4v8H0fxemJbhO7ZfXY3xa LhyFvDwL6SxPpr1/I= X-TMASE-SNAP-Result: 1.811037.0001-0-1-12:0,22:0,34:0,39:0-0 X-MailControl-OutInfo: MTYyNzU0NzM5NDpGUEtleTEucHJpdjqxvHgPAyEM6I8T6rw72XvkS7Qmor7OI9dPFH+SdsOS2xtY7KZCELQv0WwGRio44cawGWAN1jR93mp9EdR8aV4pacnfKg5+7X3d+OLo77CaQcXek+SDzwunlKFKR7KYwWoPQLmhSVNTyYCK5/Z3mAoSMoaLCh2eB//FcOoPw6onRve2i0GzasfqgLQa1B57qAbO9r6UrN3m0FUwkWZBuS6gCxa+xz4kkL/keGmnv4W3QDbIlUbJ+Wh2y38oByQhiOhvMxE+Dsn4JnpjafOsKyUnnBxjMBc/EaSBTzVQxW/64tmpKpWCV+EjkDOGN3TE0uh+tVRYFQx5rRKl+YOhFNba X-Scanned-By: MailControl 44278.2116 (www.mailcontrol.com) on 10.69.0.176 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2021 08:30:02 -0000 Dear Florian, I checked on a newer Ubuntu system with libc version 2.33. There, I can con= firm that vdso is used and that the static binary is in fact faster. Thanks= for your helping out.=20 -----Original Message----- From: Florian Weimer [mailto:fweimer@redhat.com]=20 Sent: 29 July 2021 10:21 To: Christian Weiss Cc: libc-help@sourceware.org; Felix Uhl Subject: Re: Runtime discrepancy clock_gettime + funcition instrumentation * Christian Weiss: > Dear Florian, > > Thank you for the quick reply. As far as I understand, I can check if vds= o is used by using strace on the binary. Doing so I get: > > ```[cweiss@amd022 overhead]$ strace ./test_time_static_gcc.x 1 2>&1 |=20 > grep -i clock_gettime clock_gettime(CLOCK_MONOTONIC, {tv_sec=3D89045,=20 > tv_nsec=3D95268751}) =3D 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=3D89145= ,=20 > tv_nsec=3D95813405}) =3D 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=3D89145= ,=20 > tv_nsec=3D95863144}) =3D 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=3D89145= ,=20 > tv_nsec=3D95933573}) =3D 0 > [cweiss@amd022 overhead]$ strace ./test_time_dyn_gcc.x 1 2>&1 | grep=20 > -i clock_gettime``` > > Am I right that this implies that vdso is not used in the static=20 > binary, but in the dynamic one? Is there a way to activate it in the=20 > static case or do I just have to live with that? Later glibc versions support vDSO in static binaries. glibc 2.17 as used b= y Red Hat Enterprise Linux 7 apparently does not. (Your observations match= my recollections, but I haven't double-checked them.) Thanks, Florian Click https://www.mailcontrol.com/sr/ElFnKpgQyXHGX2PQPOmvUvSoGVaHHSWC2I85I= s1gHgcdotMno4NXaggvmnOoSt8fTms2r1hgqRnVvyfHqPLkZg=3D=3D to report this ema= il as spam.