Your message dated Sun, 01 Nov 2009 12:54:04 -0500
with message-id <1257098044.21323.2.ca...@dark-knight>
and subject line Re: libasound2: speed up snd_device_name_hint by caching path
to libasound.so
has caused the Debian Bug report #552240,
regarding libasound2: speed up snd_device_name_hint by caching path to
libasound.so
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
552240: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552240
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libasound2
Version: 1.0.21a-1
Severity: normal
Tags: patch
In a call to snd_device_name_hint, snd_dlopen is frequently called with
the parameter name == NULL, meaning to open libasound.so itself. In
this case, snd_dlopen calls dladdr on every call to find out the path to
libasound.so. I am attaching a simple patch to cache this path within
snd_dlopen so that dladdr is called only once; with this patch, the
execution time of snd_device_name_hint (a somewhat slow call) is reduced
by 40%.
Peace,
John Lindgren
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libasound2 depends on:
ii libc6 2.9-25 GNU C Library: Shared libraries
libasound2 recommends no packages.
Versions of packages libasound2 suggests:
ii libasound2-plugins 1.0.21-1 ALSA library additional plugins
-- no debconf information
--- dlmisc.0.c 2009-09-09 08:34:54.000000000 -0400
+++ dlmisc.c 2009-10-24 11:18:51.000000000 -0400
@@ -54,9 +54,13 @@
#else
#ifdef HAVE_LIBDL
if (name == NULL) {
- Dl_info dlinfo;
- if (dladdr(snd_dlopen, &dlinfo) > 0)
- name = dlinfo.dli_fname;
+ static const char * self = NULL;
+ if (self == NULL) {
+ Dl_info dlinfo;
+ if (dladdr(snd_dlopen, &dlinfo) > 0)
+ self = dlinfo.dli_fname;
+ }
+ name = self;
}
#endif
#endif
--- End Message ---
--- Begin Message ---
I've forwarded this improvement upstream, so closing:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-October/022505.html
Peace,
John Lindgren
--- End Message ---