This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: Align the stack in __tls_get_addr [BZ #21609]
On Fri, 7 Jul 2017, Carlos O'Donell wrote:
> My apologies, when I wrote 'hot path' I was thinking of process startup
> where the first call to __tls_get_addr (for a given dtv entry) always goes
> through the slow path.
>
> The reason I still want to highlight this is that there is a non-zero
> cost paid, and it adds up over time with other decisions we make.
In this case you're talking about literally 5 instructions on paths that
involve syscalls and thousands of other instructions.
Consider whether bloating the dynamic table by 1 entry and causing
additional work for the dynamic linker (for all programs by the way,
not only those using __tls_get_addr) outweighs the cost of those 5
instructions.
Alexander