Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-08 Thread Matt Turner
On Mon, Aug 8, 2016 at 9:52 AM, Jan Vesely wrote: > On Mon, 2016-08-08 at 08:54 -0700, Ian Romanick wrote: >> On 08/05/2016 07:05 PM, ⚛ wrote: >> > >> > On Sat, Aug 6, 2016 at 3:37 AM, Jan Vesely >> > wrote: >> > > >> > > On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: >> > > > >> > > > Mesa s

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-08 Thread Ian Romanick
On 08/08/2016 09:52 AM, Jan Vesely wrote: > On Mon, 2016-08-08 at 08:54 -0700, Ian Romanick wrote: >> On 08/05/2016 07:05 PM, ⚛ wrote: >>> >>> On Sat, Aug 6, 2016 at 3:37 AM, Jan Vesely >>> wrote: On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: > > Mesa source code prior to th

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-08 Thread Jan Vesely
On Mon, 2016-08-08 at 08:54 -0700, Ian Romanick wrote: > On 08/05/2016 07:05 PM, ⚛ wrote: > > > > On Sat, Aug 6, 2016 at 3:37 AM, Jan Vesely > > wrote: > > > > > > On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: > > > > > > > > Mesa source code prior to this patch uses both RTLD_NOW and > >

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-08 Thread Ian Romanick
On 08/05/2016 07:05 PM, ⚛ wrote: > On Sat, Aug 6, 2016 at 3:37 AM, Jan Vesely wrote: >> On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: >>> Mesa source code prior to this patch uses both RTLD_NOW and >>> RTLD_LAZY. >>> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >>> >>> In comparison

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-08 Thread Michel Dänzer
On 06/08/16 11:05 AM, ⚛ wrote: > > Question 2: Exists there a reason for _not_ linking radeonsi_dri.so, > swrastg_dri.so, etc, directly to Mesa's libGL.so? *_dri.so can be used in scenarios where libGL isn't involved at all, so linking them against libGL would introduce an artificial dependency.

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jan Vesely
On Sat, 2016-08-06 at 18:52 +0200, ⚛ wrote: > On Sat, Aug 6, 2016 at 5:52 PM, Jan Vesely > wrote: > > > > The situation I'm concerned about is as > > follows: > > 1.) mesa builds fine using existing build environment. > > > > 2.) I update LLVM. This update changes symbols (function parameter > >

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Emil Velikov
On 6 August 2016 at 01:42, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. > This patch removes all RTLD_NOW in favor of RTLD_LAZY. > > In comparison to early binding, lazy binding reduces CPU instruction count > of small GL apps (

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread
On Sat, Aug 6, 2016 at 5:52 PM, Jan Vesely wrote: > The situation I'm concerned about is as > follows: > 1.) mesa builds fine using existing build environment. > > 2.) I update LLVM. This update changes symbols (function parameter > changed type, a function was moved to header, or devirtualization

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jan Vesely
On Sat, 2016-08-06 at 17:34 +0200, ⚛ wrote: > On Sat, Aug 6, 2016 at 4:32 PM, Jan Vesely > wrote: > > > > On Sat, 2016-08-06 at 13:00 +0200, ⚛ wrote: > > > > > > We could add a verifier to the build process that tests the > > > foo_dri.so > > > libraries (as well as all other libs subject to dlo

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread
On Sat, Aug 6, 2016 at 4:32 PM, Jan Vesely wrote: > On Sat, 2016-08-06 at 13:00 +0200, ⚛ wrote: >> We could add a verifier to the build process that tests the >> foo_dri.so >> libraries (as well as all other libs subject to dlopen by Mesa) for >> undefined symbols: >> >> $ LD_PRELOAD=libGL.so ldd

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jan Vesely
On Sat, 2016-08-06 at 17:20 +0200, ⚛ wrote: > On Sat, Aug 6, 2016 at 4:32 PM, Jan Vesely > wrote: > > > > sure I can set LD_BIND_NOW > > env var, but there are programs that have much stronger case for > > using > > lazy binding (like LO) that would be negatively affected. > > What is "LO"? lib

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jan Vesely
On Sat, 2016-08-06 at 07:24 -0700, Jason Ekstrand wrote: > On Aug 6, 2016 4:00 AM, "⚛" <0xe2.0x9a.0...@gmail.com> wrote: > > > > > > On Sat, Aug 6, 2016 at 4:34 AM, Rob Clark > > wrote: > > > > > > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.co > > > m> > wrote: > > > > > >

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread
On Sat, Aug 6, 2016 at 4:32 PM, Jan Vesely wrote: > sure I can set LD_BIND_NOW > env var, but there are programs that have much stronger case for using > lazy binding (like LO) that would be negatively affected. What is "LO"? ___ mesa-dev mailing list m

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jan Vesely
On Sat, 2016-08-06 at 13:00 +0200, ⚛ wrote: > On Sat, Aug 6, 2016 at 4:34 AM, Rob Clark > wrote: > > > > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> > > wrote: > > > > > > Mesa source code prior to this patch uses both RTLD_NOW and > > > RTLD_LAZY. > > > This patch remove

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Jason Ekstrand
On Aug 6, 2016 4:00 AM, "⚛" <0xe2.0x9a.0...@gmail.com> wrote: > > On Sat, Aug 6, 2016 at 4:34 AM, Rob Clark wrote: > > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > >> Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. > >> This patch removes all

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Rob Clark
On Sat, Aug 6, 2016 at 4:28 AM, Enrico Weigelt, metux IT consult wrote: > On 06.08.2016 04:05, ⚛ wrote: > >> Question 2: Exists there a reason for _not_ linking radeonsi_dri.so, >> swrastg_dri.so, etc, directly to Mesa's libGL.so? The Gallium >> *_dri.so libraries are the same inode on the filesys

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Rob Clark
On Sat, Aug 6, 2016 at 3:01 AM, Eric Anholt wrote: > Rob Clark writes: > >> On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >>> Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. >>> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >>> >>> In c

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread
On Sat, Aug 6, 2016 at 4:34 AM, Rob Clark wrote: > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. >> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >> >> In comparison to early binding, la

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Enrico Weigelt, metux IT consult
On 06.08.2016 04:05, ⚛ wrote: > Question 2: Exists there a reason for _not_ linking radeonsi_dri.so, > swrastg_dri.so, etc, directly to Mesa's libGL.so? The Gallium > *_dri.so libraries are the same inode on the filesystem. Sure about that ? nekrad@orion:~/MESA/lib/dri$ ls -lai total 508348 6750

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-06 Thread Eric Anholt
Rob Clark writes: > On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: >> Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. >> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >> >> In comparison to early binding, lazy binding reduces CPU instruc

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread Matt Turner
On Fri, Aug 5, 2016 at 7:05 PM, ⚛ <0xe2.0x9a.0...@gmail.com> wrote: > Question 4: Is it planned for *_dri.so belonging to Gallium/DRI _not_ > to be mapped to the same inode on the filesystem in the future? If > there is no such plan, what was the original point of having multiple > _dri.so files ma

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread Rob Clark
On Fri, Aug 5, 2016 at 8:42 PM, Jan Ziak <0xe2.0x9a.0...@gmail.com> wrote: > Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. > This patch removes all RTLD_NOW in favor of RTLD_LAZY. > > In comparison to early binding, lazy binding reduces CPU instruction count > of small GL a

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread
On Sat, Aug 6, 2016 at 3:37 AM, Jan Vesely wrote: > On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: >> Mesa source code prior to this patch uses both RTLD_NOW and >> RTLD_LAZY. >> This patch removes all RTLD_NOW in favor of RTLD_LAZY. >> >> In comparison to early binding, lazy binding reduces C

Re: [Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread Jan Vesely
On Sat, 2016-08-06 at 02:42 +0200, Jan Ziak wrote: > Mesa source code prior to this patch uses both RTLD_NOW and > RTLD_LAZY. > This patch removes all RTLD_NOW in favor of RTLD_LAZY. > > In comparison to early binding, lazy binding reduces CPU instruction > count > of small GL apps (e.g: glxinfo)

[Mesa-dev] [PATCH] src: replace RTLD_NOW with RTLD_LAZY

2016-08-05 Thread Jan Ziak
Mesa source code prior to this patch uses both RTLD_NOW and RTLD_LAZY. This patch removes all RTLD_NOW in favor of RTLD_LAZY. In comparison to early binding, lazy binding reduces CPU instruction count of small GL apps (e.g: glxinfo) by 6 million instructions. Larger apps won't notice the differenc