diff src/cpu/sparc/vm/vm_version_sparc.cpp @ 10:28372612af5e

6362677: Change parallel GC collector default number of parallel GC threads. Summary: Use the same default number of GC threads as used by ParNewGC and ConcMarkSweepGC (i.e., the 5/8th rule). Reviewed-by: ysr, tonyp
author jmasa
date Fri, 22 Feb 2008 17:17:14 -0800
parents a61af66fc99e
children ba764ed4b6f2
line wrap: on
line diff
--- a/src/cpu/sparc/vm/vm_version_sparc.cpp	Thu Feb 21 11:03:54 2008 -0800
+++ b/src/cpu/sparc/vm/vm_version_sparc.cpp	Fri Feb 22 17:17:14 2008 -0800
@@ -28,6 +28,12 @@
 int VM_Version::_features = VM_Version::unknown_m;
 const char* VM_Version::_features_str = "";
 
+bool VM_Version::is_niagara1_plus() {
+  // This is a placeholder until the real test is determined.
+  return is_niagara1() &&
+    (os::processor_count() > maximum_niagara1_processor_count());
+}
+
 void VM_Version::initialize() {
   _features = determine_features();
   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
@@ -160,3 +166,13 @@
 void VM_Version::revert() {
   _features = saved_features;
 }
+
+unsigned int VM_Version::calc_parallel_worker_threads() {
+  unsigned int result;
+  if (is_niagara1_plus()) {
+    result = nof_parallel_worker_threads(5, 16, 8);
+  } else {
+    result = nof_parallel_worker_threads(5, 8, 8);
+  }
+  return result;
+}