Source: openjdk-11 Version: 11~17-2 Severity: normal Tags: patch upstream User: debian-sp...@lists.debian.org Usertags: sparc64
Hello! The two attached patches fix the openjdk-11 build on sparc64: - JDK-8203301 - https://bugs.openjdk.java.net/browse/JDK-8203301 - JDK-8203787 - https://bugs.openjdk.java.net/browse/JDK-8203787 The latter of the two bugs has already been fixed upstream, the first patch needs a second reviewer but I assume I can push the fix for the Flight Recorder regression this week once I have a second ack. Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
# HG changeset patch # User glaubitz # Date 1528818309 -7200 # Tue Jun 12 17:45:09 2018 +0200 # Node ID 8e5f28a9bab3fe554a2dc2c2e8970258f27d927a # Parent 04f4e983c2f77d935641f89668aa3c4ccf8bffdd 8203301: Linux-sparc fails to build after JDK-8199712 (Flight Recorder) diff -r 04f4e983c2f7 -r 8e5f28a9bab3 src/hotspot/cpu/sparc/vm_version_ext_sparc.cpp --- a/src/hotspot/cpu/sparc/vm_version_ext_sparc.cpp Tue Jun 12 07:52:30 2018 -0700 +++ b/src/hotspot/cpu/sparc/vm_version_ext_sparc.cpp Tue Jun 12 17:45:09 2018 +0200 @@ -31,10 +31,13 @@ int VM_Version_Ext::_no_of_threads = 0; int VM_Version_Ext::_no_of_cores = 0; int VM_Version_Ext::_no_of_sockets = 0; +#if defined(SOLARIS) kid_t VM_Version_Ext::_kcid = -1; +#endif char VM_Version_Ext::_cpu_name[CPU_TYPE_DESC_BUF_SIZE] = {0}; char VM_Version_Ext::_cpu_desc[CPU_DETAILED_DESC_BUF_SIZE] = {0}; +#if defined(SOLARIS) // get cpu information. It takes into account if the kstat chain id // has been changed and update the info if necessary. bool VM_Version_Ext::initialize_cpu_information(void) { @@ -144,6 +147,13 @@ kstat_close(kc); return true; } +#elif defined(LINUX) +// get cpu information. +bool VM_Version_Ext::initialize_cpu_information(void) { + // Not yet implemented. + return false; +} +#endif int VM_Version_Ext::number_of_threads(void) { initialize_cpu_information(); diff -r 04f4e983c2f7 -r 8e5f28a9bab3 src/hotspot/cpu/sparc/vm_version_ext_sparc.hpp --- a/src/hotspot/cpu/sparc/vm_version_ext_sparc.hpp Tue Jun 12 07:52:30 2018 -0700 +++ b/src/hotspot/cpu/sparc/vm_version_ext_sparc.hpp Tue Jun 12 17:45:09 2018 +0200 @@ -27,8 +27,11 @@ #include "utilities/macros.hpp" #include "vm_version_sparc.hpp" + +#if defined(SOLARIS) #include <kstat.h> #include <sys/processor.h> +#endif #define CPU_INFO "cpu_info" #define CPU_TYPE "fpu_type" @@ -45,7 +48,9 @@ static int _no_of_threads; static int _no_of_cores; static int _no_of_sockets; +#if defined(SOLARIS) static kid_t _kcid; +#endif static char _cpu_name[CPU_TYPE_DESC_BUF_SIZE]; static char _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE]; diff -r 04f4e983c2f7 -r 8e5f28a9bab3 src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp --- a/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp Tue Jun 12 07:52:30 2018 -0700 +++ b/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.cpp Tue Jun 12 17:45:09 2018 +0200 @@ -35,6 +35,13 @@ return frame(last_Java_sp(), frame::unpatchable, _anchor.last_Java_pc()); } +bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; + *fr_addr = frame((intptr_t*)uc->uc_mcontext.mc_i7, frame::unpatchable, + (address)uc->uc_mcontext.mc_gregs[MC_PC]); + return true; +} + // For Forte Analyzer AsyncGetCallTrace profiling support - thread is // currently interrupted by SIGPROF bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, diff -r 04f4e983c2f7 -r 8e5f28a9bab3 src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp --- a/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp Tue Jun 12 07:52:30 2018 -0700 +++ b/src/hotspot/os_cpu/linux_sparc/thread_linux_sparc.hpp Tue Jun 12 17:45:09 2018 +0200 @@ -85,8 +85,9 @@ _base_of_stack_pointer = sp; } - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, - bool isInJava); + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava); + + bool pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava); // These routines are only used on cpu architectures that // have separate register stacks (Itanium).
# HG changeset patch # User glaubitz # Date 1528196521 -7200 # Tue Jun 05 13:02:01 2018 +0200 # Node ID ee87876734c930d1dac3adedbcd5830177621e23 # Parent 4d6a5c267541768d62248d81e64cfeb94eeb8f20 8203787: Hotspot build broken on linux-sparc after 8202377 Reviewed-by: dholmes, eosterlund diff -r 4d6a5c267541 -r ee87876734c9 src/hotspot/share/opto/library_call.cpp --- a/src/hotspot/share/opto/library_call.cpp Tue Jun 05 09:29:15 2018 +0200 +++ b/src/hotspot/share/opto/library_call.cpp Tue Jun 05 13:02:01 2018 +0200 @@ -29,8 +29,9 @@ #include "classfile/vmSymbols.hpp" #include "compiler/compileBroker.hpp" #include "compiler/compileLog.hpp" +#include "gc/shared/barrierSet.hpp" +#include "jfr/support/jfrIntrinsics.hpp" #include "memory/resourceArea.hpp" -#include "jfr/support/jfrIntrinsics.hpp" #include "oops/objArrayKlass.hpp" #include "opto/addnode.hpp" #include "opto/arraycopynode.hpp" diff -r 4d6a5c267541 -r ee87876734c9 src/hotspot/share/opto/macroArrayCopy.cpp --- a/src/hotspot/share/opto/macroArrayCopy.cpp Tue Jun 05 09:29:15 2018 +0200 +++ b/src/hotspot/share/opto/macroArrayCopy.cpp Tue Jun 05 13:02:01 2018 +0200 @@ -23,6 +23,7 @@ */ #include "precompiled.hpp" +#include "gc/shared/barrierSet.hpp" #include "opto/arraycopynode.hpp" #include "oops/objArrayKlass.hpp" #include "opto/convertnode.hpp"