RFR: JDK-8157141 & JDK-8166454: Solaris getisax(2) and meminfo(2) cleanup

David Holmes david.holmes at oracle.com
Fri Sep 23 01:11:29 UTC 2016

Hi Alan,

On 23/09/2016 8:54 AM, Alan Burlison wrote:
> getisax(2) and meminfo(2) are both Committed interfaces. getisax(2)
> first appeared in Solaris 10, meminfo(2) first appeared in Solaris 9.
> Currently they are both accessed via dlsym(3C) which is unnecessary as
> they will always be present on any version of Solaris that Java9+ will
> run on. In addition, this patch modifies the use of getisax(2) to probe
> for the correct buffer size to use so it will continue to work if/when
> the current 2-word buffer size is exceeded - although of course any
> newly-returned capability bits will need handling, as is already the case.
> I'm submitting these two bugs as a single unit for review as they share
> common code (os::Solaris::misc_sym_init()) which can be removed if they
> are fixed together.
> getisainfo() manpage:
> http://docs.oracle.com/cd/E53394_01/html/E54765/getisax-2.html
> meminfo() manpage:
> https://docs.oracle.com/cd/E53394_01/html/E54765/meminfo-2.html
> Bugs:   https://bugs.openjdk.java.net/browse/JDK-8157141
>         https://bugs.openjdk.java.net/browse/JDK-8166454
> Webrev: http://cr.openjdk.java.net/~alanbur/JDK-8157141%2bJDK-8166454/
> JPRT hostpot testset is clean.

This is looks good - thanks for cleaning it up.

One nit/favour ...


  364   log_info(os, cpu)("getisax(2) returned: ");
  365   for (int i = 0; i < avn; i++) {
  366     log_info(os, cpu)(" " PTR32_FORMAT, avs[i]);
  367   }

For compound logging statements it is better to put them in a 
conditional checking the logging is enabled - the original if statement 
escaped (my) notice, the use of a loop here makes this more obvious. You 
can then use the more direct logging form rather than the high-level 
log_info "macro"

  if (log_is_enabled(Info, os, cpu)) {
     outputStream* log = Log(os, cpu)::info_stream();
     log->print("getisax(2) returned:");
     for (int i = 0; i < avn; i++) {
       log->print(" " PTR32_FORMAT, avs[i]);

No need to see an updated webrev.


More information about the hotspot-runtime-dev mailing list