need advice on module structure for ISA-specific sources and classes

Alan Bateman Alan.Bateman at oracle.com
Fri Sep 5 13:39:21 UTC 2014


On 04/09/2014 22:13, John Rose wrote:
> We have standard OpenJDK source locations for platform-specific code, as described in http://openjdk.java.net/jeps/201 .
>
> :
>
> But, there is no place at present for (a) ISA-dependent source files, or (b) ISA-and-platform-dependent source files.
To date then we've only had a very small amount of ISA specific code in 
the jdk repo and just not enough to be important in the source code 
organization. Aside from the 2D code then there are a few places using 
ifdef to deal with alignment and endianness on specific architectures 
but it's rare.

If there is a significant amount of ISA specific code coming in then the 
layout should support it. Introducing siblings to share and $OS make 
sense to me. A slight variation is 'share'. $ISA to make it consistent 
with the share tree (but perhaps the 'cpu.' was chosen to be consistent 
with the hotspot repo?).

An important topic for the layout discussion is that it should be easy 
for the build to determine what needs to be compiled. Erik and Magnus 
are the folks to comment on topic. With the new layout then we hope to 
get to the point soon where the $OS-specific sources are moved out of 
the unix tree to the appropriate place in the $OS tree (this has been a 
historical source of excludes and complications in the build). I'm just 
wondering if introducing ISA specific directories has any issues -  I 
assume the starting assumption for the build is that all sources 
matching the target $OS and $ISA are compiled, non-matching directories 
are ignored. In the example that you discussed with Alex then I assume 
that unix.sparcv9 works well when the target build is solaris-sparcv9 or 
linux-sparcv9. There might be some VIS version specific instructions but 
I would think this goes along with version detection at runtime and that 
the code would still be placed in the unix.sparcv9 tree.

-Alan





More information about the jigsaw-dev mailing list