< prev index next >

src/hotspot/os/linux/os_linux.cpp

Print this page

2442           }
2443         }
2444       }
2445     }
2446     fclose(fp);
2447   }
2448   // cpuinfo not found or parsing failed, just print generic string.  The entire
2449   // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2450 #if   defined(AARCH64)
2451   strncpy(cpuinfo, "AArch64", length);
2452 #elif defined(AMD64)
2453   strncpy(cpuinfo, "x86_64", length);
2454 #elif defined(ARM)  // Order wrt. AARCH64 is relevant!
2455   strncpy(cpuinfo, "ARM", length);
2456 #elif defined(IA32)
2457   strncpy(cpuinfo, "x86_32", length);
2458 #elif defined(IA64)
2459   strncpy(cpuinfo, "IA64", length);
2460 #elif defined(PPC)
2461   strncpy(cpuinfo, "PPC64", length);


2462 #elif defined(S390)
2463   strncpy(cpuinfo, "S390", length);
2464 #elif defined(SPARC)
2465   strncpy(cpuinfo, "sparcv9", length);
2466 #elif defined(ZERO_LIBARCH)
2467   strncpy(cpuinfo, ZERO_LIBARCH, length);
2468 #else
2469   strncpy(cpuinfo, "unknown", length);
2470 #endif
2471 }
2472 
2473 static char saved_jvm_path[MAXPATHLEN] = {0};
2474 
2475 // Find the full path to the current module, libjvm.so
2476 void os::jvm_path(char *buf, jint buflen) {
2477   // Error checking.
2478   if (buflen < MAXPATHLEN) {
2479     assert(false, "must use a large-enough buffer");
2480     buf[0] = '\0';
2481     return;

2442           }
2443         }
2444       }
2445     }
2446     fclose(fp);
2447   }
2448   // cpuinfo not found or parsing failed, just print generic string.  The entire
2449   // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2450 #if   defined(AARCH64)
2451   strncpy(cpuinfo, "AArch64", length);
2452 #elif defined(AMD64)
2453   strncpy(cpuinfo, "x86_64", length);
2454 #elif defined(ARM)  // Order wrt. AARCH64 is relevant!
2455   strncpy(cpuinfo, "ARM", length);
2456 #elif defined(IA32)
2457   strncpy(cpuinfo, "x86_32", length);
2458 #elif defined(IA64)
2459   strncpy(cpuinfo, "IA64", length);
2460 #elif defined(PPC)
2461   strncpy(cpuinfo, "PPC64", length);
2462 #elif defined(RISCV)
2463   strncpy(cpuinfo, "RISCV64", length);
2464 #elif defined(S390)
2465   strncpy(cpuinfo, "S390", length);
2466 #elif defined(SPARC)
2467   strncpy(cpuinfo, "sparcv9", length);
2468 #elif defined(ZERO_LIBARCH)
2469   strncpy(cpuinfo, ZERO_LIBARCH, length);
2470 #else
2471   strncpy(cpuinfo, "unknown", length);
2472 #endif
2473 }
2474 
2475 static char saved_jvm_path[MAXPATHLEN] = {0};
2476 
2477 // Find the full path to the current module, libjvm.so
2478 void os::jvm_path(char *buf, jint buflen) {
2479   // Error checking.
2480   if (buflen < MAXPATHLEN) {
2481     assert(false, "must use a large-enough buffer");
2482     buf[0] = '\0';
2483     return;
< prev index next >