[gtk+] Minor fix for GTK+ mediaLib code.
- From: Brian Cameron <bcameron src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] Minor fix for GTK+ mediaLib code.
- Date: Wed, 29 Apr 2009 19:55:09 -0400 (EDT)
commit 33f4ead50679294ce6eed04cd014ece44401d626
Author: Brian Cameron <Brian Cameron sun com>
Date: Wed Apr 29 18:52:32 2009 -0500
Minor fix for GTK+ mediaLib code.
After doing some performance analysis, it was found that the GTK+ mediaLib code
triggers unnecessary lazy loading of dependent libraries. The current code
uses RTLD_DEFAULT, RTLD_PROBE, RTLD_NEXT, and RTLD_SELF. However, RTLD_PROBE
is all that is necessary, and avoids triggering the lazy loading. So this
commit fixes the code to just use RTLD_PROBE. (Bug 580678)
---
gdk-pixbuf/pixops/pixops.c | 5 +----
gdk/gdkmedialib.c | 5 +----
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
index 3d01eda..513d16f 100644
--- a/gdk-pixbuf/pixops/pixops.c
+++ b/gdk-pixbuf/pixops/pixops.c
@@ -217,10 +217,7 @@ _pixops_use_medialib ()
* For x86 processors use of libumem conflicts with
* mediaLib, so avoid using it.
*/
- if ((dlsym (RTLD_DEFAULT, "umem_alloc") != NULL) ||
- (dlsym (RTLD_PROBE, "umem_alloc") != NULL) ||
- (dlsym (RTLD_NEXT, "umem_alloc") != NULL) ||
- (dlsym (RTLD_SELF, "umem_alloc") != NULL))
+ if (dlsym (RTLD_PROBE, "umem_alloc") != NULL)
{
use_medialib = FALSE;
return;
diff --git a/gdk/gdkmedialib.c b/gdk/gdkmedialib.c
index 0a23012..effb89d 100644
--- a/gdk/gdkmedialib.c
+++ b/gdk/gdkmedialib.c
@@ -104,10 +104,7 @@ _gdk_use_medialib (void)
* For x86 processors use of libumem conflicts with
* mediaLib, so avoid using it.
*/
- if ((dlsym (RTLD_DEFAULT, "umem_alloc") != NULL) ||
- (dlsym (RTLD_PROBE, "umem_alloc") != NULL) ||
- (dlsym (RTLD_NEXT, "umem_alloc") != NULL) ||
- (dlsym (RTLD_SELF, "umem_alloc") != NULL))
+ if (dlsym (RTLD_PROBE, "umem_alloc") != NULL)
{
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]