< prev index next >

src/hotspot/os/linux/os_linux.cpp

Print this page

2479           }
2480         }
2481       }
2482     }
2483     fclose(fp);
2484   }
2485   // cpuinfo not found or parsing failed, just print generic string.  The entire
2486   // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2487 #if   defined(AARCH64)
2488   strncpy(cpuinfo, "AArch64", length);
2489 #elif defined(AMD64)
2490   strncpy(cpuinfo, "x86_64", length);
2491 #elif defined(ARM)  // Order wrt. AARCH64 is relevant!
2492   strncpy(cpuinfo, "ARM", length);
2493 #elif defined(IA32)
2494   strncpy(cpuinfo, "x86_32", length);
2495 #elif defined(IA64)
2496   strncpy(cpuinfo, "IA64", length);
2497 #elif defined(PPC)
2498   strncpy(cpuinfo, "PPC64", length);


2499 #elif defined(S390)
2500   strncpy(cpuinfo, "S390", length);
2501 #elif defined(SPARC)
2502   strncpy(cpuinfo, "sparcv9", length);
2503 #elif defined(ZERO_LIBARCH)
2504   strncpy(cpuinfo, ZERO_LIBARCH, length);
2505 #else
2506   strncpy(cpuinfo, "unknown", length);
2507 #endif
2508 }
2509 
2510 static char saved_jvm_path[MAXPATHLEN] = {0};
2511 
2512 // Find the full path to the current module, libjvm.so
2513 void os::jvm_path(char *buf, jint buflen) {
2514   // Error checking.
2515   if (buflen < MAXPATHLEN) {
2516     assert(false, "must use a large-enough buffer");
2517     buf[0] = '\0';
2518     return;

2479           }
2480         }
2481       }
2482     }
2483     fclose(fp);
2484   }
2485   // cpuinfo not found or parsing failed, just print generic string.  The entire
2486   // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2487 #if   defined(AARCH64)
2488   strncpy(cpuinfo, "AArch64", length);
2489 #elif defined(AMD64)
2490   strncpy(cpuinfo, "x86_64", length);
2491 #elif defined(ARM)  // Order wrt. AARCH64 is relevant!
2492   strncpy(cpuinfo, "ARM", length);
2493 #elif defined(IA32)
2494   strncpy(cpuinfo, "x86_32", length);
2495 #elif defined(IA64)
2496   strncpy(cpuinfo, "IA64", length);
2497 #elif defined(PPC)
2498   strncpy(cpuinfo, "PPC64", length);
2499 #elif defined(RISCV)
2500   strncpy(cpuinfo, "RISCV64", length);
2501 #elif defined(S390)
2502   strncpy(cpuinfo, "S390", length);
2503 #elif defined(SPARC)
2504   strncpy(cpuinfo, "sparcv9", length);
2505 #elif defined(ZERO_LIBARCH)
2506   strncpy(cpuinfo, ZERO_LIBARCH, length);
2507 #else
2508   strncpy(cpuinfo, "unknown", length);
2509 #endif
2510 }
2511 
2512 static char saved_jvm_path[MAXPATHLEN] = {0};
2513 
2514 // Find the full path to the current module, libjvm.so
2515 void os::jvm_path(char *buf, jint buflen) {
2516   // Error checking.
2517   if (buflen < MAXPATHLEN) {
2518     assert(false, "must use a large-enough buffer");
2519     buf[0] = '\0';
2520     return;
< prev index next >