Where in OpenJDK repository can I find Hotspot VM source codes?
Krystal Mok
rednaxelafx at gmail.com
Sat Jul 29 02:13:46 UTC 2017
Hi Yijie,
> Per your explain, there is no way to get source codes of Oracle HotSpot
VM after JDK6u32?
Unfortunately, no. What's opened sourced has always been only OpenJDK and
not Oracle/Sun JDK. They do share most of the code but the license and
restrictions and some certain little details are different.
The debugging symbols of Oracle JDK product releases were never publicly
available.
You can always obtain a commercial license from Oracle for the JDK source
code, under SCSL [1], but I doubt you're going to want that just for a
one-off debugging scenario.
There used to be a JRL [2] release of Sun/Oracle's JDK source code for
non-commercial use, but that has been EOL'd and is no longer available.
That's the closest you can get to a full Oracle JDK 6 source code package,
under the JRL license. Note that it's not a open source license, and it's
limited to research purposes only.
Now, if the memory leak you're concerned about can be reproduced in earlier
versions of Oracle JDK 6, you might want to try to reproduce that on a
OpenJDK 6 build of HotSpot VM. If that does reproduce, you can easily make
a debug / fastdebug build of HotSpot and debug with it; otherwise making a
product build and debugging is also fine if it only reproduces there.
If the memory leak does not reproduce on a latest OpenJDK 6 build / Zulu 6
binary release [3] / IcedTea 6, then if I were you I wouldn't worry about
debugging the memory leak on Oracle JDK6u45 myself and just use what's
there.
- Kris
[1]: https://en.wikipedia.org/wiki/Sun_Community_Source_License
[2]: https://en.wikipedia.org/wiki/Java_Research_License
[3]: http://zulu.org/download/ for Zulu 6u93
On Fri, Jul 28, 2017 at 2:37 AM, zengyijie <hzzengyijie at corp.netease.com>
wrote:
> Hi Kris,
> Thank you very much for detailed explain!
> We are running that specific Oracle JVM in production, and encountered a
> strange native memory leak, so we plan to build a debug JVM from source
> codes.
> Per your explain, there is no way to get source codes of Oracle HotSpot VM
> after JDK6u32? How to get a Oracle Hotspot VM with debug symbol?
> Thanks a lot,
>
> Yijie
>
> 在 2017年7月28日,上午2:44,Krystal Mok <rednaxelafx at gmail.com> 写道:
>
> Hi Yijie,
>
> I don't think there is one that exactly matches what you want.
>
> I wrote a doc [1] long ago about the correspondence of Sun/Oracle JDK 6
> versus OpenJDK 6 in terms of the JVM used. Unfortunately, because of the
> history behind OpenJDK 6 (it's a backport of OpenJDK 7 to be a JDK6
> release, rather than the open sourced version of Sun/Oracle JDK 6), there
> was no exact correspondence to begin with.
>
> Back then, the HotSpot Expression release model was still in place, so the
> Oracle JDK 6 and the then still-in-development JDK 7 would mostly share the
> same JVM, that's how the OpenJDK 6 HotSpot VM still very closely match the
> Oracle JDK 6 version -- less some proprietary features like
> UseCompressedStrings, and a bit of delay in releasing the new tiered
> compilation features, etc.
>
> After Oracle JDK6u32 or something, I don't think the OpenJDK 6 HotSpot VM
> reflected changes to the Oracle JDK 6 any more, as JDK6 was going towards
> EOL'd and less changes from Oracle JDK 6 were sync'd to OpenJDK 6.
> Red Hat later took over the maintenance of the OpenJDK 6 release, and it
> further diverged from the Oracle internal one.
>
> What's in Oracle JDK6u45 specifically that you wanted to check the sources
> for, though?
>
> - Kris
>
> [1]: https://gist.github.com/rednaxelafx/925323
>
> On Wed, Jul 5, 2017 at 2:18 AM, zengyijie <hzzengyijie at corp.netease.com>
> wrote:
>
>> Hi, we are running an outdated Oracle Java JDK6 with Hotspot VM, I have
>> spent quite a while browsing openjdk repository,
>> but I can’t find the source codes for the specific Hotspot VM version.
>> The repository tip of http://hg.openjdk.java.net/jdk6/jdk6/hotspot/ <
>> http://hg.openjdk.java.net/jdk6/jdk6/hotspot/> is only jdk6-b43, there’s
>> no 1.6.0_45.
>> Could someone help tell where to find it?
>> The Oracle JDK version is as follows:
>>
>> java version "1.6.0_45"
>> Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
>> Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
>
>
>
>
More information about the hotspot-dev
mailing list