8224230: [PPC64, s390] Support AsyncGetCallTrace
Reviewed-by: goetz, jcbeyler, sspitsyn
--- a/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp Tue May 21 15:02:18 2019 +0530
+++ b/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp Tue May 21 11:45:37 2019 +0200
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2014 SAP SE. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. 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
@@ -92,9 +92,8 @@
return false;
}
-// Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/PPC.
+// Forte Analyzer AsyncGetCallTrace profiling support.
bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
- assert(this->is_Java_thread(), "must be JavaThread");
return pd_get_top_frame_for_profiling(fr_addr, ucontext, isInJava);
}
--- a/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp Tue May 21 15:02:18 2019 +0530
+++ b/src/hotspot/os_cpu/linux_s390/thread_linux_s390.cpp Tue May 21 11:45:37 2019 +0200
@@ -90,10 +90,9 @@
return false;
}
-// Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Linux/S390x.
+// Forte Analyzer AsyncGetCallTrace profiling support.
bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
- Unimplemented();
- return false;
+ return pd_get_top_frame_for_profiling(fr_addr, ucontext, isInJava);
}
void JavaThread::cache_global_variables() { }
--- a/src/hotspot/share/prims/forte.cpp Tue May 21 15:02:18 2019 +0530
+++ b/src/hotspot/share/prims/forte.cpp Tue May 21 11:45:37 2019 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, 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
@@ -70,7 +70,7 @@
// Native interfaces for use by Forte tools.
-#if !defined(IA64) && !defined(PPC64)
+#if !defined(IA64)
class vframeStreamForte : public vframeStreamCommon {
public:
@@ -639,16 +639,16 @@
#endif // !_WINDOWS
} // end extern "C"
-#endif // !IA64 && !PPC64
+#endif // !IA64
void Forte::register_stub(const char* name, address start, address end) {
-#if !defined(_WINDOWS) && !defined(IA64) && !defined(PPC64)
+#if !defined(_WINDOWS) && !defined(IA64)
assert(pointer_delta(end, start, sizeof(jbyte)) < INT_MAX,
"Code size exceeds maximum range");
collector_func_load((char*)name, NULL, NULL, start,
pointer_delta(end, start, sizeof(jbyte)), 0, NULL);
-#endif // !_WINDOWS && !IA64 && !PPC64
+#endif // !_WINDOWS && !IA64
}
#else // INCLUDE_JVMTI
--- a/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java Tue May 21 15:02:18 2019 +0530
+++ b/test/hotspot/jtreg/serviceability/AsyncGetCallTrace/MyPackage/ASGCTBaseTest.java Tue May 21 11:45:37 2019 +0200
@@ -29,7 +29,7 @@
* @summary Verifies that AsyncGetCallTrace is call-able and provides sane information.
* @compile ASGCTBaseTest.java
* @requires os.family == "linux"
- * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="sparc" | os.arch=="aarch64"
+ * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="sparc" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="s390"
* @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest
*/