This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: replace mutex with object synchronization
Bryce McKinlay writes:
> Andrew Haley wrote:
>
> > > Andrew, I'm not suggesting we change the way offset tables are accessed
> > > by our code at all.
> >
> >But Tom is. If the same class binary is to be used more than once,
> >its otables will be resolved differently in each class loader context:
> >that means they can't be common; and that means they can't be
> >statically allocated; and that means they can't be accessed in the way
> >they are at the moment.
> >
> >
>
> I see. Yes, that would certainly be a problem if the otable entries
> resolve to different classes in each context. Is loading multiple
> instances of the same class (in the same binary) into different class
> loaders a common requirement?
Very much so. Application servers like JOnAS depend on it. Don't
think of an application server as "one binary". It's a bunch of
different communicating processes in a single VM, each process with
its own dependencies.
> Example: 1.7 million string comparisons to start up OpenOffice.org, with
> an average symbol length of 58 characters. This is aggrivated due to the
> large number of .so's, but a large Java program linked against libgcj.so
> is probably not all that far removed from these numbers.
>
> Its hard to imagine that we can't do better(*)
Right. Let's show 'em how it should be done. :-)
Andrew.