JVM interface header src location?
David Holmes
david.holmes at oracle.com
Thu Jan 11 22:01:28 UTC 2018
Hi Andrew,
On 12/01/2018 1:34 AM, Andrew Leonard wrote:
> Hi, with the new repo consolidation in JDK10+ the JVM interface headers
> (jvm.h and jvm_md.h) have moved from under
> jdk/src/java.base/share|<OS>/native/include/ to
> src/hotspot/share/include/jvm.h
> src/hotspot/os/windows/include/jvm_md.h
> src/hotspot/os/posix/include/jvm_md.h
> This implies these are "hotspot" headers, when they are actually generic
I wouldn't call them generic. They define the API that hotspot provides
for use by the JDK. The JDK in turn is written to use whatever hotspot
exports. Now we can treat that as a de-facto generic definition of what
any VM that works with the JDK needs to provide, but it would be wrong
to pretend/assume that this is somehow some nice clean abstract
interface between the JDK and any VM.
In short any VM you want to plug into the JDK has to impersonate hotspot
from this API perspective.
> JVM interface definitions. So for example if previously a 3rd party JVM
> implementor (eg.Eclipse OpenJ9) who does not clone the hotspot repo, and
> now does not clone the hotspot "folder", will now fail to find these
> generic headers...
Right ... it would have been good to have gotten some feedback on this
when we did the file consolidation work:
https://bugs.openjdk.java.net/browse/JDK-8189610
and then relocation:
https://bugs.openjdk.java.net/browse/JDK-8190484
> Wouldn't it be better for these headers to be under some generic "jvm" or
> "base" include folder?
It would solve your problem. :) And I'm not opposed to moving them as a
convenience to you. My main concern would be that this is not seen as a
supported, exported, external contract between the JDK libraries and any
VM. I would still consider it a private interface between the JDK and
hotspot that changes whenever hotspot (or the JDK) needs it to.
Cheers,
David
> Thanks
> Andrew
>
> Andrew Leonard
> Java Runtimes Development
> IBM Hursley
> IBM United Kingdom Ltd
> Phone internal: 245913, external: 01962 815913
> internet email: andrew_m_leonard at uk.ibm.com
>
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number
> 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
More information about the hotspot-dev
mailing list