changeset 10062:15ce8135ef98

8144881: Various fixes to linux/sparc Summary: Fixed sigflags printing, format specfiers, codeCache includes and some function returns Reviewed-by: dsamersoff, simonis
author mikael
date Tue, 08 Dec 2015 11:36:16 -0800
parents 3ccce6cd35b4
children a4bfa4a42d5f
files src/cpu/sparc/vm/nativeInst_sparc.cpp src/cpu/sparc/vm/sparc.ad src/os/aix/vm/os_aix.cpp src/os/bsd/vm/os_bsd.cpp src/os/linux/vm/os_linux.cpp src/os/solaris/vm/os_solaris.cpp src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp src/os_cpu/linux_x86/vm/os_linux_x86.cpp src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
diffstat 14 files changed, 39 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/nativeInst_sparc.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/cpu/sparc/vm/nativeInst_sparc.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -433,7 +433,7 @@
 
 
 void NativeMovConstReg32::print() {
-  tty->print_cr(INTPTR_FORMAT ": mov reg, " INTPTR_FORMAT, instruction_address(), data());
+  tty->print_cr(INTPTR_FORMAT ": mov reg, " INTPTR_FORMAT, p2i(instruction_address()), data());
 }
 
 
--- a/src/cpu/sparc/vm/sparc.ad	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/cpu/sparc/vm/sparc.ad	Tue Dec 08 11:36:16 2015 -0800
@@ -1651,6 +1651,7 @@
 #endif // !_LP64
 
   Unimplemented();
+  return 0;
 }
 
 #ifndef PRODUCT
--- a/src/os/aix/vm/os_aix.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os/aix/vm/os_aix.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -3431,8 +3431,12 @@
     }
   } else if (os::Aix::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Aix::get_our_sigflags(sig)) {
     tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
-    tty->print("expected:" PTR32_FORMAT, os::Aix::get_our_sigflags(sig));
-    tty->print_cr("  found:" PTR32_FORMAT, act.sa_flags);
+    tty->print("expected:");
+    os::Posix::print_sa_flags(tty, os::Aix::get_our_sigflags(sig));
+    tty->cr();
+    tty->print("  found:");
+    os::Posix::print_sa_flags(tty, act.sa_flags);
+    tty->cr();
     // No need to check this sig any longer
     sigaddset(&check_signal_done, sig);
   }
--- a/src/os/bsd/vm/os_bsd.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os/bsd/vm/os_bsd.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -3382,8 +3382,12 @@
     }
   } else if(os::Bsd::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Bsd::get_our_sigflags(sig)) {
     tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
-    tty->print("expected:" PTR32_FORMAT, os::Bsd::get_our_sigflags(sig));
-    tty->print_cr("  found:" PTR32_FORMAT, act.sa_flags);
+    tty->print("expected:");
+    os::Posix::print_sa_flags(tty, os::Bsd::get_our_sigflags(sig));
+    tty->cr();
+    tty->print("  found:");
+    os::Posix::print_sa_flags(tty, act.sa_flags);
+    tty->cr();
     // No need to check this sig any longer
     sigaddset(&check_signal_done, sig);
   }
--- a/src/os/linux/vm/os_linux.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os/linux/vm/os_linux.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -4533,8 +4533,12 @@
     }
   } else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) {
     tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
-    tty->print("expected:" PTR32_FORMAT, os::Linux::get_our_sigflags(sig));
-    tty->print_cr("  found:" PTR32_FORMAT, act.sa_flags);
+    tty->print("expected:");
+    os::Posix::print_sa_flags(tty, os::Linux::get_our_sigflags(sig));
+    tty->cr();
+    tty->print("  found:");
+    os::Posix::print_sa_flags(tty, act.sa_flags);
+    tty->cr();
     // No need to check this sig any longer
     sigaddset(&check_signal_done, sig);
   }
--- a/src/os/solaris/vm/os_solaris.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os/solaris/vm/os_solaris.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -4058,8 +4058,12 @@
     }
   } else if(os::Solaris::get_our_sigflags(sig) != 0 && act.sa_flags != os::Solaris::get_our_sigflags(sig)) {
     tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN));
-    tty->print("expected:" PTR32_FORMAT, os::Solaris::get_our_sigflags(sig));
-    tty->print_cr("  found:" PTR32_FORMAT, act.sa_flags);
+    tty->print("expected:");
+    os::Posix::print_sa_flags(tty, os::Solaris::get_our_sigflags(sig));
+    tty->cr();
+    tty->print("  found:");
+    os::Posix::print_sa_flags(tty, act.sa_flags);
+    tty->cr();
     // No need to check this sig any longer
     sigaddset(&check_signal_done, sig);
   }
--- a/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "code/nativeInst.hpp"
--- a/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -28,6 +28,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
@@ -347,9 +348,9 @@
 }
 
 void os::Linux::ucontext_set_pc(ucontext_t* uc, address pc) {
-  sigcontext_t* ctx = (sigcontext_t*) uc;
-  SIG_PC(ctx)  = (intptr_t)addr;
-  SIG_NPC(ctx) = (intptr_t)(addr+4);
+  sigcontext* ctx = (sigcontext*) uc;
+  SIG_PC(ctx)  = (intptr_t)pc;
+  SIG_NPC(ctx) = (intptr_t)(pc+4);
 }
 
 intptr_t* os::Linux::ucontext_get_sp(ucontext_t *uc) {
@@ -695,6 +696,7 @@
   VMError::report_and_die(t, sig, pc, info, ucVoid);
 
   ShouldNotReachHere();
+  return false;
 }
 
 void os::Linux::init_thread_fpu_state(void) {
--- a/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/linux_x86/vm/os_linux_x86.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"
--- a/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -551,6 +551,7 @@
   VMError::report_and_die(t, sig, pc, info, ucVoid);
 
   ShouldNotReachHere();
+  return false;
 }
 
 void os::print_context(outputStream *st, void *context) {
--- a/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Tue Dec 08 05:50:46 2015 -0800
+++ b/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp	Tue Dec 08 11:36:16 2015 -0800
@@ -27,6 +27,7 @@
 #include "classfile/classLoader.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
+#include "code/codeCache.hpp"
 #include "code/icBuffer.hpp"
 #include "code/vtableStubs.hpp"
 #include "interpreter/interpreter.hpp"