[Mesa-dev] [PATCH] texobj: add verbose api trace messages to several routines

Alexander Monakov amonakov at ispras.ru
Tue Mar 5 02:10:44 PST 2013



On Tue, 5 Mar 2013, Jose Fonseca wrote:

> $LIB is a neat idea. But does it work on debian/ubuntu systems, where
> mesa/NVIDIA libGL.so are put in different paths , which are then chosen via
> /etc/ld.so.conf*?

I think Debian installs a symlink to the active libGL in /usr/lib.  Not sure
about Ubuntu; it's painful in other ways, e.g. until 13.04 their loader
expanded $LIB differently so it needed /usr/lib/$LIB.  However, the point
seems moot as ...

> But of course, "apitrace trace" could easily just do dlopen("libGL.so.1")
> and fill TRACE_LIBGL env var with it.

... this looks like a better approach anyhow.

> There is no guarantee that when we do
> 
>   real_dlsym = dlsym(dlopen("libdl.so.2"), "dlsym")
>  
> that a fake_dlsym or a fake_dlopen doesn't return itself.  But I suppose it
> can't hurt.

Yes, VirtualGL may inject a dlopen interposer capable of doing just that, but
at least that's avoidable.  It also makes efforts to prevent mutual recursion.

Alexander


More information about the mesa-dev mailing list