about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-07-31 23:54:19 +0000
committerUlrich Drepper <drepper@redhat.com>2006-07-31 23:54:19 +0000
commit13669f2c304545de194ec014255b5e3141615ac1 (patch)
treeeb30ef2cd01eaf5ea67c2c69168af61d54bea01a
parentd2de41fe4ca8d0654e75d53139eb869d6c124803 (diff)
downloadglibc-13669f2c304545de194ec014255b5e3141615ac1.tar.gz
glibc-13669f2c304545de194ec014255b5e3141615ac1.tar.xz
glibc-13669f2c304545de194ec014255b5e3141615ac1.zip
* elf/dl-open.c (dl_open_worker): Add branch prediction.
-rw-r--r--ChangeLog2
-rw-r--r--elf/dl-open.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 52f75bf0a3..6c2107cb68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-07-31  Ulrich Drepper  <drepper@redhat.com>
 
+	* elf/dl-open.c (dl_open_worker): Add branch prediction.
+
 	* nis/nss_compat/compat-grp.c: Avoid unnecessary setgrent calls into
 	the backend NSS module.  If backend setgrent call failed, don't have
 	internal_setgrent fail.  Just remember this until it is needed.
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 930400c420..cdbb6601d2 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -1,5 +1,5 @@
 /* Load a shared object at runtime, relocate it, and run its initializer.
-   Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1996-2004, 2005, 2006 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
@@ -341,7 +341,7 @@ dl_open_worker (void *a)
       if (! l->l_real->l_relocated)
 	{
 #ifdef SHARED
-	  if (GLRO(dl_profile) != NULL)
+	  if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
 	    {
 	      /* If this here is the shared object which we want to profile
 		 make sure the profile is started.  We can find out whether