hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
changeset 37430 fd743dadef12
parent 36346 0a02e923ec29
child 41706 eb0fab7b44af
equal deleted inserted replaced
37428:6e724f3d488b 37430:fd743dadef12
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  *
    22  *
    23  */
    23  */
    24 
    24 
    25 #include "precompiled.hpp"
    25 #include "precompiled.hpp"
       
    26 #include "logging/log.hpp"
    26 #include "memory/allocation.hpp"
    27 #include "memory/allocation.hpp"
    27 #include "memory/allocation.inline.hpp"
    28 #include "memory/allocation.inline.hpp"
    28 #include "runtime/os.hpp"
    29 #include "runtime/os.hpp"
    29 #include "vm_version_sparc.hpp"
    30 #include "vm_version_sparc.hpp"
    30 
    31 
   359   uint_t avs[2];
   360   uint_t avs[2];
   360   uint_t avn = os::Solaris::getisax(avs, 2);
   361   uint_t avn = os::Solaris::getisax(avs, 2);
   361   assert(avn <= 2, "should return two or less av's");
   362   assert(avn <= 2, "should return two or less av's");
   362   uint_t av = avs[0];
   363   uint_t av = avs[0];
   363 
   364 
   364 #ifndef PRODUCT
   365   log_info(os, cpu)("getisax(2) returned: " PTR32_FORMAT, av);
   365   if (PrintMiscellaneous && Verbose) {
   366   if (avn > 1) {
   366     tty->print("getisax(2) returned: " PTR32_FORMAT, av);
   367     log_info(os, cpu)(" " PTR32_FORMAT, avs[1]);
   367     if (avn > 1) {
   368   }
   368       tty->print(", " PTR32_FORMAT, avs[1]);
       
   369     }
       
   370     tty->cr();
       
   371   }
       
   372 #endif
       
   373 
   369 
   374   if (av & AV_SPARC_MUL32)  features |= hardware_mul32_m;
   370   if (av & AV_SPARC_MUL32)  features |= hardware_mul32_m;
   375   if (av & AV_SPARC_DIV32)  features |= hardware_div32_m;
   371   if (av & AV_SPARC_DIV32)  features |= hardware_div32_m;
   376   if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m;
   372   if (av & AV_SPARC_FSMULD) features |= hardware_fsmuld_m;
   377   if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m;
   373   if (av & AV_SPARC_V8PLUS) features |= v9_instructions_m;
   462         kstat_named_t* knm = (kstat_named_t *)ksp->ks_data;
   458         kstat_named_t* knm = (kstat_named_t *)ksp->ks_data;
   463         for (int i = 0; i < ksp->ks_ndata; i++) {
   459         for (int i = 0; i < ksp->ks_ndata; i++) {
   464           if (strcmp((const char*)&(knm[i].name),"implementation") == 0) {
   460           if (strcmp((const char*)&(knm[i].name),"implementation") == 0) {
   465             implementation = KSTAT_NAMED_STR_PTR(&knm[i]);
   461             implementation = KSTAT_NAMED_STR_PTR(&knm[i]);
   466             has_implementation = true;
   462             has_implementation = true;
   467 #ifndef PRODUCT
   463             log_info(os, cpu)("cpu_info.implementation: %s", implementation);
   468             if (PrintMiscellaneous && Verbose) {
       
   469               tty->print_cr("cpu_info.implementation: %s", implementation);
       
   470             }
       
   471 #endif
       
   472             features |= parse_features(implementation);
   464             features |= parse_features(implementation);
   473             break;
   465             break;
   474           }
   466           }
   475         } // for(
   467         } // for(
   476       }
   468       }