446 _features = all_features_m; 447 } 448 449 void VM_Version::revert() { 450 _features = saved_features; 451 } 452 453 unsigned int VM_Version::calc_parallel_worker_threads() { 454 unsigned int result; 455 if (is_M_series()) { 456 // for now, use same gc thread calculation for M-series as for niagara-plus 457 // in future, we may want to tweak parameters for nof_parallel_worker_thread 458 result = nof_parallel_worker_threads(5, 16, 8); 459 } else if (is_niagara_plus()) { 460 result = nof_parallel_worker_threads(5, 16, 8); 461 } else { 462 result = nof_parallel_worker_threads(5, 8, 8); 463 } 464 return result; 465 } | 446 _features = all_features_m; 447 } 448 449 void VM_Version::revert() { 450 _features = saved_features; 451 } 452 453 unsigned int VM_Version::calc_parallel_worker_threads() { 454 unsigned int result; 455 if (is_M_series()) { 456 // for now, use same gc thread calculation for M-series as for niagara-plus 457 // in future, we may want to tweak parameters for nof_parallel_worker_thread 458 result = nof_parallel_worker_threads(5, 16, 8); 459 } else if (is_niagara_plus()) { 460 result = nof_parallel_worker_threads(5, 16, 8); 461 } else { 462 result = nof_parallel_worker_threads(5, 8, 8); 463 } 464 return result; 465 } 466 467 468 int VM_Version::parse_features(const char* implementation) { 469 int features = unknown_m; 470 // Convert to UPPER case before compare. 471 char* impl = os::strdup_check_oom(implementation); 472 473 for (int i = 0; impl[i] != 0; i++) 474 impl[i] = (char)toupper((uint)impl[i]); 475 476 if (strstr(impl, "SPARC64") != NULL) { 477 features |= sparc64_family_m; 478 } else if (strstr(impl, "SPARC-M") != NULL) { 479 // M-series SPARC is based on T-series. 480 features |= (M_family_m | T_family_m); 481 } else if (strstr(impl, "SPARC-T") != NULL) { 482 features |= T_family_m; 483 if (strstr(impl, "SPARC-T1") != NULL) { 484 features |= T1_model_m; 485 } 486 } else { 487 if (strstr(impl, "SPARC") == NULL) { 488 #ifndef PRODUCT 489 // kstat on Solaris 8 virtual machines (branded zones) 490 // returns "(unsupported)" implementation. Solaris 8 is not 491 // supported anymore, but include this check to be on the 492 // safe side. 493 warning("Can't parse CPU implementation = '%s', assume generic SPARC", impl); 494 #endif 495 } 496 } 497 os::free((void*)impl); 498 return features; 499 } |