This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.15-128-g0eb6f47


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  0eb6f47528cc10645cb0a6919b3af53166ca4fe8 (commit)
       via  27a25b6e633a3ea071e229337eaae36d0fa243fa (commit)
      from  c8a89e7dd5cab24242cc9050387bd5bb902da11a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0eb6f47528cc10645cb0a6919b3af53166ca4fe8

commit 0eb6f47528cc10645cb0a6919b3af53166ca4fe8
Merge: 27a25b6 c8a89e7
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 30 22:34:33 2012 -0500

    Merge branch 'master' of ssh://sourceware.org/git/glibc
    
    Conflicts:
    	ChangeLog

diff --cc ChangeLog
index a5b5e7a,a03aee8..d078926
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,11 -1,64 +1,72 @@@
 +2012-01-30  Ulrich Drepper  <drepper@gmail.com>
 +
 +	* elf/dl-tls.c (__tls_get_addr): Optimize by transforming all calls
 +	into tail calls.
 +	(update_get_addr): New function.
 +	(tls_get_addr_tail): Take GET_ADDR_ARGS parameter, remove
 +	GET_ADDR_MODULE parameter.
 +
+ 2012-01-30  Joseph Myers  <joseph@codesourcery.com>
+ 
+ 	* crypt/cert.c: Remove __STDC__ conditionals.
+ 	* crypt/crypt-entry.c: Likewise.
+ 	* crypt/crypt_util.c: Likewise.
+ 	* libio/filedoalloc.c: Likewise.
+ 	* libio/fileops.c: Likewise.
+ 	* libio/genops.c: Likewise.
+ 	* libio/iofclose.c: Likewise.
+ 	* libio/iofdopen.c: Likewise.
+ 	* libio/iofopen.c: Likewise.
+ 	* libio/iofopen64.c: Likewise.
+ 	* libio/iogetdelim.c: Likewise.
+ 	* libio/iopopen.c: Likewise.
+ 	* libio/obprintf.c: Likewise.
+ 	* libio/oldfileops.c: Likewise.
+ 	* libio/oldiofclose.c: Likewise.
+ 	* libio/oldiofdopen.c: Likewise.
+ 	* libio/oldiofopen.c: Likewise.
+ 	* libio/oldiopopen.c: Likewise.
+ 	* libio/wfiledoalloc.c: Likewise.
+ 	* libio/wgenops.c: Likewise.
+ 	* locale/programs/xmalloc.c: Likewise.
+ 	* misc/syslog.c: Likewise.
+ 	* stdio-common/xbug.c: Likewise.
+ 	* string/memchr.c: Likewise.
+ 	* string/memcmp.c: Likewise.
+ 	* string/memrchr.c: Likewise.
+ 	* string/rawmemchr.c: Likewise.
+ 	* sysdeps/posix/getcwd.c: Likewise.
+ 	* time/strftime_l.c: Likewise.
+ 
+ 2012-01-30  Joseph Myers  <joseph@codesourcery.com>
+ 
+ 	* configure.in (libc_cv_cc_sse2avx): AC_SUBST.
+ 	* configure: Regenerate.
+ 	* config.make.in (config-cflags-sse2avx): Define.
+ 	* sysdeps/x86_64/fpu/multiarch/Makefile (CFLAGS-slowexp-avx.c):
+ 	Fix typo.
+ 
+ 2012-01-29  Chris Metcalf  <cmetcalf@tilera.com>
+ 
+ 	* scripts/config.guess: Update from upstream config git repository.
+ 	* scripts/config.sub: Likewise.
+ 
+ 2012-01-28  Chris Metcalf  <cmetcalf@tilera.com>
+ 
+ 	* elf/elf.h (EM_TILEPRO, EM_TILEGX): New macros.
+ 	(EM_NUM): Update.
+ 	(R_TILEPRO_*, R_TILEGX_*): New macros.
+ 
+ 	* scripts/firstversions.awk: Fix bug in version range handling.
+ 
+ 	* sysdeps/unix/sysv/linux/grantpt.c: Use <> brackets for not-cancel.h.
+ 
+ 	* sysdeps/unix/sysv/linux/faccessat.c (faccessat): Call __fxstatat64.
+ 
+ 	* include/sys/epoll.h: New file.
+ 	* sysdeps/unix/sysv/linux/epoll_pwait.c (epoll_pwait): Mark as
+ 	libc_hidden_def.
+ 
  2012-01-28  Ulrich Drepper  <drepper@gmail.com>
  
  	* sysdeps/x86_64/fpu/bits/mathinline.h (__signbitl): Optimize a bit.

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=27a25b6e633a3ea071e229337eaae36d0fa243fa

