Backport of JDK-8249672 ("Include microcode revision in features_string") to JDK-11.0.10 breaks compiling it on Oracle Solaris 11.4

Steffen Moser lists at steffen-moser.de
Sun Apr 18 11:53:11 UTC 2021


Hi all,

I am new into JDK contribution/bug reporting, so I really hope I've 
chosen the right way to report a bug - at least I could neither find a 
possibility to register for openjdk.java.net nor did my Oracle SSO 
account work on this site.

Bug report: In JDK-8249672, the microcode version of an x86 CPU was 
added to the "features_string" printed in an hs_err_pidXXXXX log file. 
As far as I know, it was introduced to JDK-16 and back-ported to both, 
JDK-15 and JDK-11 last year. While Solaris support was (unfortunately) 
abandoned in JDK-15, JDK-11 still supports and should further support 
Solaris on both SPARC and x86 if my information is correct.

I desperately need JDK-11 (and probably newer versions of Java) in order 
to run several modern open-source tools. When trying to compile JDK-11 
on Solaris 11.4 SRU 31 on x86 according to [1] and [2], I run into the 
following compile error problem:

    "./src/hotspot/cpu/x86/vm_version_x86.cpp", line 753: Error: 
cpu_microcode_revision is not a member of os.
    1 Error(s) detected.

The reason is quite obvious. The method

    os::cpu_microcode_revision()

is not defined for the Solaris platform as JDK-8249672 does not alter

    src/hotspot/os_cpu/solaris_x86/os_solaris_x86.hpp
    src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp

The question is: How should we fix it? Is it allowed to call Solaris'

    /usr/sbin/ucodeadm -v

and parse this binary's results or do we have to get the contents from 
"/dev/ucode" (which seems to be the symlink to the pseudo-device 
"/devices/pseudo/ucode at 0:ucode" and is accessed by ucodeadm) manually?

Any help to make JDK 11 compiling on Solaris 11.4/x86 again would be 
highly appreciated. Thank you very much in advance!

Kind regards,
Steffen

[1] https://blogs.oracle.com/solaris/building-openjdk-12-using-jdk-8
[2] 
http://notallmicrosoft.blogspot.com/2020/04/building-openjdk-13-and-openjdk-14-on.html


More information about the hotspot-compiler-dev mailing list