8165315: [ppc] Port "8133749: NMT detail stack trace cleanup"
authorgoetz
Tue, 30 Aug 2016 16:08:52 +0200
changeset 41086 06b10263e509
parent 41081 286019ba662d
child 41087 0f5da6c5be45
8165315: [ppc] Port "8133749: NMT detail stack trace cleanup" Summary: Also add methods to check for slow/fastdebug to Platform.java. Reviewed-by: simonis, cjplummer, dholmes
hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp
hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp
hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java
hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java
--- a/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Tue Sep 13 11:32:45 2016 +0200
+++ b/hotspot/src/os_cpu/aix_ppc/vm/os_aix_ppc.cpp	Tue Aug 30 16:08:52 2016 +0200
@@ -192,8 +192,10 @@
   intptr_t* csp = (intptr_t*) *((intptr_t*) os::current_stack_pointer());
   // hack.
   frame topframe(csp, (address)0x8);
-  // return sender of current topframe which hopefully has pc != NULL.
-  return os::get_sender_for_C_frame(&topframe);
+  // Return sender of sender of current topframe which hopefully
+  // both have pc != NULL.
+  frame tmp = os::get_sender_for_C_frame(&topframe);
+  return os::get_sender_for_C_frame(&tmp);
 }
 
 // Utility functions
--- a/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Tue Sep 13 11:32:45 2016 +0200
+++ b/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp	Tue Aug 30 16:08:52 2016 +0200
@@ -205,8 +205,10 @@
   intptr_t* csp = (intptr_t*) *((intptr_t*) os::current_stack_pointer());
   // hack.
   frame topframe(csp, (address)0x8);
-  // return sender of current topframe which hopefully has pc != NULL.
-  return os::get_sender_for_C_frame(&topframe);
+  // Return sender of sender of current topframe which hopefully
+  // both have pc != NULL.
+  frame tmp = os::get_sender_for_C_frame(&topframe);
+  return os::get_sender_for_C_frame(&tmp);
 }
 
 // Utility functions
--- a/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp	Tue Sep 13 11:32:45 2016 +0200
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_xlc.hpp	Tue Aug 30 16:08:52 2016 +0200
@@ -186,6 +186,6 @@
 
 // Inlining support
 #define NOINLINE
-#define ALWAYSINLINE __attribute__((always_inline))
+#define ALWAYSINLINE inline __attribute__((always_inline))
 
 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_XLC_HPP
--- a/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java	Tue Sep 13 11:32:45 2016 +0200
+++ b/hotspot/test/runtime/NMT/CheckForProperDetailStackTrace.java	Tue Aug 30 16:08:52 2016 +0200
@@ -57,11 +57,6 @@
     private static String expectedSymbol =
         "locked_create_entry_or_null";
 
-    private static final String jdkDebug = System.getProperty("jdk.debug");
-    private static boolean isSlowDebugBuild() {
-        return (jdkDebug.toLowerCase().equals("slowdebug"));
-    }
-
     public static void main(String args[]) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
             "-XX:+UnlockDiagnosticVMOptions",
@@ -76,11 +71,12 @@
         output.shouldNotContain("NativeCallStack::NativeCallStack");
         output.shouldNotContain("os::get_native_stack");
 
-        // AllocateHeap shouldn't be in the output because it is suppose to always be inlined.
-        // We check for that here, but allow it for Windows and Solaris slowdebug builds because
-        // the compiler ends up not inlining AllocateHeap.
+        // AllocateHeap shouldn't be in the output because it is supposed to always be inlined.
+        // We check for that here, but allow it for Aix, Solaris and Windows slowdebug builds
+        // because the compiler ends up not inlining AllocateHeap.
         Boolean okToHaveAllocateHeap =
-            isSlowDebugBuild() && (Platform.isSolaris() || Platform.isWindows());
+            Platform.isSlowDebugBuild() &&
+            (Platform.isAix() || Platform.isSolaris() || Platform.isWindows());
         if (!okToHaveAllocateHeap) {
             output.shouldNotContain("AllocateHeap");
         }
--- a/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Tue Sep 13 11:32:45 2016 +0200
+++ b/hotspot/test/testlibrary_tests/TestMutuallyExclusivePlatformPredicates.java	Tue Aug 30 16:08:52 2016 +0200
@@ -50,8 +50,9 @@
         OS("isAix", "isLinux", "isOSX", "isSolaris", "isWindows"),
         VM_TYPE("isClient", "isServer", "isGraal", "isMinimal", "isZero", "isEmbedded"),
         MODE("isInt", "isMixed", "isComp"),
-        IGNORED("isDebugBuild", "shouldSAAttach",
-                "canPtraceAttachLinux", "canAttachOSX", "isTieredSupported");
+        IGNORED("isDebugBuild", "isFastDebugBuild", "isSlowDebugBuild",
+                "shouldSAAttach", "canPtraceAttachLinux", "canAttachOSX",
+                "isTieredSupported");
 
         public final List<String> methodNames;