commit 27a25b6e633a3ea071e229337eaae36d0fa243fa
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Mon Jan 30 22:32:05 2012 -0500

    Optimize __get_tls_addr a bit
    
    Rearrange code to avoid creation of a stack frame.  At least on x86-64
    the code for the fast path should be down to the bare minimum.

diff --git a/ChangeLog b/ChangeLog
index 5866bac..a5b5e7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-01-30  Ulrich Drepper  <drepper@gmail.com>
+
+	* elf/dl-tls.c (__tls_get_addr): Optimize by transforming all calls
+	into tail calls.
+	(update_get_addr): New function.
+	(tls_get_addr_tail): Take GET_ADDR_ARGS parameter, remove
+	GET_ADDR_MODULE parameter.
+
 2012-01-28  Ulrich Drepper  <drepper@gmail.com>
 
 	* sysdeps/x86_64/fpu/bits/mathinline.h (__signbitl): Optimize a bit.
diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index ea94aa0..4358616 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -1,5 +1,5 @@
 /* Thread-local storage handling in the ELF dynamic linker.  Generic version.
-   Copyright (C) 2002-2006,2008,2011 Free Software Foundation, Inc.
+   Copyright (C) 2002-2006,2008,2011,2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -509,6 +509,7 @@ rtld_hidden_def (_dl_deallocate_tls)
    of the following macros.  */
 # ifndef GET_ADDR_ARGS
 #  define GET_ADDR_ARGS tls_index *ti
+#  define GET_ADDR_PARAM ti
 # endif
 # ifndef GET_ADDR_MODULE
 #  define GET_ADDR_MODULE ti->ti_module
@@ -690,13 +691,13 @@ _dl_update_slotinfo (unsigned long int req_modid)
 
 static void *
 __attribute_noinline__
-tls_get_addr_tail (dtv_t *dtv, struct link_map *the_map, size_t module)
+tls_get_addr_tail (GET_ADDR_ARGS, dtv_t *dtv, struct link_map *the_map)
 {
   /* The allocation was deferred.  Do it now.  */
   if (the_map == NULL)
     {
       /* Find the link map for this module.  */
-      size_t idx = module;
+      size_t idx = GET_ADDR_MODULE;
       struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
 
       while (idx >= listp->len)
@@ -728,18 +729,34 @@ tls_get_addr_tail (dtv_t *dtv, struct link_map *the_map, size_t module)
 	  if (__builtin_expect (the_map->l_tls_offset
 				!= FORCED_DYNAMIC_TLS_OFFSET, 1))
 	    {
-	      void *p = dtv[module].pointer.val;
+	      void *p = dtv[GET_ADDR_MODULE].pointer.val;
 	      if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
 		goto again;
 
-	      return p;
+	      return (char *) p + GET_ADDR_OFFSET;
 	    }
 	}
     }
-  void *p = dtv[module].pointer.val = allocate_and_init (the_map);
-  dtv[module].pointer.is_static = false;
+  void *p = dtv[GET_ADDR_MODULE].pointer.val = allocate_and_init (the_map);
+  dtv[GET_ADDR_MODULE].pointer.is_static = false;
 
-  return p;
+  return (char *) p + GET_ADDR_OFFSET;
+}
+
+
+static struct link_map *
+__attribute_noinline__
+update_get_addr (GET_ADDR_ARGS)
+{
+  struct link_map *the_map = _dl_update_slotinfo (GET_ADDR_MODULE);
+  dtv_t *dtv = THREAD_DTV ();
+
+  void *p = dtv[GET_ADDR_MODULE].pointer.val;
+
+  if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
+    return tls_get_addr_tail (GET_ADDR_PARAM, dtv, the_map);
+
+  return (char *) p + GET_ADDR_OFFSET;
 }
 
 
@@ -749,19 +766,14 @@ void *
 __tls_get_addr (GET_ADDR_ARGS)
 {
   dtv_t *dtv = THREAD_DTV ();
-  struct link_map *the_map = NULL;
-  void *p;
 
   if (__builtin_expect (dtv[0].counter != GL(dl_tls_generation), 0))
-    {
-      the_map = _dl_update_slotinfo (GET_ADDR_MODULE);
-      dtv = THREAD_DTV ();
-    }
+    return update_get_addr (GET_ADDR_PARAM);
 
-  p = dtv[GET_ADDR_MODULE].pointer.val;
+  void *p = dtv[GET_ADDR_MODULE].pointer.val;
 
   if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
-    p = tls_get_addr_tail (dtv, the_map, GET_ADDR_MODULE);
+    return tls_get_addr_tail (GET_ADDR_PARAM, dtv, NULL);
 
   return (char *) p + GET_ADDR_OFFSET;
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog    |    8 ++++++++
 elf/dl-tls.c |   44 ++++++++++++++++++++++++++++----------------
 2 files changed, 36 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]