From: Christian Weiss <Christian.Weiss@EMEA.NEC.COM>
To: Florian Weimer <fweimer@redhat.com>
Cc: "libc-help@sourceware.org" <libc-help@sourceware.org>,
Felix Uhl <Felix.Uhl@EMEA.NEC.COM>
Subject: RE: Runtime discrepancy clock_gettime + funcition instrumentation
Date: Thu, 29 Jul 2021 08:29:50 +0000 [thread overview]
Message-ID: <627a16f6a80a4cb8b1f0e35f7f4daf34@EUX13SRV2.EU.NEC.COM> (raw)
In-Reply-To: <87zgu54jkx.fsf@oldenburg.str.redhat.com>
Dear Florian,
I checked on a newer Ubuntu system with libc version 2.33. There, I can confirm that vdso is used and that the static binary is in fact faster. Thanks for your helping out.
-----Original Message-----
From: Florian Weimer [mailto:fweimer@redhat.com]
Sent: 29 July 2021 10:21
To: Christian Weiss <Christian.Weiss@EMEA.NEC.COM>
Cc: libc-help@sourceware.org; Felix Uhl <Felix.Uhl@EMEA.NEC.COM>
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 vdso is used by using strace on the binary. Doing so I get:
>
> ```[cweiss@amd022 overhead]$ strace ./test_time_static_gcc.x 1 2>&1 |
> grep -i clock_gettime clock_gettime(CLOCK_MONOTONIC, {tv_sec=89045,
> tv_nsec=95268751}) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=89145,
> tv_nsec=95813405}) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=89145,
> tv_nsec=95863144}) = 0 clock_gettime(CLOCK_MONOTONIC, {tv_sec=89145,
> tv_nsec=95933573}) = 0
> [cweiss@amd022 overhead]$ strace ./test_time_dyn_gcc.x 1 2>&1 | grep
> -i clock_gettime```
>
> Am I right that this implies that vdso is not used in the static
> binary, but in the dynamic one? Is there a way to activate it in the
> static case or do I just have to live with that?
Later glibc versions support vDSO in static binaries. glibc 2.17 as used by 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/ElFnKpgQyXHGX2PQPOmvUvSoGVaHHSWC2I85Is1gHgcdotMno4NXaggvmnOoSt8fTms2r1hgqRnVvyfHqPLkZg== to report this email as spam.
prev parent reply other threads:[~2021-07-29 8:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-29 7:26 Christian Weiss
2021-07-29 7:31 ` Florian Weimer
2021-07-29 8:18 ` Christian Weiss
2021-07-29 8:20 ` Florian Weimer
2021-07-29 8:29 ` Christian Weiss [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=627a16f6a80a4cb8b1f0e35f7f4daf34@EUX13SRV2.EU.NEC.COM \
--to=christian.weiss@emea.nec.com \
--cc=Felix.Uhl@EMEA.NEC.COM \
--cc=fweimer@redhat.com \
--cc=libc-help@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).