This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: OpenGL and the LinuxThreads pthread_descr structure


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]