This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: Byte-Code Verifier


Tom Tromey <tromey@cygnus.com> writes:

> >>>>> "Kresten" == Kresten Krab Thorup <krab@gnu.org> writes:
> 
> Kresten> It's written in Java, but the performance seems to be ok.
> Kresten> Running Sun's Hotspot 1.0.1, checking the entire 4272 classes
> Kresten> in the JDK on my sparc, yields 60 classes/second.  If
> Kresten> compiled with gcj, it's 1/5th of that, but at least it works!
> 
> Why are we so much slower?

I have no good idea of this.  It may be because their garbage
collector is way superior, and I'm generating too much garbage?
Having a scavenger for the first generation is very efficient, since
most objects die young.  However, in gcj we must be using a non-moving
collector.  

Loading class files (as is part of the verifier) generates a lot of
strings which are soon forgotten.  We'd need some kind of GC profiler
to determine this.

I'm also having problems on Solaris, ... the initializers (.init
section) is not getting run for classes in a shared library.  Thus,
the above figure is for a statically linked libgcj.  I don't know if
that has any impact (I'm on a 14 processor UltraEnterprise 10000, with
1GB physical memory, running SunOS 5.6).

> BTW has anybody tried using profiling with Java?  Does it work?  (I
> think we might have tried it, once, but I don't remember the results.)

Yes, I've used profiling quite a lot, which is why I started
complaining about _Jv_InitClass.  It works splendidly.  

> Kresten> I've packaged it as a seperate entity (i.e., it does
> Kresten> currently not use the gnu.. package names), but I intend to
> Kresten> let it be included in GCJ, under your licence, if you like.
> 
> I would like.  You'll have to sign papers and such; the instructions
> are on the web page.

OK, thx.

-- 
 Kresten Krab Thorup, Ph.D. Candidate
 c/o Yonezawa Laboratory
 Department of Information Science   
 The University of Tokyo             
 7-3-1 Hongo, Bunkyo-ku, Tokyo 113 Japan
 Fax: +81-(0)3-5689-4365	 
 Phone: +81-(0)3-3812-2111 ext 4118
 Mobile: +81-(0)90-3693-5715

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