dragonwell-releng / issues-repo

0 stars 0 forks source link

[riscv64-8u]os_linux.cpp:2387:6: error: no declaration matches 'void os::pd_print_cpu_info(outputStream*, char*, size_t)' #52

Open sendaoYan opened 2 weeks ago

sendaoYan commented 2 weeks ago
/usr/bin/g++ -DLINUX -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/prims -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/precompiled -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/cpu/x86/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_x86/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm -I/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"25.412-b00\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"yansendao\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\""  -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_64 -DTARGET_COMPILER_gcc -DINCLUDE_JFR=1 -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -fvisibility=hidden -m64  -pipe -fno-strict-aliasing  -fno-omit-frame-pointer -O3  -g -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wformat=2 -Wreturn-type   -fstack-protector  -fno-delete-null-pointer-checks -fno-lifetime-dse -std=gnu++98 -c -MMD -MP -MF ../generated/dependencies/relocator.o.d -fpch-deps -o relocator.o /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/relocator.cpp 
Compiling /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/opto/replacednodes.cpp
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:2387:6: error: no declaration matches 'void os::pd_print_cpu_info(outputStream*, char*, size_t)'
 2387 | void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
      |      ^~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:2361:6: note: candidate is: 'static void os::pd_print_cpu_info(outputStream*)'
 2361 | void os::pd_print_cpu_info(outputStream* st) {
      |      ^~
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/atomic.inline.hpp:32,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/allocation.inline.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/utilities/array.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.inline.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/arrayOop.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/typeArrayOop.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.inline.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/resourceArea.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classFileParser.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classLoader.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:26:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/os.hpp:104:7: note: 'class os' defined here
  104 | class os: AllStatic {
      |       ^~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:2410:6: error: no declaration matches 'void os::get_summary_cpu_info(char*, size_t)'
 2410 | void os::get_summary_cpu_info(char* cpuinfo, size_t length) {
      |      ^~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:2410:6: note: no functions named 'void os::get_summary_cpu_info(char*, size_t)'
In file included from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os_cpu/linux_x86/vm/atomic_linux_x86.inline.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/atomic.inline.hpp:32,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/allocation.inline.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/utilities/array.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/universe.inline.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/arrayOop.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/oops/typeArrayOop.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/thread.inline.hpp:30,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/memory/resourceArea.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classFileParser.hpp:29,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/classfile/classLoader.hpp:28,
                 from /home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:26:
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/share/vm/runtime/os.hpp:104:7: note: 'class os' defined here
  104 | class os: AllStatic {
      |       ^~
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp: In static member function 'static size_t os::Linux::find_large_page_size()':
/home/yansendao/git/riscv-port-jdk8u-ysd/hotspot/src/os/linux/vm/os_linux.cpp:3609:5: error: expected ';' before 'S390_ONLY'
 3609 |     S390_ONLY(1 * M)
      |     ^~~~~~~~~

make-aarch64.log make-x86_64.log

sendaoYan commented 2 weeks ago
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index 3e54fa5cff5..bf11a3939e6 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -2384,14 +2384,6 @@ void os::print_siginfo(outputStream* st, void* siginfo) {
   st->cr();
 }

-void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
-  // Only print the model name if the platform provides this as a summary
-  if (!print_model_name_and_flags(st, buf, buflen)) {
-    _print_ascii_file_h("\n/proc/cpuinfo", "/proc/cpuinfo", st);
-  }
-  print_sys_devices_cpu_info(st, buf, buflen);
-}
-
 #if defined(AMD64) || defined(IA32) || defined(X32)
 const char* search_string = "model name";
 #elif defined(M68K)
@@ -2406,64 +2398,6 @@ const char* search_string = "cpu";
 const char* search_string = "Processor";
 #endif

-// Parses the cpuinfo file for string representing the model name.
-void os::get_summary_cpu_info(char* cpuinfo, size_t length) {
-  FILE* fp = fopen("/proc/cpuinfo", "r");
-  if (fp != NULL) {
-    while (!feof(fp)) {
-      char buf[256];
-      if (fgets(buf, sizeof(buf), fp)) {
-        char* start = strstr(buf, search_string);
-        if (start != NULL) {
-          char *ptr = start + strlen(search_string);
-          char *end = buf + strlen(buf);
-          while (ptr != end) {
-             // skip whitespace and colon for the rest of the name.
-             if (*ptr != ' ' && *ptr != '\t' && *ptr != ':') {
-               break;
-             }
-             ptr++;
-          }
-          if (ptr != end) {
-            // reasonable string, get rid of newline and keep the rest
-            char* nl = strchr(buf, '\n');
-            if (nl != NULL) *nl = '\0';
-            strncpy(cpuinfo, ptr, length);
-            fclose(fp);
-            return;
-          }
-        }
-      }
-    }
-    fclose(fp);
-  }
-  // cpuinfo not found or parsing failed, just print generic string.  The entire
-  // /proc/cpuinfo file will be printed later in the file (or enough of it for x86)
-#if   defined(AARCH64)
-  strncpy(cpuinfo, "AArch64", length);
-#elif defined(AMD64)
-  strncpy(cpuinfo, "x86_64", length);
-#elif defined(ARM)  // Order wrt. AARCH64 is relevant!
-  strncpy(cpuinfo, "ARM", length);
-#elif defined(IA32)
-  strncpy(cpuinfo, "x86_32", length);
-#elif defined(IA64)
-  strncpy(cpuinfo, "IA64", length);
-#elif defined(PPC)
-  strncpy(cpuinfo, "PPC64", length);
-#elif defined(RISCV)
-  strncpy(cpuinfo, "RISCV64", length);
-#elif defined(S390)
-  strncpy(cpuinfo, "S390", length);
-#elif defined(SPARC)
-  strncpy(cpuinfo, "sparcv9", length);
-#elif defined(ZERO_LIBARCH)
-  strncpy(cpuinfo, ZERO_LIBARCH, length);
-#else
-  strncpy(cpuinfo, "unknown", length);
-#endif
-}
-
 static void print_signal_handler(outputStream* st, int sig,
                                  char* buf, size_t buflen);

@@ -3606,7 +3540,6 @@ size_t os::Linux::find_large_page_size() {
     IA32_ONLY(4 * M)
     IA64_ONLY(256 * M)
     PPC_ONLY(4 * M)
-    S390_ONLY(1 * M)
     SPARC_ONLY(4 * M)
     RISCV64_ONLY(2 * M);
 #endif // ZERO