< prev index next >

src/hotspot/cpu/aarch64/vm_version_aarch64.cpp

Print this page




 160     warning("AllocatePrefetchStepSize must be multiple of 8");
 161     AllocatePrefetchStepSize &= ~7;
 162   }
 163 
 164   if (SoftwarePrefetchHintDistance != -1 &&
 165        (SoftwarePrefetchHintDistance & 7)) {
 166     warning("SoftwarePrefetchHintDistance must be -1, or a multiple of 8");
 167     SoftwarePrefetchHintDistance &= ~7;
 168   }
 169 
 170   unsigned long auxv = getauxval(AT_HWCAP);
 171 
 172   char buf[512];
 173 
 174   _features = auxv;
 175 
 176   int cpu_lines = 0;
 177   if (FILE *f = fopen("/proc/cpuinfo", "r")) {
 178     char buf[128], *p;
 179     while (fgets(buf, sizeof (buf), f) != NULL) {
 180       if ((p = strchr(buf, ':')) != NULL) {
 181         long v = strtol(p+1, NULL, 0);
 182         if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) {
 183           _cpu = v;
 184           cpu_lines++;
 185         } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) {
 186           _variant = v;
 187         } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) {
 188           if (_model != v)  _model2 = _model;
 189           _model = v;
 190         } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) {
 191           _revision = v;
 192         }
 193       }
 194     }
 195     fclose(f);
 196   }
 197 
 198   // Enable vendor specific features
 199 
 200   // Ampere eMAG




 160     warning("AllocatePrefetchStepSize must be multiple of 8");
 161     AllocatePrefetchStepSize &= ~7;
 162   }
 163 
 164   if (SoftwarePrefetchHintDistance != -1 &&
 165        (SoftwarePrefetchHintDistance & 7)) {
 166     warning("SoftwarePrefetchHintDistance must be -1, or a multiple of 8");
 167     SoftwarePrefetchHintDistance &= ~7;
 168   }
 169 
 170   unsigned long auxv = getauxval(AT_HWCAP);
 171 
 172   char buf[512];
 173 
 174   _features = auxv;
 175 
 176   int cpu_lines = 0;
 177   if (FILE *f = fopen("/proc/cpuinfo", "r")) {
 178     char buf[128], *p;
 179     while (fgets(buf, sizeof (buf), f) != NULL) {
 180       if (p = strchr(buf, ':')) {
 181         long v = strtol(p+1, NULL, 0);
 182         if (strncmp(buf, "CPU implementer", sizeof "CPU implementer" - 1) == 0) {
 183           _cpu = v;
 184           cpu_lines++;
 185         } else if (strncmp(buf, "CPU variant", sizeof "CPU variant" - 1) == 0) {
 186           _variant = v;
 187         } else if (strncmp(buf, "CPU part", sizeof "CPU part" - 1) == 0) {
 188           if (_model != v)  _model2 = _model;
 189           _model = v;
 190         } else if (strncmp(buf, "CPU revision", sizeof "CPU revision" - 1) == 0) {
 191           _revision = v;
 192         }
 193       }
 194     }
 195     fclose(f);
 196   }
 197 
 198   // Enable vendor specific features
 199 
 200   // Ampere eMAG


< prev index next >