Where we find JVM code in Java source code?

Hi,We have downloaded Java source code from java.sun.com.Now,we want to locate JVM code from that whole Java source code.How do we come to know of the location of JVM code?
[200 byte] By [sharvaria] at [2007-10-3 0:09:05]
# 1
What do you mean by "the JVM code"?Probably what you are looking for is in the "hotspot" directory. But it's a lot of code. If you explained what you were looking for I could provide more hints.
Peter.Kessler@Sun.COMa at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
Actually we want GC related code in JVM code as we are going to analyze various GC algorithms implemented in JVM.Can you tell us where we can find the GC related code in whole Java source code?
sharvaria at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 3

We have two places where we have garbage collector algorithms. One uses a general generation framework and starts in src/share/vm/memory/genCollectedHeap.[hc]pp and continues in the files named gen*, *Generation, *Space, etc. The second uses a less flexible (but more efficient?) class hierarchy and is in src/share/vm/gc_interface/ and src/share/vm/gc_implementation/.

The whole thing hangs together because of the meta-circular class hierarchy for references garbage-collectably objects defined in src/share/vm/oops/oopsHierarchy.hpp and implemented by the other files in that directory.

All the GC code depends on inline code for allocation and for remembered set maintenance that is mostly implemented in the runtime compilers. You'll see what we call "slow-path" implementations of those operations (e.g., for use by the interpreter), but mostly we try to avoid using those methods for performance reasons. (There's a fair amount of complexity to achieve performance.)

The algorithms themselves have been described in various talks and papers, but not with all the complexities you'll see in the code. Can we (the Sun GC team) help you in your analysis? We are always interested in what people find in our code.

Peter.Kessler@Sun.COMa at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 4

Sir,

We are really thankful to you for your readiness to help us.

The GC code is written in C++.Though we have basic knowledge of C++,is we require particular topic in C++ to study that code?

We are somewhat confused about where to start?

Please,give us some insight in that case.

sharvaria at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 5
Sir, I am working with Sharvari on jvm project @iitb.We got all files u have mentioned.We r looking into code now.U have mentioned abt papers and talks on that code.Can we get some link of them,so we can understand code variables easily?
attar_reshmaa at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 6

You may find the following white paper useful as a

starting point:

http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf

Look for JavaOne talks (presentations) on "HotSpot Garbage Collection",

which can be found rooted off of, for example:

http://developers.sun.com/learning/javaoneonline/

Other than that, much of the documentation of the algorithms

and supporting data structures is in the C++-code comments.

If you have specific questions, let us know and we can see how we can

help you most efficiently.

ramki_at_jdca at 2007-7-14 16:58:03 > top of Java-index,Java HotSpot Virtual Machine,Specifications...