Oracle Blog

A. Sundararajan's Weblog

So you want to read HotSpot source?

I joined Sun Microsystems as a sustaining engineer - so I had to read code more often than writing new code (which is true in general for many of us!). I like to read great source code and learn from it. Sun's HotSpot Virtual Machine is one such gold mine!

May be, you've already downloaded the source bundles from
http://jdk6.dev.java.net. Or you may be waiting for the "open source" announcement. In any case, if you are planning to read HotSpot source, you may want to know the prerequisites for reading HotSpot Java Virtual Machine sources. If so, read ahead ...

Knowlegdge of C and C++ - You need not know each and every corner of C++ (for example it is okay to not know what explicit or mutable means nor you need to know "partial specialization of templates" etc.) - a decent level of understanding is enough :-)

Knowledge of assembly language (of SPARC or X86 or AMD64) - no assembler is used. In fact, assembler is actually a C++ class - but you need assembler level understanding.

Hi,
I have a small question. Can you explain to me what is involved in reading driver code. I have just instaled Nexenta andI would like to see how I can add Bluetooth support(if I have time). Have you done it before?

Posted by
Vasileios Anagnostopoulos
on October 25, 2006 at 05:33 AM IST
#

I don't understand the context! I'm blogging about Sun's HotSpot Java Virtual Machine source - are you talking about some other HotSpot??

No I just ask if reading hotSpot source is more difficult than reading driver source in Solaris. Thanks.

Posted by
Vasileios Anagnostopoulos
on October 25, 2006 at 08:24 AM IST
#

Hi Sundarajan!
This was rather useful..I was puzzled wondering which assembler was used.
And please dont stop at this! :-). Currently, there look to be no docs whatsoever on the Hotspot source code..so do post your tips regularly for lesser mortals. :-)
Thanks,
Tarun

Hi Vasileios Anagnostopoulos: HotSpot source is definitely "complex" - but, I am not sure I can compare the difficulty with device drivers or other parts of Solaris code (I don't know much about Solaris code). For Solaris, there is Solaris Internals book.

Hi Tarun: As I mentioned, there is no assembler. Assembler in HotSpot source is a C++ class. On continuing the "tips": I am not an expert in HotSpot! But, I do plan to post "random stuff" about HotSpot in future. So, stay tuned :-)