From owner-svn-ports-all@freebsd.org Thu Dec 29 07:50:41 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED276C94D92; Thu, 29 Dec 2016 07:50:41 +0000 (UTC) (envelope-from glewis@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89FE517D9; Thu, 29 Dec 2016 07:50:41 +0000 (UTC) (envelope-from glewis@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBT7oeEX072217; Thu, 29 Dec 2016 07:50:40 GMT (envelope-from glewis@FreeBSD.org) Received: (from glewis@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBT7oe01072216; Thu, 29 Dec 2016 07:50:40 GMT (envelope-from glewis@FreeBSD.org) Message-Id: <201612290750.uBT7oe01072216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glewis set sender to glewis@FreeBSD.org using -f From: Greg Lewis Date: Thu, 29 Dec 2016 07:50:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r429875 - head/java/openjdk8/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2016 07:50:42 -0000 Author: glewis Date: Thu Dec 29 07:50:40 2016 New Revision: 429875 URL: https://svnweb.freebsd.org/changeset/ports/429875 Log: . Add support for the HotSpot Serviceability Agent for ppc64. . This also pulls in some OpenBSD tweaks, I believe. These should be a no-op for FreeBSD though. PR: 212709 (partial) Submitted by: Curtis Hamilton Modified: head/java/openjdk8/files/patch-bsd Modified: head/java/openjdk8/files/patch-bsd ============================================================================== --- head/java/openjdk8/files/patch-bsd Thu Dec 29 07:50:40 2016 (r429874) +++ head/java/openjdk8/files/patch-bsd Thu Dec 29 07:50:40 2016 (r429875) @@ -1,5 +1,5 @@ --- ./common/autoconf/build-performance.m4 Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/build-performance.m4 Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/build-performance.m4 Wed Dec 28 10:29:21 2016 -0800 @@ -41,6 +41,10 @@ # Looks like a MacOSX system NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` @@ -39,7 +39,7 @@ CCACHE= else --- ./common/autoconf/generated-configure.sh Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/generated-configure.sh Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/generated-configure.sh Wed Dec 28 10:29:21 2016 -0800 @@ -646,6 +646,8 @@ LIBM LIBZIP_CAN_USE_MMAP @@ -98,12 +98,21 @@ --with-x use the X Window System --with-cups specify prefix directory for the cups package (expecting the headers under PATH/include) +@@ -3672,7 +3681,7 @@ + + + # +-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 2011, 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 @@ -3880,7 +3889,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1449096260 -+DATE_WHEN_GENERATED=1460430898 ++DATE_WHEN_GENERATED=1482096439 ############################################################################### # @@ -192,6 +201,15 @@ OPENJDK_TARGET_CPU_OSARCH="i386" elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then # On all platforms except macosx, we replace x86_64 with amd64. +@@ -7985,7 +8028,7 @@ + INCLUDE_SA=false + fi + if test "x$VAR_CPU" = xppc64 ; then +- INCLUDE_SA=false ++ INCLUDE_SA=true + fi + if test "x$OPENJDK_TARGET_CPU" = xaarch64; then + INCLUDE_SA=false @@ -11174,6 +11217,24 @@ ############################################################################### @@ -325,7 +343,46 @@ fi if test "x$OPENJDK_TARGET_OS" = xlinux; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" -@@ -30261,11 +30341,18 @@ +@@ -29794,6 +29874,38 @@ + fi + if test "x$OPENJDK_TARGET_OS" = xbsd; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" ++ if test "`uname -s`" = "OpenBSD"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ld requires -z wxneeded" >&5 ++$as_echo_n "checking if ld requires -z wxneeded... " >&6; } ++ if test "$cross_compiling" = yes; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++ ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int main() { return mmap(0, 4096, PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) != MAP_FAILED; } ++_ACEOF ++if ac_fn_cxx_try_run "$LINENO"; then : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,wxneeded" ++ ++else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi ++ ++ fi + fi + if test "x$DEBUG_LEVEL" = xrelease; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" +@@ -30261,11 +30373,18 @@ fi if test "x$OPENJDK_TARGET_OS" = xbsd; then @@ -349,7 +406,7 @@ fi if test "x$OPENJDK" = "xfalse"; then -@@ -30301,14 +30388,18 @@ +@@ -30301,14 +30420,18 @@ # --x-libraries for the sysroot, if that seems to be correct. if test "x$SYS_ROOT" != "x/"; then if test "x$x_includes" = xNONE; then @@ -370,7 +427,7 @@ x_libraries="$SYS_ROOT/usr/X11R6/lib" elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then x_libraries="$SYS_ROOT/usr/lib64" -@@ -31355,6 +31446,10 @@ +@@ -31355,6 +31478,10 @@ # A CSW package seems to be installed! CUPS_FOUND=yes CUPS_CFLAGS="-I/opt/csw/include" @@ -381,7 +438,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5 $as_echo "$CUPS_FOUND" >&6; } -@@ -34520,7 +34615,7 @@ +@@ -34520,7 +34647,7 @@ ############################################################################### # @@ -390,7 +447,7 @@ # # Check whether --with-alsa was given. -@@ -34928,15 +35023,66 @@ +@@ -34928,15 +35055,66 @@ if test "x${with_giflib}" = "xbundled"; then USE_EXTERNAL_LIBGIF=false @@ -462,7 +519,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; } if ${ac_cv_lib_gif_DGifGetCode+:} false; then : -@@ -34974,16 +35120,96 @@ +@@ -34974,16 +35152,96 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; } if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then : @@ -569,7 +626,7 @@ USE_EXTERNAL_LIBGIF=true else -@@ -34991,6 +35217,8 @@ +@@ -34991,6 +35249,8 @@ fi @@ -578,7 +635,7 @@ ############################################################################### # # Check for the zlib library -@@ -35558,6 +35786,11 @@ +@@ -35558,6 +35818,11 @@ LIBCXX="-lstdc++" fi @@ -590,7 +647,7 @@ -@@ -35631,6 +35864,10 @@ +@@ -35631,6 +35896,10 @@ # Looks like a MacOSX system NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'` FOUND_CORES=yes @@ -601,7 +658,7 @@ elif test "x$OPENJDK_BUILD_OS" = xaix ; then NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'` FOUND_CORES=yes -@@ -35686,6 +35923,15 @@ +@@ -35686,6 +35955,15 @@ MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'` MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` FOUND_MEM=yes @@ -617,7 +674,7 @@ elif test "x$OPENJDK_BUILD_OS" = xwindows; then # Windows, but without cygwin MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` -@@ -36093,8 +36339,8 @@ +@@ -36093,8 +36371,8 @@ # precompiled headers. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5 $as_echo_n "checking if ccache supports precompiled headers... " >&6; } @@ -629,7 +686,16 @@ $as_echo "no, disabling ccache" >&6; } CCACHE= --- ./common/autoconf/jdk-options.m4 Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/jdk-options.m4 Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/jdk-options.m4 Wed Dec 28 10:29:21 2016 -0800 +@@ -159,7 +159,7 @@ + INCLUDE_SA=false + fi + if test "x$VAR_CPU" = xppc64 ; then +- INCLUDE_SA=false ++ INCLUDE_SA=true + fi + if test "x$OPENJDK_TARGET_CPU" = xaarch64; then + INCLUDE_SA=false @@ -410,6 +410,20 @@ ############################################################################### @@ -652,7 +718,7 @@ # AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC], --- ./common/autoconf/libraries.m4 Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/libraries.m4 Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/libraries.m4 Wed Dec 28 10:29:21 2016 -0800 @@ -69,9 +69,15 @@ fi @@ -791,7 +857,7 @@ AC_SUBST(LIBCXX) ]) --- ./common/autoconf/platform.m4 Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/platform.m4 Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/platform.m4 Wed Dec 28 10:29:21 2016 -0800 @@ -30,7 +30,7 @@ [ # First argument is the cpu name from the trip/quad @@ -852,7 +918,7 @@ elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then # On all platforms except macosx, we replace x86_64 with amd64. --- ./common/autoconf/spec.gmk.in Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/spec.gmk.in Mon Oct 24 19:45:12 2016 -0700 ++++ ./common/autoconf/spec.gmk.in Wed Dec 28 10:29:21 2016 -0800 @@ -76,6 +76,7 @@ OPENJDK_TARGET_OS:=@OPENJDK_TARGET_OS@ OPENJDK_TARGET_OS_API:=@OPENJDK_TARGET_OS_API@ @@ -877,197 +943,2121 @@ +# Build static libjli on bsd +BSD_STATIC_LIBJLI=@BSD_STATIC_LIBJLI@ + - # Necessary additional compiler flags to compile X11 - X_CFLAGS:=@X_CFLAGS@ - X_LIBS:=@X_LIBS@ -@@ -564,6 +568,8 @@ - ENABLE_INTREE_EC=@ENABLE_INTREE_EC@ - USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ - USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ -+GIFLIB_CFLAGS:=@GIFLIB_CFLAGS@ -+GIFLIB_LDFLAGS:=@GIFLIB_LDFLAGS@ - USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ - LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ - MSVCR_DLL:=@MSVCR_DLL@ ---- ./common/autoconf/toolchain.m4 Thu Sep 22 12:29:25 2016 -0700 -+++ ./common/autoconf/toolchain.m4 Mon Oct 24 19:45:12 2016 -0700 -@@ -72,7 +72,7 @@ - else - COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` - # Check that this is likely to be GCC. -- $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null -+ $COMPILER --version 2>&1 | $GREP -E "(Free Software Foundation|clang)" > /dev/null - if test $? -ne 0; then - AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.]) - AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) -@@ -350,6 +350,8 @@ - elif test "x$OPENJDK_TARGET_OS" = "xaix"; then - # Do not probe for cc on AIX. - COMPILER_CHECK_LIST="xlc_r" -+ elif test "`uname -s`" = "FreeBSD"; then -+ COMPILER_CHECK_LIST="cc gcc" - else - COMPILER_CHECK_LIST="gcc cc" - fi -@@ -571,7 +573,7 @@ - - # objcopy is used for moving debug symbols to separate files when - # full debug symbols are enabled. -- if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then -+ if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xbsd ; then - AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy]) - # Only call fixup if objcopy was found. - if test -n "$OBJCOPY"; then -@@ -634,8 +636,10 @@ - SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' - SET_SHARED_LIBRARY_MAPFILE='' - SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' -+ POST_STRIP_CMD="$STRIP -S" -+ fi -+ if test "x$OPENJDK_TARGET_OS" = xbsd || test "x$OPENJDK_TARGET_OS" = xmacosx; then - SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" -- POST_STRIP_CMD="$STRIP -S" - fi - else - if test "x$OPENJDK_TARGET_OS" = xsolaris; then -@@ -957,7 +961,7 @@ - # - case $COMPILER_NAME in - gcc ) -- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ -+ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses -Wno-sign-compare \ - -pipe \ - -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" - case $OPENJDK_TARGET_CPU_ARCH in -@@ -1039,22 +1043,33 @@ - CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" - - # The package path is used only on macosx? -- PACKAGE_PATH=/opt/local -+ AC_ARG_WITH(package-path, [AS_HELP_STRING([--with-package-path], -+ [package path to be used for location of third party packages])]) -+ PACKAGE_PATH="$with_package_path" -+ if test "x$PACKAGE_PATH" = x; then -+ if test "`uname -s`" = "Darwin"; then -+ PACKAGE_PATH=/opt/local -+ fi + # Necessary additional compiler flags to compile X11 + X_CFLAGS:=@X_CFLAGS@ + X_LIBS:=@X_LIBS@ +@@ -564,6 +568,8 @@ + ENABLE_INTREE_EC=@ENABLE_INTREE_EC@ + USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@ + USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@ ++GIFLIB_CFLAGS:=@GIFLIB_CFLAGS@ ++GIFLIB_LDFLAGS:=@GIFLIB_LDFLAGS@ + USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@ + LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@ + MSVCR_DLL:=@MSVCR_DLL@ +--- ./common/autoconf/toolchain.m4 Thu Sep 22 12:29:25 2016 -0700 ++++ ./common/autoconf/toolchain.m4 Wed Dec 28 10:29:21 2016 -0800 +@@ -72,7 +72,7 @@ + else + COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` + # Check that this is likely to be GCC. +- $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null ++ $COMPILER --version 2>&1 | $GREP -E "(Free Software Foundation|clang)" > /dev/null + if test $? -ne 0; then + AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.]) + AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) +@@ -350,6 +350,8 @@ + elif test "x$OPENJDK_TARGET_OS" = "xaix"; then + # Do not probe for cc on AIX. + COMPILER_CHECK_LIST="xlc_r" ++ elif test "`uname -s`" = "FreeBSD"; then ++ COMPILER_CHECK_LIST="cc gcc" + else + COMPILER_CHECK_LIST="gcc cc" + fi +@@ -571,7 +573,7 @@ + + # objcopy is used for moving debug symbols to separate files when + # full debug symbols are enabled. +- if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then ++ if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xbsd ; then + AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy]) + # Only call fixup if objcopy was found. + if test -n "$OBJCOPY"; then +@@ -634,8 +636,10 @@ + SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' + SET_SHARED_LIBRARY_MAPFILE='' + SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' ++ POST_STRIP_CMD="$STRIP -S" ++ fi ++ if test "x$OPENJDK_TARGET_OS" = xbsd || test "x$OPENJDK_TARGET_OS" = xmacosx; then + SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" +- POST_STRIP_CMD="$STRIP -S" + fi + else + if test "x$OPENJDK_TARGET_OS" = xsolaris; then +@@ -957,7 +961,7 @@ + # + case $COMPILER_NAME in + gcc ) +- CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ ++ CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses -Wno-sign-compare \ + -pipe \ + -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" + case $OPENJDK_TARGET_CPU_ARCH in +@@ -1039,22 +1043,33 @@ + CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" + + # The package path is used only on macosx? +- PACKAGE_PATH=/opt/local ++ AC_ARG_WITH(package-path, [AS_HELP_STRING([--with-package-path], ++ [package path to be used for location of third party packages])]) ++ PACKAGE_PATH="$with_package_path" ++ if test "x$PACKAGE_PATH" = x; then ++ if test "`uname -s`" = "Darwin"; then ++ PACKAGE_PATH=/opt/local ++ fi ++ ++ if test "`uname -s`" = "FreeBSD"; then ++ PACKAGE_PATH=/usr/local ++ fi ++ ++ if test "`uname -s`" = "NetBSD"; then ++ PACKAGE_PATH=/usr/pkg ++ fi ++ ++ if test "`uname -s`" = "OpenBSD"; then ++ PACKAGE_PATH=/usr/local ++ fi ++ fi ++ + AC_SUBST(PACKAGE_PATH) + + if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then +- # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the +- # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN +- # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). +- # Note: -Dmacro is the same as #define macro 1 +- # -Dmacro= is the same as #define macro +- if test "x$OPENJDK_TARGET_OS" = xsolaris; then +- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" +- else +- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" +- fi ++ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_LITTLE_ENDIAN" + else +- CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" ++ CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DVM_BIG_ENDIAN" + fi + if test "x$OPENJDK_TARGET_OS" = xlinux; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" +@@ -1084,6 +1099,22 @@ + fi + if test "x$OPENJDK_TARGET_OS" = xbsd; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" ++ if test "`uname -s`" = "OpenBSD"; then ++ AC_MSG_CHECKING([if ld requires -z wxneeded]) ++ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include ++int main() { return mmap(0, 4096, PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) != MAP_FAILED; }]])], ++ [ ++ AC_MSG_RESULT([yes]) ++ LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,wxneeded" ++ ], ++ [ ++ AC_MSG_RESULT([no]) ++ ], ++ [ ++ AC_MSG_RESULT([no]) ++ ] ++ ) ++ fi + fi + if test "x$DEBUG_LEVEL" = xrelease; then + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" +--- ./configure Thu Sep 22 12:29:25 2016 -0700 ++++ ./configure Wed Dec 28 10:29:21 2016 -0800 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # + # Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +--- ./make/Javadoc.gmk Thu Sep 22 12:29:25 2016 -0700 ++++ ./make/Javadoc.gmk Wed Dec 28 10:29:21 2016 -0800 +@@ -46,8 +46,18 @@ + + BUILD_NUMBER=$(JDK_BUILD_NUMBER) + ++ifeq ($(OPENJDK_TARGET_OS_VENDOR), openbsd) ++ ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) ++ JAVADOC_CMD_MEM = "-Xmx768m" ++ else ++ JAVADOC_CMD_MEM = "-Xmx1024m" ++ endif ++else ++ JAVADOC_CMD_MEM = "-Xmx1024m" ++endif ++ + JAVADOC_CMD = $(JAVA) \ +- -Xmx1024m \ ++ $(JAVADOC_CMD_MEM) \ + -Djava.awt.headless=true \ + $(NEW_JAVADOC) \ + -bootclasspath $(JDK_OUTPUTDIR)/classes +--- ./make/Main.gmk Thu Sep 22 12:29:25 2016 -0700 ++++ ./make/Main.gmk Wed Dec 28 10:29:21 2016 -0800 +@@ -58,7 +58,11 @@ + + # Setup number of jobs to use. -jN is unfortunately not available for us to parse from the command line, + # hence this workaround. ++ifdef JOBS ++ifneq ($(JOBS),0) + MAKE_ARGS:=$(MAKE_ARGS) -j$(JOBS) ++endif ++endif + + ### Main targets + +--- ./make/common/MakeBase.gmk Thu Sep 22 12:29:25 2016 -0700 ++++ ./make/common/MakeBase.gmk Wed Dec 28 10:29:21 2016 -0800 +@@ -338,7 +338,7 @@ + # (and causing a crash on Cygwin). + # Default shell seems to always be /bin/sh. Must override with bash to get this to work on Solaris. + # Only use time if it's GNU time which supports format and output file. +- WRAPPER_SHELL:=/bin/bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log /bin/bash ++ WRAPPER_SHELL:=bash $$(SRC_ROOT)/common/bin/shell-tracer.sh $$(if $$(findstring yes,$$(IS_GNU_TIME)),$$(TIME),-) $$(OUTPUT_ROOT)/build-trace-time.log bash + SHELL=$$(warning $$(if $$@,Building $$@,Running shell command) $$(if $$<, (from $$<))$$(if $$?, ($$(wordlist 1, 20, $$?) $$(if $$(wordlist 21, 22, $$?), ... [in total $$(words $$?) files]) newer)))$$(WRAPPER_SHELL) + endif + # Never remove warning messages; this is just for completeness +@@ -365,8 +365,8 @@ + + # This is to be called by all SetupFoo macros + define LogSetupMacroEntry +- $(if $(27),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk)) +- $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26,$(if $($i),$(NEWLINE) $(strip [$i] $($i)))))) ++ $(if $(30),$(error Internal makefile error: Too many arguments to LogSetupMacroEntry, please update MakeBase.gmk)) ++ $(if $(findstring $(LOG_LEVEL),debug trace), $(info $1 $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29,$(if $($i),$(NEWLINE) $(strip [$i] $($i)))))) + endef + + # Make directory without forking mkdir if not needed +--- ./make/common/NativeCompilation.gmk Thu Sep 22 12:29:25 2016 -0700 ++++ ./make/common/NativeCompilation.gmk Wed Dec 28 10:29:21 2016 -0800 +@@ -151,9 +151,9 @@ + # CC the compiler to use, default is $(CC) + # LDEXE the linker to use for linking executables, default is $(LDEXE) + # OPTIMIZATION sets optimization level to NONE, LOW, HIGH, HIGHEST +- $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) +- $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26)) +- $(if $(27),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk)) ++ $(foreach i,2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29, $(if $($i),$1_$(strip $($i)))$(NEWLINE)) ++ $(call LogSetupMacroEntry,SetupNativeCompilation($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15),$(16),$(17),$(18),$(19),$(20),$(21),$(22),$(23),$(24),$(25),$(26),$(27),$(28),$(29)) ++ $(if $(30),$(error Internal makefile error: Too many arguments to SetupNativeCompilation, please update NativeCompilation.gmk)) + + ifneq (,$$($1_BIN)) + $$(error BIN has been replaced with OBJECT_DIR) +--- ./hotspot/agent/make/Makefile Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/make/Makefile Wed Dec 28 10:28:45 2016 -0800 +@@ -50,6 +50,7 @@ + sun.jvm.hotspot.debugger.amd64 \ + sun.jvm.hotspot.debugger.bsd \ + sun.jvm.hotspot.debugger.bsd.amd64 \ ++sun.jvm.hotspot.debugger.bsd.ppc64 \ + sun.jvm.hotspot.debugger.bsd.x86 \ + sun.jvm.hotspot.debugger.cdbg \ + sun.jvm.hotspot.debugger.cdbg.basic \ +@@ -61,12 +62,15 @@ + sun.jvm.hotspot.debugger.linux.x86 \ + sun.jvm.hotspot.debugger.posix \ + sun.jvm.hotspot.debugger.posix.elf \ ++sun.jvm.hotspot.debugger.ppc64 \ + sun.jvm.hotspot.debugger.proc \ + sun.jvm.hotspot.debugger.proc.amd64 \ ++sun.jvm.hotspot.debugger.proc.ppc64 \ + sun.jvm.hotspot.debugger.proc.sparc \ + sun.jvm.hotspot.debugger.proc.x86 \ + sun.jvm.hotspot.debugger.remote \ + sun.jvm.hotspot.debugger.remote.amd64 \ ++sun.jvm.hotspot.debugger.remote.ppc64 \ + sun.jvm.hotspot.debugger.remote.sparc \ + sun.jvm.hotspot.debugger.remote.x86 \ + sun.jvm.hotspot.debugger.sparc \ +@@ -90,12 +94,14 @@ + sun.jvm.hotspot.runtime.amd64 \ + sun.jvm.hotspot.runtime.bsd \ + sun.jvm.hotspot.runtime.bsd_amd64 \ ++sun.jvm.hotspot.runtime.bsd_ppc64 \ + sun.jvm.hotspot.runtime.bsd_x86 \ + sun.jvm.hotspot.runtime.linux \ + sun.jvm.hotspot.runtime.linux_amd64 \ + sun.jvm.hotspot.runtime.linux_sparc \ + sun.jvm.hotspot.runtime.linux_x86 \ + sun.jvm.hotspot.runtime.posix \ ++sun.jvm.hotspot.runtime.ppc64 \ + sun.jvm.hotspot.runtime.solaris_amd64 \ + sun.jvm.hotspot.runtime.solaris_sparc \ + sun.jvm.hotspot.runtime.solaris_x86 \ +@@ -135,6 +141,7 @@ + sun/jvm/hotspot/debugger/amd64/*.java \ + sun/jvm/hotspot/debugger/bsd/*.java \ + sun/jvm/hotspot/debugger/bsd/amd64/*.java \ ++sun/jvm/hotspot/debugger/bsd/ppc64/*.java \ + sun/jvm/hotspot/debugger/bsd/x86/*.java \ + sun/jvm/hotspot/debugger/cdbg/*.java \ + sun/jvm/hotspot/debugger/cdbg/basic/*.java \ +@@ -145,12 +152,15 @@ + sun/jvm/hotspot/debugger/linux/x86/*.java \ + sun/jvm/hotspot/debugger/posix/*.java \ + sun/jvm/hotspot/debugger/posix/elf/*.java \ ++sun/jvm/hotspot/debugger/ppc64/*.java \ + sun/jvm/hotspot/debugger/proc/*.java \ + sun/jvm/hotspot/debugger/proc/amd64/*.java \ ++sun/jvm/hotspot/debugger/proc/ppc64/*.java \ + sun/jvm/hotspot/debugger/proc/sparc/*.java \ + sun/jvm/hotspot/debugger/proc/x86/*.java \ + sun/jvm/hotspot/debugger/remote/*.java \ + sun/jvm/hotspot/debugger/remote/amd64/*.java \ ++sun/jvm/hotspot/debugger/remote/ppc64/*.java \ + sun/jvm/hotspot/debugger/remote/sparc/*.java \ + sun/jvm/hotspot/debugger/remote/x86/*.java \ + sun/jvm/hotspot/debugger/sparc/*.java \ +@@ -171,12 +181,14 @@ + sun/jvm/hotspot/runtime/amd64/*.java \ + sun/jvm/hotspot/runtime/bsd/*.java \ + sun/jvm/hotspot/runtime/bsd_amd64/*.java \ ++sun/jvm/hotspot/runtime/bsd_ppc64/*.java \ + sun/jvm/hotspot/runtime/bsd_x86/*.java \ + sun/jvm/hotspot/runtime/linux/*.java \ + sun/jvm/hotspot/runtime/linux_amd64/*.java \ + sun/jvm/hotspot/runtime/linux_sparc/*.java \ + sun/jvm/hotspot/runtime/linux_x86/*.java \ + sun/jvm/hotspot/runtime/posix/*.java \ ++sun/jvm/hotspot/runtime/ppc64/*.java \ + sun/jvm/hotspot/runtime/solaris_amd64/*.java \ + sun/jvm/hotspot/runtime/solaris_sparc/*.java \ + sun/jvm/hotspot/runtime/solaris_x86/*.java \ +--- ./hotspot/agent/src/os/bsd/BsdDebuggerLocal.c Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/src/os/bsd/BsdDebuggerLocal.c Wed Dec 28 10:28:45 2016 -0800 +@@ -42,6 +42,10 @@ + #include "sun_jvm_hotspot_debugger_sparc_SPARCThreadContext.h" + #endif + ++#ifdef ppc64 ++#include "sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext.h" ++#endif ++ + static jfieldID p_ps_prochandle_ID = 0; + static jfieldID threadList_ID = 0; + static jfieldID loadObjectList_ID = 0; +@@ -307,6 +311,9 @@ + #if defined(sparc) || defined(sparcv9) + #define NPRGREG sun_jvm_hotspot_debugger_sparc_SPARCThreadContext_NPRGREG + #endif ++#ifdef ppc64 ++#define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG ++#endif + + array = (*env)->NewLongArray(env, NPRGREG); + CHECK_EXCEPTION_(0); +@@ -407,6 +414,46 @@ + regs[REG_INDEX(R_O7)] = gregs.u_regs[14]; + #endif /* sparc */ + ++#if defined(ppc64) || defined(ppc64le) ++#define REG_INDEX(reg) sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_##reg ++ ++ regs[REG_INDEX(LR)] = gregs.lr; ++ regs[REG_INDEX(PC)] = gregs.pc; ++ regs[REG_INDEX(R0)] = gregs.fixreg[0]; ++ regs[REG_INDEX(R1)] = gregs.fixreg[1]; ++ regs[REG_INDEX(R2)] = gregs.fixreg[2]; ++ regs[REG_INDEX(R3)] = gregs.fixreg[3]; ++ regs[REG_INDEX(R4)] = gregs.fixreg[4]; ++ regs[REG_INDEX(R5)] = gregs.fixreg[5]; ++ regs[REG_INDEX(R6)] = gregs.fixreg[6]; ++ regs[REG_INDEX(R7)] = gregs.fixreg[7]; ++ regs[REG_INDEX(R8)] = gregs.fixreg[8]; ++ regs[REG_INDEX(R9)] = gregs.fixreg[9]; ++ regs[REG_INDEX(R10)] = gregs.fixreg[10]; ++ regs[REG_INDEX(R11)] = gregs.fixreg[11]; ++ regs[REG_INDEX(R12)] = gregs.fixreg[12]; ++ regs[REG_INDEX(R13)] = gregs.fixreg[13]; ++ regs[REG_INDEX(R14)] = gregs.fixreg[14]; ++ regs[REG_INDEX(R15)] = gregs.fixreg[15]; ++ regs[REG_INDEX(R16)] = gregs.fixreg[16]; ++ regs[REG_INDEX(R17)] = gregs.fixreg[17]; ++ regs[REG_INDEX(R18)] = gregs.fixreg[18]; ++ regs[REG_INDEX(R19)] = gregs.fixreg[19]; ++ regs[REG_INDEX(R20)] = gregs.fixreg[20]; ++ regs[REG_INDEX(R21)] = gregs.fixreg[21]; ++ regs[REG_INDEX(R22)] = gregs.fixreg[22]; ++ regs[REG_INDEX(R23)] = gregs.fixreg[23]; ++ regs[REG_INDEX(R24)] = gregs.fixreg[24]; ++ regs[REG_INDEX(R25)] = gregs.fixreg[25]; ++ regs[REG_INDEX(R26)] = gregs.fixreg[26]; ++ regs[REG_INDEX(R27)] = gregs.fixreg[27]; ++ regs[REG_INDEX(R28)] = gregs.fixreg[28]; ++ regs[REG_INDEX(R29)] = gregs.fixreg[29]; ++ regs[REG_INDEX(R30)] = gregs.fixreg[30]; ++ regs[REG_INDEX(R31)] = gregs.fixreg[31]; ++ ++#endif ++ + + (*env)->ReleaseLongArrayElements(env, array, regs, JNI_COMMIT); + return array; +--- ./hotspot/agent/src/os/bsd/symtab.c Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/src/os/bsd/symtab.c Wed Dec 28 10:28:45 2016 -0800 +@@ -211,6 +211,10 @@ + + // Reading of elf header + struct elf_section *scn_cache = NULL; ++#if defined(ppc64) ++ struct elf_section *opd_sect = NULL; ++ ELF_SHDR *opd = NULL; ++#endif + int cnt = 0; + ELF_SHDR* shbuf = NULL; + ELF_SHDR* cursct = NULL; +@@ -258,6 +262,14 @@ + cursct++; + } + ++#if defined(ppc64) ++ opd_sect = find_section_by_name(".opd", fd, &ehdr, scn_cache); ++ if (opd_sect != NULL && opd_sect->c_data != NULL && opd_sect->c_shdr != NULL) { ++ // plausibility check ++ opd = opd_sect->c_shdr; ++ } ++#endif ++ + if (!symtab_found && dynsym_found) + symsection = SHT_DYNSYM; + +@@ -322,6 +334,13 @@ + symtab->symbols[j].name = sym_name; + symtab->symbols[j].offset = syms->st_value - baseaddr; + symtab->symbols[j].size = syms->st_size; ++#if defined(ppc64) ++ if (opd != NULL && *sym_name != '.' && ++ (opd->sh_addr <= syms->st_value && syms->st_value <= opd->sh_addr + opd->sh_size)) ++ symtab->symbols[j].offset = ++ ((ELF_ADDR*)opd_sect->c_data)[(syms->st_value - opd->sh_addr) / sizeof(ELF_ADDR*)] - baseaddr; ++ else ++#endif + + key.data = sym_name; + key.size = strlen(sym_name) + 1; +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java Wed Dec 28 10:28:45 2016 -0800 +@@ -33,6 +33,7 @@ + import sun.jvm.hotspot.debugger.JVMDebugger; + import sun.jvm.hotspot.debugger.MachineDescription; + import sun.jvm.hotspot.debugger.MachineDescriptionAMD64; ++import sun.jvm.hotspot.debugger.MachineDescriptionPPC64; + import sun.jvm.hotspot.debugger.MachineDescriptionIA64; + import sun.jvm.hotspot.debugger.MachineDescriptionIntelX86; + import sun.jvm.hotspot.debugger.MachineDescriptionSPARC32Bit; +@@ -588,6 +589,8 @@ + machDesc = new MachineDescriptionIA64(); + } else if (cpu.equals("amd64")) { + machDesc = new MachineDescriptionAMD64(); ++ } else if (cpu.equals("ppc64")) { ++ machDesc = new MachineDescriptionPPC64(); + } else if (cpu.equals("sparc")) { + if (LinuxDebuggerLocal.getAddressSize()==8) { + machDesc = new MachineDescriptionSPARC64Bit(); +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/MachineDescriptionPPC64.java Wed Dec 28 10:28:45 2016 -0800 +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2014, 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++package sun.jvm.hotspot.debugger; ++ ++public class MachineDescriptionPPC64 extends MachineDescriptionTwosComplement implements MachineDescription { ++ public long getAddressSize() { ++ return 8; ++ } ++ ++ public boolean isLP64() { ++ return true; ++ } ++ ++ public boolean isBigEndian() { ++ String endian = System.getProperty("sun.cpu.endian"); ++ if (endian.equals("big")) ++ return true; ++ else ++ return false; ++ } ++} +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java Wed Dec 28 10:28:45 2016 -0800 +@@ -30,8 +30,10 @@ + import sun.jvm.hotspot.debugger.cdbg.*; + import sun.jvm.hotspot.debugger.x86.*; + import sun.jvm.hotspot.debugger.amd64.*; ++import sun.jvm.hotspot.debugger.ppc64.*; + import sun.jvm.hotspot.debugger.bsd.x86.*; + import sun.jvm.hotspot.debugger.bsd.amd64.*; ++import sun.jvm.hotspot.debugger.bsd.ppc64.*; + import sun.jvm.hotspot.utilities.*; + + class BsdCDebugger implements CDebugger { +@@ -97,6 +99,13 @@ + Address pc = context.getRegisterAsAddress(AMD64ThreadContext.RIP); + if (pc == null) return null; + return new BsdAMD64CFrame(dbg, rbp, pc); ++ } else if (cpu.equals("ppc64")) { ++ PPC64ThreadContext context = (PPC64ThreadContext) thread.getContext(); ++ Address sp = context.getRegisterAsAddress(PPC64ThreadContext.SP); ++ if (sp == null) return null; ++ Address pc = context.getRegisterAsAddress(PPC64ThreadContext.PC); ++ if (pc == null) return null; ++ return new BsdPPC64CFrame(dbg, sp, pc, BsdDebuggerLocal.getAddressSize()); + } else { + throw new DebuggerException(cpu + " is not yet supported"); + } +--- ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java Thu Sep 22 12:50:50 2016 -0700 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java Wed Dec 28 10:28:45 2016 -0800 +@@ -27,6 +27,7 @@ + import sun.jvm.hotspot.debugger.*; + import sun.jvm.hotspot.debugger.bsd.amd64.*; + import sun.jvm.hotspot.debugger.bsd.x86.*; ++import sun.jvm.hotspot.debugger.bsd.ppc64.*; + + class BsdThreadContextFactory { + static ThreadContext createThreadContext(BsdDebugger dbg) { +@@ -35,6 +36,8 @@ + return new BsdX86ThreadContext(dbg); + } else if (cpu.equals("amd64") || cpu.equals("x86_64")) { + return new BsdAMD64ThreadContext(dbg); ++ } else if (cpu.equals("ppc64")) { ++ return new BsdPPC64ThreadContext(dbg); + } else { + throw new RuntimeException("cpu " + cpu + " is not yet supported"); + } +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/ppc64/BsdPPC64CFrame.java Wed Dec 28 10:28:45 2016 -0800 +@@ -0,0 +1,79 @@ ++/* ++ * Copyright (c) 2014, 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++package sun.jvm.hotspot.debugger.bsd.ppc64; ++ ++import sun.jvm.hotspot.debugger.*; ++import sun.jvm.hotspot.debugger.ppc64.*; ++import sun.jvm.hotspot.debugger.bsd.*; ++import sun.jvm.hotspot.debugger.cdbg.*; ++import sun.jvm.hotspot.debugger.cdbg.basic.*; ++ ++final public class BsdPPC64CFrame extends BasicCFrame { ++ // package/class internals only ++ ++ public BsdPPC64CFrame(BsdDebugger dbg, Address sp, Address pc, int address_size) { ++ super(dbg.getCDebugger()); ++ this.sp = sp; ++ this.pc = pc; ++ this.dbg = dbg; ++ this.address_size=address_size; ++ } ++ ++ // override base class impl to avoid ELF parsing ++ public ClosestSymbol closestSymbolToPC() { ++ // try native lookup in debugger. ++ return dbg.lookup(dbg.getAddressValue(pc())); ++ } ++ ++ public Address pc() { ++ return pc; ++ } ++ ++ public Address localVariableBase() { ++ return sp; ++ } ++ ++ public CFrame sender(ThreadProxy thread) { ++ if (sp == null) { ++ return null; ++ } ++ ++ Address nextSP = sp.getAddressAt(0); ++ if (nextSP == null) { ++ return null; ++ } ++ Address nextPC = sp.getAddressAt(2 * address_size); ++ if (nextPC == null) { ++ return null; ++ } ++ return new BsdPPC64CFrame(dbg, nextSP, nextPC, address_size); ++ } ++ ++ public static int PPC64_STACK_BIAS = 0; ++ private static int address_size; ++ private Address pc; ++ private Address sp; ++ private BsdDebugger dbg; ++} +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/ppc64/BsdPPC64ThreadContext.java Wed Dec 28 10:28:45 2016 -0800 +@@ -0,0 +1,46 @@ ++/* ++ * Copyright (c) 2014, 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++package sun.jvm.hotspot.debugger.bsd.ppc64; ++ ++import sun.jvm.hotspot.debugger.*; ++import sun.jvm.hotspot.debugger.ppc64.*; ++import sun.jvm.hotspot.debugger.bsd.*; ++ ++public class BsdPPC64ThreadContext extends PPC64ThreadContext { ++ private BsdDebugger debugger; ++ ++ public BsdPPC64ThreadContext(BsdDebugger debugger) { ++ super(); ++ this.debugger = debugger; ++ } ++ ++ public void setRegisterAsAddress(int index, Address value) { ++ setRegister(index, debugger.getAddressValue(value)); ++ } ++ ++ public Address getRegisterAsAddress(int index) { ++ return debugger.newAddress(getRegister(index)); ++ } ++} +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ ./hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ppc64/PPC64ThreadContext.java Wed Dec 28 10:28:45 2016 -0800 +@@ -0,0 +1,123 @@ ++/* ++ * Copyright (c) 2014, 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 ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++package sun.jvm.hotspot.debugger.ppc64; ++ ++import sun.jvm.hotspot.debugger.*; ++import sun.jvm.hotspot.debugger.cdbg.*; ++ ++/** Specifies the thread context on ppc64 platforms; only a sub-portion ++ * of the context is guaranteed to be present on all operating ++ * systems. */ ++ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***