hotspot/src/share/vm/runtime/vm_version.hpp
changeset 183 ba55c7f3fd45
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
--- a/hotspot/src/share/vm/runtime/vm_version.hpp	Thu Feb 21 11:03:54 2008 -0800
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp	Fri Feb 22 17:17:14 2008 -0800
@@ -36,6 +36,12 @@
   static int          _vm_minor_version;
   static int          _vm_build_number;
   static bool         _initialized;
+  static int          _parallel_worker_threads;
+  static bool         _parallel_worker_threads_initialized;
+
+  static unsigned int nof_parallel_worker_threads(unsigned int num,
+                                                  unsigned int dem,
+                                                  unsigned int switch_pt);
  public:
   static void initialize();
 
@@ -69,4 +75,13 @@
   // subclasses should define new versions to hide this one as needed.  Note
   // that the O/S may support more sizes, but at most this many are used.
   static uint page_size_count() { return 2; }
+
+  // Returns the number of parallel threads to be used for VM
+  // work.  If that number has not been calculated, do so and
+  // save it.  Returns ParallelGCThreads if it is set on the
+  // command line.
+  static unsigned int parallel_worker_threads();
+  // Calculates and returns the number of parallel threads.  May
+  // be VM version specific.
+  static unsigned int calc_parallel_worker_threads();
 };