This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Patch: replace mutex with object synchronization


Tom Tromey writes:
 > >>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
 > 
 > Andrew> The glibc shared library loader goes to great lengths to
 > Andrew> prevent a DSO from being loaded twice.
 > 
 > Even if the library is not opened with RTLD_GLOBAL?  Weird.

AFAICS, yes.

 > Andrew> The only way I can see around this is to copy the library:
 > Andrew> simply changing its name by making a link doesn't work, as the
 > Andrew> shared library loader checks the inode number.
 > 
 > It seems to me that if we adopt Bryce's plan to have gcj emit class
 > metadata rather than actual Class objects, then we've added the
 > required extra layer of indirection...  Meaning, we can map a given
 > .so exactly once, and then simple create Class objects from the .so
 > for multiple class loaders.

That might be true, but there's a significant problem: it's important
to be able to access the otable in a single memory access.  At present
that's "mov otable+offset(%ebx),%eax" which gets us quite decent
performance despite the extra indirection, and this is because the
compiler helpfully reserves a register for us to use as a static base
pointer.

Andrew.


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