src/cpu/sparc/vm/vm_version_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8078554 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/vm_version_sparc.cpp

Print this page




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "runtime/java.hpp"
  29 #include "runtime/os.hpp"
  30 #include "runtime/stubCodeGenerator.hpp"
  31 #include "vm_version_sparc.hpp"
  32 
  33 int VM_Version::_features = VM_Version::unknown_m;
  34 const char* VM_Version::_features_str = "";
  35 unsigned int VM_Version::_L2_data_cache_line_size = 0;
  36 
  37 void VM_Version::initialize() {
  38   _features = determine_features();
  39   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
  40   PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
  41   PrefetchFieldsAhead         = prefetch_fields_ahead();
  42 
  43   assert(0 <= AllocatePrefetchInstr && AllocatePrefetchInstr <= 1, "invalid value");
  44   if( AllocatePrefetchInstr < 0 ) AllocatePrefetchInstr = 0;
  45   if( AllocatePrefetchInstr > 1 ) AllocatePrefetchInstr = 0;
  46 
  47   // Allocation prefetch settings
  48   intx cache_line_size = prefetch_data_size();
  49   if( cache_line_size > AllocatePrefetchStepSize )
  50     AllocatePrefetchStepSize = cache_line_size;
  51 
  52   assert(AllocatePrefetchLines > 0, "invalid value");
  53   if( AllocatePrefetchLines < 1 )     // set valid value in product VM
  54     AllocatePrefetchLines = 3;
  55   assert(AllocateInstancePrefetchLines > 0, "invalid value");
  56   if( AllocateInstancePrefetchLines < 1 ) // set valid value in product VM
  57     AllocateInstancePrefetchLines = 1;
  58 
  59   AllocatePrefetchDistance = allocate_prefetch_distance();
  60   AllocatePrefetchStyle    = allocate_prefetch_style();
  61 
  62   assert((AllocatePrefetchDistance % AllocatePrefetchStepSize) == 0 &&
  63          (AllocatePrefetchDistance > 0), "invalid value");
  64   if ((AllocatePrefetchDistance % AllocatePrefetchStepSize) != 0 ||
  65       (AllocatePrefetchDistance <= 0)) {
  66     AllocatePrefetchDistance = AllocatePrefetchStepSize;
  67   }
  68 
  69   if (AllocatePrefetchStyle == 3 && !has_blk_init()) {
  70     warning("BIS instructions are not available on this CPU");
  71     FLAG_SET_DEFAULT(AllocatePrefetchStyle, 1);
  72   }
  73 
  74   guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");
  75 
  76   assert(ArraycopySrcPrefetchDistance < 4096, "invalid value");
  77   if (ArraycopySrcPrefetchDistance >= 4096)
  78     ArraycopySrcPrefetchDistance = 4064;
  79   assert(ArraycopyDstPrefetchDistance < 4096, "invalid value");
  80   if (ArraycopyDstPrefetchDistance >= 4096)
  81     ArraycopyDstPrefetchDistance = 4064;
  82 
  83   UseSSE = 0; // Only on x86 and x64
  84 
  85   _supports_cx8 = has_v9();
  86   _supports_atomic_getset4 = true; // swap instruction
  87 
  88   if (is_niagara()) {
  89     // Indirect branch is the same cost as direct
  90     if (FLAG_IS_DEFAULT(UseInlineCaches)) {
  91       FLAG_SET_DEFAULT(UseInlineCaches, false);
  92     }
  93     // Align loops on a single instruction boundary.
  94     if (FLAG_IS_DEFAULT(OptoLoopAlignment)) {
  95       FLAG_SET_DEFAULT(OptoLoopAlignment, 4);
  96     }
  97 #ifdef _LP64
  98     // 32-bit oops don't make sense for the 64-bit VM on sparc
  99     // since the 32-bit VM has the same registers and smaller objects.
 100     Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
 101     Universe::set_narrow_klass_shift(LogKlassAlignmentInBytes);




  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.inline.hpp"
  27 #include "memory/resourceArea.hpp"
  28 #include "runtime/java.hpp"
  29 #include "runtime/os.hpp"
  30 #include "runtime/stubCodeGenerator.hpp"
  31 #include "vm_version_sparc.hpp"
  32 
  33 int VM_Version::_features = VM_Version::unknown_m;
  34 const char* VM_Version::_features_str = "";
  35 unsigned int VM_Version::_L2_data_cache_line_size = 0;
  36 
  37 void VM_Version::initialize() {
  38   _features = determine_features();
  39   PrefetchCopyIntervalInBytes = prefetch_copy_interval_in_bytes();
  40   PrefetchScanIntervalInBytes = prefetch_scan_interval_in_bytes();
  41   PrefetchFieldsAhead         = prefetch_fields_ahead();
  42 




  43   // Allocation prefetch settings
  44   intx cache_line_size = prefetch_data_size();
  45   if( cache_line_size > AllocatePrefetchStepSize )
  46     AllocatePrefetchStepSize = cache_line_size;
  47 
  48   assert(AllocatePrefetchLines > 0, "invalid value");
  49   if( AllocatePrefetchLines < 1 )     // set valid value in product VM
  50     AllocatePrefetchLines = 3;
  51   assert(AllocateInstancePrefetchLines > 0, "invalid value");
  52   if( AllocateInstancePrefetchLines < 1 ) // set valid value in product VM
  53     AllocateInstancePrefetchLines = 1;
  54 
  55   AllocatePrefetchDistance = allocate_prefetch_distance();
  56   AllocatePrefetchStyle    = allocate_prefetch_style();
  57 







  58   if (AllocatePrefetchStyle == 3 && !has_blk_init()) {
  59     warning("BIS instructions are not available on this CPU");
  60     FLAG_SET_DEFAULT(AllocatePrefetchStyle, 1);
  61   }
  62 
  63   guarantee(VM_Version::has_v9(), "only SPARC v9 is supported");







  64 
  65   UseSSE = 0; // Only on x86 and x64
  66 
  67   _supports_cx8 = has_v9();
  68   _supports_atomic_getset4 = true; // swap instruction
  69 
  70   if (is_niagara()) {
  71     // Indirect branch is the same cost as direct
  72     if (FLAG_IS_DEFAULT(UseInlineCaches)) {
  73       FLAG_SET_DEFAULT(UseInlineCaches, false);
  74     }
  75     // Align loops on a single instruction boundary.
  76     if (FLAG_IS_DEFAULT(OptoLoopAlignment)) {
  77       FLAG_SET_DEFAULT(OptoLoopAlignment, 4);
  78     }
  79 #ifdef _LP64
  80     // 32-bit oops don't make sense for the 64-bit VM on sparc
  81     // since the 32-bit VM has the same registers and smaller objects.
  82     Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
  83     Universe::set_narrow_klass_shift(LogKlassAlignmentInBytes);


src/cpu/sparc/vm/vm_version_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File