This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: OpenGL and the LinuxThreads pthread_descr structure
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Gareth Hughes <gareth dot hughes at acm dot org>
- Cc: libc-alpha at sources dot redhat dot com, dri-devel at lists dot sourceforge dot net
- Date: Fri, 17 May 2002 01:18:47 +0200
- Subject: Re: OpenGL and the LinuxThreads pthread_descr structure
- References: <3CE4359C.2030209@acm.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
What percentage of applications use different dispatch
tables among its threads? How often do dispatch table changes
occur? If both of these are fairly low, computing a dispatch table
in an awx section at dispatch table switch time might be fastest
(ie. prepare something like:
.section dispatch, "awx"
.align 8
.globl glFoobar
glFooBar:
jmp something
nop; nop; nop
and <something> would be changed whenever a dispatch table switch happens
for all dispatch table members).
BTW: Last time I looked at libGL (in March), these were things which I
came over:
1) libGL should IMHO use a version script (at least an anonymous one
if you want to avoid assigning a specific GL_x.y symbol version to it),
that way you get rid of thousands of expensive run-time relocations
2) last time I looked, libGL.so was linked unconditionally against
libpthread. This is punnishing all non-threaded apps, weak undefined
symbols work very well
3) I don't think building without -fpic is a good idea, 1) together with
other tricks might speed things up while avoiding DT_TEXTREL
overhead
There were some other things, but I don't remember it very well. If I find
time I'll build libGL again and check the disassembly.
Jakub