Looking for expert book

S

Stefan Bindel

Hi,

I am looking for a book covering the internals of the java VM and the
compiler. I'd like to learn about what happens "inside" and to gain
knowledge about how the compiler and the VM optimizes code and how it
does not and how to write good, efficient code.

I have attended compiler construction courses, so the book can (and
should) be on a very technical and detailed level.

Can anyone recommend such a book.

TIA,
Stefan
 
G

Gordon Beaton

I am looking for a book covering the internals of the java VM and
the compiler. I'd like to learn about what happens "inside" and to
gain knowledge about how the compiler and the VM optimizes code and
how it does not and how to write good, efficient code.

The following are available as real books or as HTML:

http://java.sun.com/docs/books/vmspec/
http://java.sun.com/docs/books/jls/

See also:

http://www.ergnosis.com/java-spec-report/
http://java.sun.com/docs/books/jls/clarify.html
http://java.sun.com/products/hotspot/index.html

/gordon
 
C

Chris Uppal

Stefan said:
I am looking for a book covering the internals of the java VM and the
compiler. I'd like to learn about what happens "inside" and to gain
knowledge about how the compiler and the VM optimizes code and how it
does not and how to write good, efficient code.

It's a big topic -- garbage collection; code generation, optimisation, and hot
replacement; method dispatch; threading....

Also there is more than one JVM implementation, and the implementers make
different trade-offs between time (including their own development time ;-),
responsiveness, and space. And the state of the art is constantly evolving
(despite the industry having at least 30 years experience of creating
production-grade VMs).
I have attended compiler construction courses, so the book can (and
should) be on a very technical and detailed level.

Unless compiler construction courses have changed a lot since my day (which may
very well be the case) then you probably could do with more background than
it'll have given you.

Anyway, there are a few introductory texts around. I think "Inside the Java 2
Virtual Machine", by Bill Venners, might be a reasonable start (though it may
well have a lot more detail on aspects such as the format of .class files than
you want/need -- look before you buy). IBM's System's Journal had a few
articles on their research JVM that seem to be intended for "normal"
programmers to read, I don't have links but try searching:
http://domino.research.ibm.com/tchjr/journalindex.nsf/Home?OpenForm
for "JVM".

Garbage collection is *crucial* to the JVM , and is a very big subject in
its own right; there's a good book on it called, IIRC, "Garbage Collection".
You'll find it easily enough since it's the *only* book on garbage
collection... (or it was, last time I looked a couple of years ago).

Once you get beyond that stage -- which you'll have to if you want the real
nitty-gritty -- then I don't think you have much choice than to start looking
at research papers. OOPSLA proceedings have lots of enjoyable detail. There's
lots of stuff on the Web too. Also, don't forget that the techniques used in
JVM implementations were usually developed first by implementers of less
stifled languages like LISP, Smalltalk, and SELF, so don't pass them up when
you are looking for papers.

Good places to start looking:

http://citeseer.nj.nec.com/cs
http://www.sunlabs.com/research/java-topics/pubs/
http://www.sunlabs.com/self/papers/papers.html
<the above IBM link>

But there's lots more. Try google with "JVM" "implementation"...

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top