Welcome Armand!
My comments are inlined.

On 10/23/06, Armand Navabi <[EMAIL PROTECTED]> wrote:

I am trying to become more familiar with the jit code.  I ran the
following to see what all was compiled when running Hello World.
"java -Xtrace:compile Hello".  I was very surprised to see the number of
methods that seem to be loaded.  I think there are about 1079 methods
that get compiled for Hello World.


Yes you are right. To run Hello World  application  ~ 1000 methods are
compiled.
These methods are from threads, IO, classloading, security, utilities, VM
infrastructure classes.
1000 methods is not a big number: the optimizing compiler performance is
more than 1000/per second (my 2Ghz PC). The baseline  JET compiler is ten
times faster.


Does harmony just load all the classes in the classlib and compile every
method?  If not, then why would there be so many methods compiled for a
simple hello world program?


Not  Harmony does not load all the classes.

Right now I am trying to write a simple profiling tool that counts the
number of certain instructions in a program for a given input (i.e. I
want to run the program, and for every instruction that ends up running,
collect information).  So, since it seems that the jit not only compiles
every instruction in the program (not only the ones that end up
running), but also a bunch of other classes, I thought perhaps I would
be more interested in the interpreter.


Interpreter also executes a lot of "startup methods" before running "main".
There is a solution how to compile only predefined set of methods by
separate JIT compiler.
See EM guide for details how to filter methods:
http://incubator.apache.org/harmony/subcomponents/drlvm/emguide.html
The filters will not work with interpreter.


Also, I am trying to become familiar with the jit and interpreter by
reading the DRL Developer's Guide.  Are there any other resources other
than the Developer's Guide and this mailing list?


Check these pages too:
http://incubator.apache.org/harmony/subcomponents/drlvm/index.html
http://wiki.apache.org/harmony/

or ask directly in the mailing list :)

--
Mikhail Fursov

Reply via email to