This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: RFC Patch: garbage free StackTrace methods
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Anthony Green <green at redhat dot com>, java-patches at gcc dot gnu dot org
- Date: Fri, 27 Feb 2004 11:28:27 +0000
- Subject: Re: RFC Patch: garbage free StackTrace methods
- References: <1077841736.3462.282.camel@escape><873c8xpd2a.fsf@fleche.redhat.com>
Tom Tromey writes:
> >>>>> "Anthony" == Anthony Green <green@redhat.com> writes:
>
> Anthony> I recently noticed that we allocate new StackTrace objects
> Anthony> for each class.forName() when we're looking for a class
> Anthony> loader. Allocating a StackTrace object involves a couple
> Anthony> more allocations as well. But a quick look at the code tells
> Anthony> us that we can get the same thing done with no allocations.
>
> Good idea.
>
> I think Andrew and Bryce should really comment on this patch.
It looks okay.
I was thinking of speeding things up by modifying the compiler to
special case Class.forName(), but it seems that there are other areas
that need to find the caller's class loader -- RMI for instance -- so
just fixing Class.forName() doesn't do the whole job.
Andrew.