src/share/vm/runtime/vm_version.hpp

Print this page
rev 10065 : 8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
Summary: adds c1 & c2 x86 intrinsics for j.l.Runtime.onSpinWait() that utilize the 'pause' instruction
Contributed-by: ikrylov, ygaevsky
Reviewed-by: iveresov, vlivanov, kvn


 145     return _reserve_for_allocation_prefetch;
 146   }
 147 
 148   // ARCH specific policy for the BiasedLocking
 149   static bool use_biased_locking()  { return true; }
 150 
 151   // Number of page sizes efficiently supported by the hardware.  Most chips now
 152   // support two sizes, thus this default implementation.  Processor-specific
 153   // subclasses should define new versions to hide this one as needed.  Note
 154   // that the O/S may support more sizes, but at most this many are used.
 155   static uint page_size_count() { return 2; }
 156 
 157   // Returns the number of parallel threads to be used for VM
 158   // work.  If that number has not been calculated, do so and
 159   // save it.  Returns ParallelGCThreads if it is set on the
 160   // command line.
 161   static unsigned int parallel_worker_threads();
 162   // Calculates and returns the number of parallel threads.  May
 163   // be VM version specific.
 164   static unsigned int calc_parallel_worker_threads();




 165 };
 166 
 167 #ifdef TARGET_ARCH_x86
 168 # include "vm_version_x86.hpp"
 169 #endif
 170 #ifdef TARGET_ARCH_sparc
 171 # include "vm_version_sparc.hpp"
 172 #endif
 173 #ifdef TARGET_ARCH_zero
 174 # include "vm_version_zero.hpp"
 175 #endif
 176 #ifdef TARGET_ARCH_arm
 177 # include "vm_version_arm.hpp"
 178 #endif
 179 #ifdef TARGET_ARCH_ppc
 180 # include "vm_version_ppc.hpp"
 181 #endif
 182 
 183 #endif // SHARE_VM_RUNTIME_VM_VERSION_HPP


 145     return _reserve_for_allocation_prefetch;
 146   }
 147 
 148   // ARCH specific policy for the BiasedLocking
 149   static bool use_biased_locking()  { return true; }
 150 
 151   // Number of page sizes efficiently supported by the hardware.  Most chips now
 152   // support two sizes, thus this default implementation.  Processor-specific
 153   // subclasses should define new versions to hide this one as needed.  Note
 154   // that the O/S may support more sizes, but at most this many are used.
 155   static uint page_size_count() { return 2; }
 156 
 157   // Returns the number of parallel threads to be used for VM
 158   // work.  If that number has not been calculated, do so and
 159   // save it.  Returns ParallelGCThreads if it is set on the
 160   // command line.
 161   static unsigned int parallel_worker_threads();
 162   // Calculates and returns the number of parallel threads.  May
 163   // be VM version specific.
 164   static unsigned int calc_parallel_worker_threads();
 165  
 166   // Does this compiler support intrinsification 
 167   // of java.lang.Runtime.onSpinWait() 
 168   static bool supports_on_spin_wait() { return false; }
 169 };
 170 
 171 #ifdef TARGET_ARCH_x86
 172 # include "vm_version_x86.hpp"
 173 #endif
 174 #ifdef TARGET_ARCH_sparc
 175 # include "vm_version_sparc.hpp"
 176 #endif
 177 #ifdef TARGET_ARCH_zero
 178 # include "vm_version_zero.hpp"
 179 #endif
 180 #ifdef TARGET_ARCH_arm
 181 # include "vm_version_arm.hpp"
 182 #endif
 183 #ifdef TARGET_ARCH_ppc
 184 # include "vm_version_ppc.hpp"
 185 #endif
 186 
 187 #endif // SHARE_VM_RUNTIME_VM_VERSION_HPP