2542 }
2543 }
2544 }
2545 }
2546 fclose(fp);
2547 }
2548 // cpuinfo not found or parsing failed, just print generic string. The entire
2549 // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2550 #if defined(AARCH64)
2551 strncpy(cpuinfo, "AArch64", length);
2552 #elif defined(AMD64)
2553 strncpy(cpuinfo, "x86_64", length);
2554 #elif defined(ARM) // Order wrt. AARCH64 is relevant!
2555 strncpy(cpuinfo, "ARM", length);
2556 #elif defined(IA32)
2557 strncpy(cpuinfo, "x86_32", length);
2558 #elif defined(IA64)
2559 strncpy(cpuinfo, "IA64", length);
2560 #elif defined(PPC)
2561 strncpy(cpuinfo, "PPC64", length);
2562 #elif defined(S390)
2563 strncpy(cpuinfo, "S390", length);
2564 #elif defined(SPARC)
2565 strncpy(cpuinfo, "sparcv9", length);
2566 #elif defined(ZERO_LIBARCH)
2567 strncpy(cpuinfo, ZERO_LIBARCH, length);
2568 #else
2569 strncpy(cpuinfo, "unknown", length);
2570 #endif
2571 }
2572
2573 static char saved_jvm_path[MAXPATHLEN] = {0};
2574
2575 // Find the full path to the current module, libjvm.so
2576 void os::jvm_path(char *buf, jint buflen) {
2577 // Error checking.
2578 if (buflen < MAXPATHLEN) {
2579 assert(false, "must use a large-enough buffer");
2580 buf[0] = '\0';
2581 return;
|
2542 }
2543 }
2544 }
2545 }
2546 fclose(fp);
2547 }
2548 // cpuinfo not found or parsing failed, just print generic string. The entire
2549 // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
2550 #if defined(AARCH64)
2551 strncpy(cpuinfo, "AArch64", length);
2552 #elif defined(AMD64)
2553 strncpy(cpuinfo, "x86_64", length);
2554 #elif defined(ARM) // Order wrt. AARCH64 is relevant!
2555 strncpy(cpuinfo, "ARM", length);
2556 #elif defined(IA32)
2557 strncpy(cpuinfo, "x86_32", length);
2558 #elif defined(IA64)
2559 strncpy(cpuinfo, "IA64", length);
2560 #elif defined(PPC)
2561 strncpy(cpuinfo, "PPC64", length);
2562 #elif defined(RISCV)
2563 strncpy(cpuinfo, "RISCV64", length);
2564 #elif defined(S390)
2565 strncpy(cpuinfo, "S390", length);
2566 #elif defined(SPARC)
2567 strncpy(cpuinfo, "sparcv9", length);
2568 #elif defined(ZERO_LIBARCH)
2569 strncpy(cpuinfo, ZERO_LIBARCH, length);
2570 #else
2571 strncpy(cpuinfo, "unknown", length);
2572 #endif
2573 }
2574
2575 static char saved_jvm_path[MAXPATHLEN] = {0};
2576
2577 // Find the full path to the current module, libjvm.so
2578 void os::jvm_path(char *buf, jint buflen) {
2579 // Error checking.
2580 if (buflen < MAXPATHLEN) {
2581 assert(false, "must use a large-enough buffer");
2582 buf[0] = '\0';
2583 return;
|