Set VM prefetch allocation args for Loongson CPUs.

Wed, 01 Feb 2017 16:15:19 +0800

author
fujie
date
Wed, 01 Feb 2017 16:15:19 +0800
changeset 254
a280f2ced33e
parent 253
ea2644f6631e
child 255
8576ed2a70aa

Set VM prefetch allocation args for Loongson CPUs.

src/cpu/mips/vm/vm_version_mips.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/cpu/mips/vm/vm_version_mips.cpp	Wed Feb 01 15:58:40 2017 +0800
     1.2 +++ b/src/cpu/mips/vm/vm_version_mips.cpp	Wed Feb 01 16:15:19 2017 +0800
     1.3 @@ -75,12 +75,12 @@
     1.4  }
     1.5  */
     1.6  void VM_Version::initialize() {
     1.7 -	_features = determine_features();
     1.8 -	//no need, Abstract_VM_Version already define it as false
     1.9 -	_supports_cx8 = true;
    1.10 -
    1.11 -	char buf[256];
    1.12 -	jio_snprintf(buf, sizeof(buf), "%s, %s"
    1.13 +  _features = determine_features();
    1.14 +  //no need, Abstract_VM_Version already define it as false
    1.15 +  _supports_cx8 = true;
    1.16 +  
    1.17 +  char buf[256];
    1.18 +  jio_snprintf(buf, sizeof(buf), "%s, %s"
    1.19  #ifdef OPT_RANGECHECK
    1.20  			", optimized range check"
    1.21  #endif
    1.22 @@ -107,10 +107,30 @@
    1.23      UseCountTrailingZerosInstruction = false;  // 2017.01.22 Now this guy is only supported on 3A2000/3A3000.
    1.24  #endif
    1.25    UseSSE = 0; // Only on x86 and x64
    1.26 +
    1.27 +  if (FLAG_IS_DEFAULT(AllocatePrefetchStyle)) {
    1.28 +    FLAG_SET_DEFAULT(AllocatePrefetchStyle, 1);
    1.29 +  }
    1.30 +
    1.31 +  if (FLAG_IS_DEFAULT(AllocatePrefetchLines)) {
    1.32 +    FLAG_SET_DEFAULT(AllocatePrefetchLines, 1);
    1.33 +  }
    1.34 +
    1.35 +  if (FLAG_IS_DEFAULT(AllocatePrefetchStepSize)) {
    1.36 +    FLAG_SET_DEFAULT(AllocatePrefetchStepSize, 64);
    1.37 +  }
    1.38  	
    1.39 -	// buf is started with ", " or is empty
    1.40 -	_features_str = strdup(buf);
    1.41 -	NOT_PRODUCT( if (PrintMiscellaneous && Verbose) print_features(); );
    1.42 +  if (FLAG_IS_DEFAULT(AllocatePrefetchDistance)) {
    1.43 +    FLAG_SET_DEFAULT(AllocatePrefetchDistance, 64);
    1.44 +  }
    1.45 +
    1.46 +  if (FLAG_IS_DEFAULT(AllocateInstancePrefetchLines)) {
    1.47 +    FLAG_SET_DEFAULT(AllocateInstancePrefetchLines, 1);
    1.48 +  }
    1.49 +
    1.50 +  // buf is started with ", " or is empty
    1.51 +  _features_str = strdup(buf);
    1.52 +  NOT_PRODUCT( if (PrintMiscellaneous && Verbose) print_features(); );
    1.53  }
    1.54  
    1.55  void VM_Version::print_features() {

mercurial