Bug#328183: #328183: no-tls-direct-seg-refs
will add a very little extra cost to single thread-specific variable accesses, but it shouldn't be noticeable at all. Well, to be correct, switch -mno-tls-direct-seg-refs add extra cost to ALL thread-specific variables accesses. No, only to isolated ones. The compiler can cache gs:0 (and it will do it anyway when -mno-tls-direct-seg-refs is not provided. This is still more then single variable ... Anyway, look at configure flags for basic libc in debian/sysdeps/i386.mk: libc_extra_config_options = $(extra_config_options) --with-tls --without-__thread It doesn't use TLS internally, there is no .tbss ot .tdata segment in libc.so. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328183: #328183: no-tls-direct-seg-refs
Petr Salinger, le Thu 05 Jan 2006 09:22:29 +0100, a écrit : will add a very little extra cost to single thread-specific variable accesses, but it shouldn't be noticeable at all. Well, to be correct, switch -mno-tls-direct-seg-refs add extra cost to ALL thread-specific variables accesses. No, only to isolated ones. The compiler can cache gs:0 (and it will do it anyway when -mno-tls-direct-seg-refs is not provided. This is still more then single variable ... Anyway, look at configure flags for basic libc in debian/sysdeps/i386.mk: libc_extra_config_options = $(extra_config_options) --with-tls --without-__thread It doesn't use TLS internally, there is no .tbss ot .tdata segment in libc.so. There is: $ objdump -T libc-2.3.5.so | grep -e \(tbss\|tdata\) 001315e0 ld .tdata .tdata 001315e8 ld .tbss .tbss 0008 gD .tbss 0004 GLIBC_PRIVATE errno 001c gD .tbss 0004 GLIBC_PRIVATE h_errno 0004 gD .tdata 0004 GLIBC_PRIVATE __resp Please also look at how syscall() sets errno: 0x000cd863 syscall+67:mov%edx,%gs:(%ecx) Regards, Samuel
Bug#328183: #328183: no-tls-direct-seg-refs
Petr Salinger, le Thu 05 Jan 2006 09:22:29 +0100, a écrit : will add a very little extra cost to single thread-specific variable accesses, but it shouldn't be noticeable at all. Well, to be correct, switch -mno-tls-direct-seg-refs add extra cost to ALL thread-specific variables accesses. No, only to isolated ones. The compiler can cache gs:0 (and it will do it anyway when -mno-tls-direct-seg-refs is not provided. This is still more then single variable ... Well, that's what I call single variable accesses :)
Bug#328183: #328183: no-tls-direct-seg-refs
Anyway, look at configure flags for basic libc in debian/sysdeps/i386.mk: libc_extra_config_options = $(extra_config_options) --with-tls --without-__thread It doesn't use TLS internally, there is no .tbss ot .tdata segment in libc.so. There is: $ objdump -T libc-2.3.5.so | grep -e \(tbss\|tdata\) 001315e0 ld .tdata .tdata 001315e8 ld .tbss .tbss 0008 gD .tbss 0004 GLIBC_PRIVATE errno 001c gD .tbss 0004 GLIBC_PRIVATE h_errno 0004 gD .tdata 0004 GLIBC_PRIVATE __resp Please also look at how syscall() sets errno: 0x000cd863 syscall+67:mov%edx,%gs:(%ecx) It is in optimized one: Package: libc6-i686 Architecture: i386 Source: glibc Version: 2.3.5-11 $ objdump -T /lib/tls/i686/cmov/libc-2.3.5.so | grep -e \(tbss\|tdata\) | wc 5 33 267 But not in the basic one: $ dpkg -s libc6 Package: libc6 Architecture: i386 Source: glibc Version: 2.3.5-11 $ objdump -T /lib/libc-2.3.5.so | grep -e \(tbss\|tdata\) | wc 0 0 0 Petr -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328183: #328183: no-tls-direct-seg-refs
Petr Salinger, le Thu 05 Jan 2006 10:34:08 +0100, a écrit : But not in the basic one: $ dpkg -s libc6 Package: libc6 Architecture: i386 Source: glibc Version: 2.3.5-11 $ objdump -T /lib/libc-2.3.5.so | grep -e \(tbss\|tdata\) | wc 0 0 0 /lib/libc-2.3.5.so doesn't provide TLS, so of course doesn't use it either. /lib/tls/libc-2.3.5.so does, and produces just the same result as /lib/tls/i686/cmov/libc-2.3.5.so (which you just remembered me to install BTW, actually...) Regards, Samuel
Bug#328183: #328183: no-tls-direct-seg-refs
will add a very little extra cost to single thread-specific variable accesses, but it shouldn't be noticeable at all. Well, to be correct, switch -mno-tls-direct-seg-refs add extra cost to ALL thread-specific variables accesses. For each thread-specific variable access, compiler have to reserve scratch register and generate sequence like movl %gs:0, %ecx movl %eax, C_SYMBOL_NAME([EMAIL PROTECTED])(%ecx) instead of one instruction movl %eax, %gs:C_SYMBOL_NAME([EMAIL PROTECTED]) Petr -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#328183: #328183: no-tls-direct-seg-refs
Petr Salinger, le Wed 04 Jan 2006 21:40:06 +0100, a écrit : will add a very little extra cost to single thread-specific variable accesses, but it shouldn't be noticeable at all. Well, to be correct, switch -mno-tls-direct-seg-refs add extra cost to ALL thread-specific variables accesses. No, only to isolated ones. The compiler can cache gs:0 (and it will do it anyway when -mno-tls-direct-seg-refs is not provided. Regards, Samuel -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]