src/cpu/sparc/vm/vm_version_sparc.cpp

changeset 8982
8f1acbb637e3
parent 8944
072770c9a6b9
parent 8733
92cb89e23f3e
child 8984
7c2285d86b8d
equal deleted inserted replaced
8962:8aa5e0006ee3 8982:8f1acbb637e3
234 234
235 assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size"); 235 assert((CodeEntryAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
236 assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size"); 236 assert((OptoLoopAlignment % relocInfo::addr_unit()) == 0, "alignment is not a multiple of NOP size");
237 237
238 char buf[512]; 238 char buf[512];
239 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", 239 jio_snprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
240 (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")), 240 (has_v9() ? ", v9" : (has_v8() ? ", v8" : "")),
241 (has_hardware_popc() ? ", popc" : ""), 241 (has_hardware_popc() ? ", popc" : ""),
242 (has_vis1() ? ", vis1" : ""), 242 (has_vis1() ? ", vis1" : ""),
243 (has_vis2() ? ", vis2" : ""), 243 (has_vis2() ? ", vis2" : ""),
244 (has_vis3() ? ", vis3" : ""), 244 (has_vis3() ? ", vis3" : ""),
247 (has_aes() ? ", aes" : ""), 247 (has_aes() ? ", aes" : ""),
248 (has_sha1() ? ", sha1" : ""), 248 (has_sha1() ? ", sha1" : ""),
249 (has_sha256() ? ", sha256" : ""), 249 (has_sha256() ? ", sha256" : ""),
250 (has_sha512() ? ", sha512" : ""), 250 (has_sha512() ? ", sha512" : ""),
251 (is_ultra3() ? ", ultra3" : ""), 251 (is_ultra3() ? ", ultra3" : ""),
252 (has_sparc5_instr() ? ", sparc5" : ""),
252 (is_sun4v() ? ", sun4v" : ""), 253 (is_sun4v() ? ", sun4v" : ""),
253 (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")), 254 (is_niagara_plus() ? ", niagara_plus" : (is_niagara() ? ", niagara" : "")),
254 (is_sparc64() ? ", sparc64" : ""), 255 (is_sparc64() ? ", sparc64" : ""),
255 (!has_hardware_mul32() ? ", no-mul32" : ""), 256 (!has_hardware_mul32() ? ", no-mul32" : ""),
256 (!has_hardware_div32() ? ", no-div32" : ""), 257 (!has_hardware_div32() ? ", no-div32" : ""),
362 (cache_line_size > ContendedPaddingWidth)) 363 (cache_line_size > ContendedPaddingWidth))
363 ContendedPaddingWidth = cache_line_size; 364 ContendedPaddingWidth = cache_line_size;
364 365
365 #ifndef PRODUCT 366 #ifndef PRODUCT
366 if (PrintMiscellaneous && Verbose) { 367 if (PrintMiscellaneous && Verbose) {
368 tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
367 tty->print_cr("L2 data cache line size: %u", L2_data_cache_line_size()); 369 tty->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
368 tty->print("Allocation"); 370 tty->print("Allocation");
369 if (AllocatePrefetchStyle <= 0) { 371 if (AllocatePrefetchStyle <= 0) {
370 tty->print_cr(": no prefetching"); 372 tty->print_cr(": no prefetching");
371 } else { 373 } else {
445 _features = saved_features; 447 _features = saved_features;
446 } 448 }
447 449
448 unsigned int VM_Version::calc_parallel_worker_threads() { 450 unsigned int VM_Version::calc_parallel_worker_threads() {
449 unsigned int result; 451 unsigned int result;
450 if (is_M_series()) { 452 if (is_M_series() || is_S_series()) {
451 // for now, use same gc thread calculation for M-series as for niagara-plus 453 // for now, use same gc thread calculation for M-series and S-series as for
452 // in future, we may want to tweak parameters for nof_parallel_worker_thread 454 // niagara-plus. In future, we may want to tweak parameters for
455 // nof_parallel_worker_thread
453 result = nof_parallel_worker_threads(5, 16, 8); 456 result = nof_parallel_worker_threads(5, 16, 8);
454 } else if (is_niagara_plus()) { 457 } else if (is_niagara_plus()) {
455 result = nof_parallel_worker_threads(5, 16, 8); 458 result = nof_parallel_worker_threads(5, 16, 8);
456 } else { 459 } else {
457 result = nof_parallel_worker_threads(5, 8, 8); 460 result = nof_parallel_worker_threads(5, 8, 8);
458 } 461 }
459 return result; 462 return result;
460 } 463 }
464
465
466 int VM_Version::parse_features(const char* implementation) {
467 int features = unknown_m;
468 // Convert to UPPER case before compare.
469 char* impl = os::strdup(implementation);
470
471 for (int i = 0; impl[i] != 0; i++)
472 impl[i] = (char)toupper((uint)impl[i]);
473
474 if (strstr(impl, "SPARC64") != NULL) {
475 features |= sparc64_family_m;
476 } else if (strstr(impl, "SPARC-M") != NULL) {
477 // M-series SPARC is based on T-series.
478 features |= (M_family_m | T_family_m);
479 } else if (strstr(impl, "SPARC-S") != NULL) {
480 // S-series SPARC is based on T-series.
481 features |= (S_family_m | T_family_m);
482 } else if (strstr(impl, "SPARC-T") != NULL) {
483 features |= T_family_m;
484 if (strstr(impl, "SPARC-T1") != NULL) {
485 features |= T1_model_m;
486 }
487 } else if (strstr(impl, "SUN4V-CPU") != NULL) {
488 // Generic or migration class LDOM
489 features |= T_family_m;
490 } else {
491 #ifndef PRODUCT
492 warning("Failed to parse CPU implementation = '%s'", impl);
493 #endif
494 }
495 os::free((void*)impl);
496 return features;
497 }

mercurial