Questions about Hotspot

David Holmes david.holmes at oracle.com
Mon Dec 10 19:19:50 PST 2012


Hi Mani,

On 11/12/2012 9:46 AM, Mani Sarkar wrote:
> Hi all,
>
> I liked the message on the Hotspot link on the OpenJDK page:
> http://openjdk.java.net/groups/hotspot/
>
> Very inviting and full of development and collaborative spirit - basically
> positive and high spirited!
>
> I have a few questions that I have gathered from other Hotspot builders,
> I'll lay them out below:
> 1) What artefacts (objects) are built as a result of running the make
> commands on Hotspot? Can I find them in the
> *.../hotspot/build/...*sub-folder? There's also a Hotspot folder under
> the main build folder - how
> different is this folder from the previous one I mentioned. Would we find
> the same artefacts / objects in these two folders, we are finding they are
> not the same? Is there any documentation of what each of the folder or
> sub-folder is meant host?

There's no simple answer here because your output directory depends on 
what commands you used to build hotspot. Under the old build system 
(which is still the primary current build system) you can build hotspot 
from the top-level of the JDK forest; you can build it from the 
hotspot/make level or even down in the hotspot/make/<os>/makefiles 
level. Each level has different expectations about what make variables 
etc have to be set to allow a build to succeed - and the various 
defaults are historically Oracle/Sun oriented.

In the new build system you would always build hotspot from the 
top-level. After running configure you can just cd to the top-level 
build directory and run "make hotspot". You do not cd hotspot/make etc 
and try to run make directly from there.

The general hotspot build artefacts are a tree of directories 
representing the different kinds of builds that can occur eg:

- linux_i486_compiler1  linux x86 client compiler build
- linux_i486_compiler2  linux x86 server compiler build

Those directories then further split into:

debug
fastdebug
generated
jvmg
optimized
product
profiles

which represent different build flavours (except generated which is for 
generated sources related to JVM/TI). And in those you then find the 
built object files and libraries etc.


> 2) Can I run the launchers, and other executables built from the above
> process?

Hotspot builds a simple launcher called the gamma launcher, only. If you 
want all of the launchers then you need to do a full build; or you build 
only hotspot and copy the libjvm.so file(s) into a host JRE/JDK.

> 3) Where can we gain more knowledge on how to build and debug Hotspot - has
> anyone does this already and blogged it for us?

There are probably a number of blogs that google might turn up. I can't 
comment on their usefulness. There are two main documentation sites:

https://wikis.oracle.com/display/HotSpotInternals/Home
http://openjdk.java.net/groups/hotspot/docs/

There are also general OpenJDK build instructions (old build):

http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html

> We have also noticed that when we do a clean or incremental build, we don't
> see a "Finished building..." or "No builds required" message - it would
> help to see such and other verbose messages.

Use the new build and it will pretty things up for you. The hotspot 
build itself is not particularly clever and doesn't handle dependencies 
well (various components will always get rebuilt even if nothing 
changed). But again the new build addresses these limitations.

HTH

David Holmes

> Thanks.
>
> Regards,
> Mani
>



More information about the build-infra-dev mailing list