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

src/cpu/sparc/vm/vm_version_sparc.cpp

Print this page




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  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_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");


 349     }
 350     if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) {
 351       FLAG_SET_DEFAULT(UseSHA, false);
 352     }
 353   }
 354 
 355   if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
 356     (cache_line_size > ContendedPaddingWidth))
 357     ContendedPaddingWidth = cache_line_size;
 358 
 359   // This machine does not allow unaligned memory accesses
 360   if (UseUnalignedAccesses) {
 361     if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
 362       warning("Unaligned memory access is not available on this CPU");
 363     FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
 364   }
 365 
 366 #ifndef PRODUCT
 367   if (PrintMiscellaneous && Verbose) {
 368     tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
 369     tty->print_cr("L2 cache line size: %u", L2_cache_line_size());
 370     tty->print("Allocation");
 371     if (AllocatePrefetchStyle <= 0) {
 372       tty->print_cr(": no prefetching");
 373     } else {
 374       tty->print(" prefetching: ");
 375       if (AllocatePrefetchInstr == 0) {
 376           tty->print("PREFETCH");
 377       } else if (AllocatePrefetchInstr == 1) {
 378           tty->print("BIS");
 379       }
 380       if (AllocatePrefetchLines > 1) {
 381         tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
 382       } else {
 383         tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
 384       }
 385     }
 386     if (PrefetchCopyIntervalInBytes > 0) {
 387       tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
 388     }
 389     if (PrefetchScanIntervalInBytes > 0) {




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  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");


 349     }
 350     if (!(UseSHA1Intrinsics || UseSHA256Intrinsics || UseSHA512Intrinsics)) {
 351       FLAG_SET_DEFAULT(UseSHA, false);
 352     }
 353   }
 354 
 355   if (FLAG_IS_DEFAULT(ContendedPaddingWidth) &&
 356     (cache_line_size > ContendedPaddingWidth))
 357     ContendedPaddingWidth = cache_line_size;
 358 
 359   // This machine does not allow unaligned memory accesses
 360   if (UseUnalignedAccesses) {
 361     if (!FLAG_IS_DEFAULT(UseUnalignedAccesses))
 362       warning("Unaligned memory access is not available on this CPU");
 363     FLAG_SET_DEFAULT(UseUnalignedAccesses, false);
 364   }
 365 
 366 #ifndef PRODUCT
 367   if (PrintMiscellaneous && Verbose) {
 368     tty->print_cr("L1 data cache line size: %u", L1_data_cache_line_size());
 369     tty->print_cr("L2 data cache line size: %u", L2_data_cache_line_size());
 370     tty->print("Allocation");
 371     if (AllocatePrefetchStyle <= 0) {
 372       tty->print_cr(": no prefetching");
 373     } else {
 374       tty->print(" prefetching: ");
 375       if (AllocatePrefetchInstr == 0) {
 376           tty->print("PREFETCH");
 377       } else if (AllocatePrefetchInstr == 1) {
 378           tty->print("BIS");
 379       }
 380       if (AllocatePrefetchLines > 1) {
 381         tty->print_cr(" at distance %d, %d lines of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchLines, (int) AllocatePrefetchStepSize);
 382       } else {
 383         tty->print_cr(" at distance %d, one line of %d bytes", (int) AllocatePrefetchDistance, (int) AllocatePrefetchStepSize);
 384       }
 385     }
 386     if (PrefetchCopyIntervalInBytes > 0) {
 387       tty->print_cr("PrefetchCopyIntervalInBytes %d", (int) PrefetchCopyIntervalInBytes);
 388     }
 389     if (PrefetchScanIntervalInBytes > 0) {


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