Patch: replace mutex with object synchronization
Bryce McKinlay
mckinlay@redhat.com
Wed Apr 21 19:38:00 GMT 2004
Andrew Haley wrote:
> > 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.
>
>
Yes, that ought to work, I think.
>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, I'm not suggesting we change the way offset tables are accessed
by our code at all. That will of course remain exactly the same.
The idea is, instead of having the compiler emit a complete
java.lang.Class object containing method pointers and tables of pointers
to Utf8 strings and such, we emit a single block of data containing that
info in some structured way which the runtime understands. This should
hopefully save a lot of space in the binary and a lot of dynamic linking
time.
The otables will still be emitted just as they are now, but the format
of otable_syms would change. We'll still need a mechanism to tell the
runtime about the otables so that it can fill them out, but I think
thats (somewhat) separate from the class metadata issue.
Regards
Bryce.
More information about the Java-patches
mailing list