< prev index next >

src/hotspot/cpu/s390/vm_version_s390.cpp

Print this page
rev 50966 : 8206919: s390: add missing info to vm_version_ext_s390


  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "jvm.h"
  28 #include "asm/assembler.inline.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "code/compiledIC.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "runtime/java.hpp"
  33 #include "runtime/stubCodeGenerator.hpp"
  34 #include "vm_version_s390.hpp"
  35 
  36 # include <sys/sysinfo.h>
  37 
  38 bool VM_Version::_is_determine_features_test_running  = false;

  39 
  40 unsigned long VM_Version::_features[_features_buffer_len]           = {0, 0, 0, 0};
  41 unsigned long VM_Version::_cipher_features[_features_buffer_len]    = {0, 0, 0, 0};
  42 unsigned long VM_Version::_msgdigest_features[_features_buffer_len] = {0, 0, 0, 0};
  43 unsigned int  VM_Version::_nfeatures                                = 0;
  44 unsigned int  VM_Version::_ncipher_features                         = 0;
  45 unsigned int  VM_Version::_nmsgdigest_features                      = 0;
  46 unsigned int  VM_Version::_Dcache_lineSize                          = 256;
  47 unsigned int  VM_Version::_Icache_lineSize                          = 256;
  48 
  49 static const char* z_gen[]     = {"  ",   "G1",   "G2", "G3",    "G4",     "G5",      "G6",   "G7"   };
  50 static const char* z_machine[] = {"  ", "2064", "2084", "2094",  "2097",   "2817",    "  ",   "2964" };
  51 static const char* z_name[]    = {"  ", "z900", "z990", "z9 EC", "z10 EC", "z196 EC", "ec12", "z13"  };
  52 
  53 void VM_Version::initialize() {
  54   determine_features();      // Get processor capabilities.
  55   set_features_string();     // Set a descriptive feature indication.
  56 
  57   if (Verbose) {
  58     print_features();


 231   // (see Atomic::cmpxchg)
 232   // and 'atomic long memory ops' (see Unsafe_GetLongVolatile).
 233   _supports_cx8 = true;
 234 
 235   _supports_atomic_getadd4 = VM_Version::has_LoadAndALUAtomicV1();
 236   _supports_atomic_getadd8 = VM_Version::has_LoadAndALUAtomicV1();
 237 
 238   // z/Architecture supports unaligned memory accesses.
 239   // Performance penalty is negligible. An additional tick or so
 240   // is lost if the accessed data spans a cache line boundary.
 241   // Unaligned accesses are not atomic, of course.
 242   if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
 243     FLAG_SET_DEFAULT(UseUnalignedAccesses, true);
 244   }
 245 }
 246 
 247 
 248 void VM_Version::set_features_string() {
 249 
 250   unsigned int ambiguity = 0;

 251   if (is_z13()) {
 252     _features_string = "System z G7-z13  (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update, TxM, VectorInstr)";

 253     ambiguity++;
 254   }
 255   if (is_ec12()) {
 256     _features_string = "System z G6-EC12 (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update, TxM)";

 257     ambiguity++;
 258   }
 259   if (is_z196()) {
 260     _features_string = "System z G5-z196 (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update)";

 261     ambiguity++;
 262   }
 263   if (is_z10()) {
 264     _features_string = "System z G4-z10  (LDISP_fast, ExtImm, PCrel Load/Store, CmpB)";

 265     ambiguity++;
 266   }
 267   if (is_z9()) {
 268     _features_string = "System z G3-z9   (LDISP_fast, ExtImm), out-of-support as of 2016-04-01";

 269     ambiguity++;
 270   }
 271   if (is_z990()) {
 272     _features_string = "System z G2-z990 (LDISP_fast), out-of-support as of 2014-07-01";

 273     ambiguity++;
 274   }
 275   if (is_z900()) {
 276     _features_string = "System z G1-z900 (LDISP), out-of-support as of 2014-07-01";

 277     ambiguity++;
 278   }
 279 
 280   if (ambiguity == 0) {
 281     _features_string = "z/Architecture (unknown generation)";
 282   } else if (ambiguity > 1) {
 283     tty->print_cr("*** WARNING *** Ambiguous z/Architecture detection, ambiguity = %d", ambiguity);
 284     tty->print_cr("                oldest detected generation is %s", _features_string);
 285     _features_string = "z/Architecture (ambiguous detection)";
 286   }
 287 
 288   if (has_Crypto_AES()) {
 289     char buf[256];
 290     assert(strlen(_features_string) + 4 + 3*4 + 1 < sizeof(buf), "increase buffer size");
 291     jio_snprintf(buf, sizeof(buf), "%s aes%s%s%s", // String 'aes' must be surrounded by spaces so that jtreg tests recognize it.
 292                  _features_string,
 293                  has_Crypto_AES128() ? " 128" : "",
 294                  has_Crypto_AES192() ? " 192" : "",
 295                  has_Crypto_AES256() ? " 256" : "");
 296     _features_string = os::strdup(buf);




  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "jvm.h"
  28 #include "asm/assembler.inline.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "code/compiledIC.hpp"
  31 #include "memory/resourceArea.hpp"
  32 #include "runtime/java.hpp"
  33 #include "runtime/stubCodeGenerator.hpp"
  34 #include "vm_version_s390.hpp"
  35 
  36 # include <sys/sysinfo.h>
  37 
  38 bool VM_Version::_is_determine_features_test_running  = false;
  39 const char*   VM_Version::_model_string;
  40 
  41 unsigned long VM_Version::_features[_features_buffer_len]           = {0, 0, 0, 0};
  42 unsigned long VM_Version::_cipher_features[_features_buffer_len]    = {0, 0, 0, 0};
  43 unsigned long VM_Version::_msgdigest_features[_features_buffer_len] = {0, 0, 0, 0};
  44 unsigned int  VM_Version::_nfeatures                                = 0;
  45 unsigned int  VM_Version::_ncipher_features                         = 0;
  46 unsigned int  VM_Version::_nmsgdigest_features                      = 0;
  47 unsigned int  VM_Version::_Dcache_lineSize                          = 256;
  48 unsigned int  VM_Version::_Icache_lineSize                          = 256;
  49 
  50 static const char* z_gen[]     = {"  ",   "G1",   "G2", "G3",    "G4",     "G5",      "G6",   "G7"   };
  51 static const char* z_machine[] = {"  ", "2064", "2084", "2094",  "2097",   "2817",    "  ",   "2964" };
  52 static const char* z_name[]    = {"  ", "z900", "z990", "z9 EC", "z10 EC", "z196 EC", "ec12", "z13"  };
  53 
  54 void VM_Version::initialize() {
  55   determine_features();      // Get processor capabilities.
  56   set_features_string();     // Set a descriptive feature indication.
  57 
  58   if (Verbose) {
  59     print_features();


 232   // (see Atomic::cmpxchg)
 233   // and 'atomic long memory ops' (see Unsafe_GetLongVolatile).
 234   _supports_cx8 = true;
 235 
 236   _supports_atomic_getadd4 = VM_Version::has_LoadAndALUAtomicV1();
 237   _supports_atomic_getadd8 = VM_Version::has_LoadAndALUAtomicV1();
 238 
 239   // z/Architecture supports unaligned memory accesses.
 240   // Performance penalty is negligible. An additional tick or so
 241   // is lost if the accessed data spans a cache line boundary.
 242   // Unaligned accesses are not atomic, of course.
 243   if (FLAG_IS_DEFAULT(UseUnalignedAccesses)) {
 244     FLAG_SET_DEFAULT(UseUnalignedAccesses, true);
 245   }
 246 }
 247 
 248 
 249 void VM_Version::set_features_string() {
 250 
 251   unsigned int ambiguity = 0;
 252   _model_string = z_name[0];
 253   if (is_z13()) {
 254     _features_string = "System z G7-z13  (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update, TxM, VectorInstr)";
 255     _model_string = z_name[7];
 256     ambiguity++;
 257   }
 258   if (is_ec12()) {
 259     _features_string = "System z G6-EC12 (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update, TxM)";
 260     _model_string = z_name[6];
 261     ambiguity++;
 262   }
 263   if (is_z196()) {
 264     _features_string = "System z G5-z196 (LDISP_fast, ExtImm, PCrel Load/Store, CmpB, Cond Load/Store, Interlocked Update)";
 265     _model_string = z_name[5];
 266     ambiguity++;
 267   }
 268   if (is_z10()) {
 269     _features_string = "System z G4-z10  (LDISP_fast, ExtImm, PCrel Load/Store, CmpB)";
 270     _model_string = z_name[4];
 271     ambiguity++;
 272   }
 273   if (is_z9()) {
 274     _features_string = "System z G3-z9   (LDISP_fast, ExtImm), out-of-support as of 2016-04-01";
 275     _model_string = z_name[3];
 276     ambiguity++;
 277   }
 278   if (is_z990()) {
 279     _features_string = "System z G2-z990 (LDISP_fast), out-of-support as of 2014-07-01";
 280     _model_string = z_name[2];
 281     ambiguity++;
 282   }
 283   if (is_z900()) {
 284     _features_string = "System z G1-z900 (LDISP), out-of-support as of 2014-07-01";
 285     _model_string = z_name[1];
 286     ambiguity++;
 287   }
 288 
 289   if (ambiguity == 0) {
 290     _features_string = "z/Architecture (unknown generation)";
 291   } else if (ambiguity > 1) {
 292     tty->print_cr("*** WARNING *** Ambiguous z/Architecture detection, ambiguity = %d", ambiguity);
 293     tty->print_cr("                oldest detected generation is %s", _features_string);
 294     _features_string = "z/Architecture (ambiguous detection)";
 295   }
 296 
 297   if (has_Crypto_AES()) {
 298     char buf[256];
 299     assert(strlen(_features_string) + 4 + 3*4 + 1 < sizeof(buf), "increase buffer size");
 300     jio_snprintf(buf, sizeof(buf), "%s aes%s%s%s", // String 'aes' must be surrounded by spaces so that jtreg tests recognize it.
 301                  _features_string,
 302                  has_Crypto_AES128() ? " 128" : "",
 303                  has_Crypto_AES192() ? " 192" : "",
 304                  has_Crypto_AES256() ? " 256" : "");
 305     _features_string = os::strdup(buf);


< prev index next >