Merge
This commit is contained in:
commit
bd2e25b952
@ -357,3 +357,4 @@ f900d5afd9c83a0df8f36161c27c5e4c86a66f4c jdk-9+111
|
||||
03543a758cd5890f2266e4b9678378a925dde22a jdk-9+112
|
||||
55b6d550828d1223b364e6ead4a56e56411c56df jdk-9+113
|
||||
1d992540870ff33fe6cc550443388588df9b9e4f jdk-9+114
|
||||
09617ce980b99d49abfd54dacfed353c47e2a115 jdk-9+115
|
||||
|
@ -749,8 +749,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
BASIC_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
# Add extra search paths on solaris for utilities like ar and as etc...
|
||||
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
|
||||
# Add extra search paths on solaris for utilities like ar, as, dtrace etc...
|
||||
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
@ -777,7 +777,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
AC_MSG_RESULT([in default location])
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
@ -1037,6 +1037,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
BASIC_PATH_PROGS(HG, hg)
|
||||
BASIC_PATH_PROGS(STAT, stat)
|
||||
BASIC_PATH_PROGS(TIME, time)
|
||||
BASIC_PATH_PROGS(DTRACE, dtrace)
|
||||
BASIC_PATH_PROGS(PATCH, [gpatch patch])
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
|
@ -364,6 +364,9 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
elif test "x$ICECC" != "x"; then
|
||||
AC_MSG_RESULT([no, does not work effectively with icecc])
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
AC_MSG_RESULT([no, does not work with Solaris Studio])
|
||||
USE_PRECOMPILED_HEADER=0
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
@ -57,6 +57,12 @@ OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
|
||||
OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
|
||||
OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
|
||||
|
||||
HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
|
||||
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@
|
||||
HOTSPOT_TARGET_CPU := @HOTSPOT_BUILD_CPU@
|
||||
HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_BUILD_CPU_ARCH@
|
||||
HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_BUILD_CPU_DEFINE@
|
||||
|
||||
CFLAGS_JDKLIB := @OPENJDK_BUILD_CFLAGS_JDKLIB@
|
||||
CXXFLAGS_JDKLIB := @OPENJDK_BUILD_CXXFLAGS_JDKLIB@
|
||||
LDFLAGS_JDKLIB := @OPENJDK_BUILD_LDFLAGS_JDKLIB@
|
||||
@ -65,6 +71,11 @@ CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@
|
||||
LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS := @OPENJDK_BUILD_CPU_JLI_CFLAGS@
|
||||
|
||||
JVM_CFLAGS := @OPENJDK_BUILD_JVM_CFLAGS@
|
||||
JVM_LDFLAGS := @OPENJDK_BUILD_JVM_LDFLAGS@
|
||||
JVM_ASFLAGS := @OPENJDK_BUILD_JVM_ASFLAGS@
|
||||
JVM_LIBS := @OPENJDK_BUILD_JVM_LIBS@
|
||||
|
||||
# The compiler for the build platform is likely not warning compatible with the official
|
||||
# compiler.
|
||||
WARNINGS_AS_ERRORS := false
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
|
||||
|
||||
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
||||
sexport OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
|
||||
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
|
||||
export OPENJDK_TARGET_CPU_LIBDIR="@OPENJDK_TARGET_CPU_LIBDIR@"
|
||||
export DEBUG_LEVEL="@DEBUG_LEVEL@"
|
||||
|
2
common/autoconf/configure
vendored
2
common/autoconf/configure
vendored
@ -283,7 +283,7 @@ Additional (non-autoconf) OpenJDK Options:
|
||||
|
||||
EOT
|
||||
|
||||
# Print additional help, e.g. a list of toolchains.
|
||||
# Print additional help, e.g. a list of toolchains and JVM features.
|
||||
# This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $conf_script_to_run PRINTF=printf )
|
||||
|
||||
|
@ -95,10 +95,8 @@ JDKOPT_SETUP_OPEN_OR_CUSTOM
|
||||
|
||||
# These are needed to be able to create a configuration name (and thus the output directory)
|
||||
JDKOPT_SETUP_JDK_VARIANT
|
||||
HOTSPOT_SETUP_JVM_INTERPRETER
|
||||
HOTSPOT_SETUP_JVM_VARIANTS
|
||||
JDKOPT_SETUP_DEBUG_LEVEL
|
||||
HOTSPOT_SETUP_DEBUG_LEVEL
|
||||
HOTSPOT_SETUP_JVM_VARIANTS
|
||||
|
||||
# With basic setup done, call the custom early hook.
|
||||
CUSTOM_EARLY_HOOK
|
||||
@ -135,7 +133,6 @@ BASIC_SETUP_DEFAULT_MAKE_TARGET
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
JDKOPT_SETUP_JLINK_OPTIONS
|
||||
HOTSPOT_SETUP_HOTSPOT_OPTIONS
|
||||
JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
###############################################################################
|
||||
@ -207,6 +204,10 @@ FLAGS_SETUP_COMPILER_FLAGS_MISC
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
JDKOPT_SETUP_CODE_COVERAGE
|
||||
|
||||
# Need toolchain to setup dtrace
|
||||
HOTSPOT_SETUP_DTRACE
|
||||
HOTSPOT_SETUP_JVM_FEATURES
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
@ -225,7 +226,7 @@ LIB_SETUP_LIBRARIES
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
HOTSPOT_SETUP_BUILD_TWEAKS
|
||||
HOTSPOT_SETUP_LEGACY_BUILD
|
||||
JDKOPT_DETECT_INTREE_EC
|
||||
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
|
||||
@ -268,6 +269,9 @@ BASIC_TEST_USABILITY_ISSUES
|
||||
# At the end, call the custom hook. (Dummy macro if no custom sources available)
|
||||
CUSTOM_LATE_HOOK
|
||||
|
||||
# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
|
||||
HOTSPOT_VALIDATE_JVM_FEATURES
|
||||
|
||||
# We're messing a bit with internal autoconf variables to put the config.status
|
||||
# in the output directory instead of the current directory.
|
||||
CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -119,6 +119,8 @@ apt_help() {
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
dtrace)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -170,6 +172,13 @@ AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
|
||||
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
|
||||
$PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
|
||||
done
|
||||
$PRINTF "\n"
|
||||
|
||||
# Print available jvm features
|
||||
$PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
|
||||
$PRINTF "Which are valid to use depends on the target platform.\n "
|
||||
$PRINTF "%s " $VALID_JVM_FEATURES
|
||||
$PRINTF "\n"
|
||||
|
||||
# And now exit directly
|
||||
exit 0
|
||||
@ -206,7 +215,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "* Debug level: $DEBUG_LEVEL\n"
|
||||
printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
|
||||
printf "* JDK variant: $JDK_VARIANT\n"
|
||||
printf "* JVM variants: $with_jvm_variants\n"
|
||||
printf "* JVM variants: $JVM_VARIANTS\n"
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
|
||||
|
||||
@ -232,7 +241,7 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
fi
|
||||
printf "\n"
|
||||
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
|
||||
printf "NOTE: You have requested to build more than one version of the JVM, which\n"
|
||||
printf "will result in longer build times.\n"
|
||||
printf "\n"
|
||||
|
@ -38,6 +38,16 @@ include $(BASE_SPEC)
|
||||
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
|
||||
@BUILD_HEADLESS@
|
||||
|
||||
JVM_VARIANTS:=@JVM_VARIANTS_COMMA@
|
||||
|
||||
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
|
||||
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
|
||||
JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
|
||||
JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
|
||||
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
|
||||
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
|
||||
JVM_VARIANT_CUSTOM:=@JVM_VARIANT_HOTSPOT@
|
||||
|
||||
# Legacy setting: OPT or DBG
|
||||
VARIANT:=@VARIANT@
|
||||
# Legacy setting: true or false
|
||||
@ -92,8 +102,7 @@ LLVM_LDFLAGS=@LLVM_LDFLAGS@
|
||||
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR)
|
||||
ALT_EXPORT_PATH=$(HOTSPOT_DIST)
|
||||
|
||||
JVM_INTERPRETER:=@JVM_INTERPRETER@
|
||||
ifeq ($(JVM_INTERPRETER), cpp)
|
||||
ifeq ($(HOTSPOT_TARGET_CPU), zero)
|
||||
CC_INTERP=true
|
||||
endif
|
||||
|
||||
|
@ -23,170 +23,344 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Check which interpreter of the JVM we want to build.
|
||||
# Currently we have:
|
||||
# template: Template interpreter (the default)
|
||||
# cpp : C++ interpreter
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_INTERPRETER],
|
||||
[
|
||||
AC_ARG_WITH([jvm-interpreter], [AS_HELP_STRING([--with-jvm-interpreter],
|
||||
[JVM interpreter to build (template, cpp) @<:@template@:>@])])
|
||||
# All valid JVM features, regardless of platform
|
||||
VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
|
||||
fprof vm-structs jni-check services management all-gcs nmt cds static-build"
|
||||
|
||||
AC_MSG_CHECKING([which interpreter of the JVM to build])
|
||||
if test "x$with_jvm_interpreter" = x; then
|
||||
JVM_INTERPRETER="template"
|
||||
else
|
||||
JVM_INTERPRETER="$with_jvm_interpreter"
|
||||
fi
|
||||
AC_MSG_RESULT([$JVM_INTERPRETER])
|
||||
|
||||
if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
|
||||
AC_MSG_ERROR([The available JVM interpreters are: template, cpp])
|
||||
fi
|
||||
|
||||
AC_SUBST(JVM_INTERPRETER)
|
||||
])
|
||||
# All valid JVM variants
|
||||
VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
|
||||
|
||||
###############################################################################
|
||||
# Check which variants of the JVM that we want to build.
|
||||
# Currently we have:
|
||||
# server: normal interpreter and a C2 or tiered C1/C2 compiler
|
||||
# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
|
||||
# minimal1: reduced form of client with optional VM services and features stripped out
|
||||
# zero: no machine code interpreter, no compiler
|
||||
# zeroshark: zero interpreter and shark/llvm compiler backend
|
||||
# core: interpreter only, no compiler (only works on some platforms)
|
||||
# Check if the specified JVM variant should be built. To be used in shell if
|
||||
# constructs, like this:
|
||||
# if HOTSPOT_CHECK_JVM_VARIANT(server); then
|
||||
#
|
||||
# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
|
||||
|
||||
# Definition kept in one line to allow inlining in if statements.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
|
||||
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Check if the specified JVM features are explicitly enabled. To be used in
|
||||
# shell if constructs, like this:
|
||||
# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
|
||||
#
|
||||
# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
|
||||
|
||||
# Definition kept in one line to allow inlining in if statements.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
|
||||
[ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Check which variants of the JVM that we want to build. Available variants are:
|
||||
# server: normal interpreter, and a tiered C1/C2 compiler
|
||||
# client: normal interpreter, and C1 (no C2 compiler)
|
||||
# minimal: reduced form of client with optional features stripped out
|
||||
# core: normal interpreter only, no compiler
|
||||
# zero: C++ based interpreter only, no compiler
|
||||
# zeroshark: C++ based interpreter, and a llvm-based compiler
|
||||
# custom: baseline JVM with no default features
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
[
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
|
||||
[JVM variants (separated by commas) to build (server, client, minimal1, zero, zeroshark, core) @<:@server@:>@])])
|
||||
[JVM variants (separated by commas) to build (server,client,minimal,core,zero,zeroshark,custom) @<:@server@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
with_jvm_variants="server"
|
||||
fi
|
||||
JVM_VARIANTS_OPT="$with_jvm_variants"
|
||||
|
||||
JVM_VARIANTS=",$with_jvm_variants,"
|
||||
TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/minimal1,//' -e 's/zero,//' -e 's/zeroshark,//' -e 's/core,//'`
|
||||
|
||||
if test "x$TEST_VARIANTS" != "x,"; then
|
||||
AC_MSG_ERROR([The available JVM variants are: server, client, minimal1, zero, zeroshark, core])
|
||||
fi
|
||||
AC_MSG_RESULT([$with_jvm_variants])
|
||||
|
||||
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
|
||||
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
|
||||
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
|
||||
JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
|
||||
|
||||
if test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Replace the commas with AND for use in the build directory name.
|
||||
ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
|
||||
COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/' -e 's/core,/1/'`
|
||||
if test "x$COUNT_VARIANTS" != "x,1"; then
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=yes
|
||||
# Has the user listed more than one variant?
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
if [ [[ "$JVM_VARIANTS_OPT" =~ "," ]] ]; then
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=true
|
||||
else
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=no
|
||||
BUILDING_MULTIPLE_JVM_VARIANTS=false
|
||||
fi
|
||||
# Replace the commas with AND for use in the build directory name.
|
||||
JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
|
||||
|
||||
AC_MSG_CHECKING([which variants of the JVM to build])
|
||||
# JVM_VARIANTS is a space-separated list.
|
||||
# Also use minimal, not minimal1 (which is kept for backwards compatibility).
|
||||
JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
|
||||
AC_MSG_RESULT([$JVM_VARIANTS])
|
||||
|
||||
# Check that the selected variants are valid
|
||||
|
||||
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
|
||||
INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
|
||||
if test "x$INVALID_VARIANTS" != x; then
|
||||
AC_MSG_NOTICE([Unknown variant(s) specified: $INVALID_VARIANTS])
|
||||
AC_MSG_ERROR([The available JVM variants are: $VALID_JVM_VARIANTS])
|
||||
fi
|
||||
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xyes; then
|
||||
AC_MSG_ERROR([You cannot build multiple variants with zero.])
|
||||
# All "special" variants share the same output directory ("server")
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
|
||||
INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.])
|
||||
fi
|
||||
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_MINIMAL1)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
AC_SUBST(JVM_VARIANT_CORE)
|
||||
AC_SUBST(VALID_JVM_VARIANTS)
|
||||
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
# zero behaves as a platform and rewrites these values. This is really weird. :(
|
||||
# We are guaranteed that we do not build any other variants when building zero.
|
||||
HOTSPOT_TARGET_CPU=zero
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if dtrace should be enabled and has all prerequisites present.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_DTRACE],
|
||||
[
|
||||
# Test for dtrace dependencies
|
||||
AC_ARG_ENABLE([dtrace], [AS_HELP_STRING([--enable-dtrace@<:@=yes/no/auto@:>@],
|
||||
[enable dtrace. Default is auto, where dtrace is enabled if all dependencies
|
||||
are present.])])
|
||||
|
||||
DTRACE_DEP_MISSING=false
|
||||
|
||||
AC_MSG_CHECKING([for dtrace tool])
|
||||
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_RESULT([$DTRACE])
|
||||
else
|
||||
AC_MSG_RESULT([not found, cannot build dtrace])
|
||||
DTRACE_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([sys/sdt.h], [DTRACE_HEADERS_OK=yes],[DTRACE_HEADERS_OK=no])
|
||||
if test "x$DTRACE_HEADERS_OK" != "xyes"; then
|
||||
DTRACE_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if dtrace should be built])
|
||||
if test "x$enable_dtrace" = "xyes"; then
|
||||
if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
HELP_MSG_MISSING_DEPENDENCY([dtrace])
|
||||
AC_MSG_ERROR([Cannot enable dtrace with missing dependencies. See above. $HELP_MSG])
|
||||
else
|
||||
INCLUDE_DTRACE=true
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
fi
|
||||
elif test "x$enable_dtrace" = "xno"; then
|
||||
INCLUDE_DTRACE=false
|
||||
AC_MSG_RESULT([no, forced])
|
||||
elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
|
||||
INCLUDE_DTRACE=false
|
||||
AC_MSG_RESULT([no, non-open linux build])
|
||||
elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
|
||||
INCLUDE_DTRACE=false
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
else
|
||||
INCLUDE_DTRACE=true
|
||||
AC_MSG_RESULT([yes, dependencies present])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
|
||||
fi
|
||||
AC_SUBST(INCLUDE_DTRACE)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Set up all JVM features for each JVM variant.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
[
|
||||
# The user can in some cases supply additional jvm features. For the custom
|
||||
# variant, this defines the entire variant.
|
||||
AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
|
||||
[additional JVM features to enable (separated by comma), use '--help' to show possible values @<:@none@:>@])])
|
||||
if test "x$with_jvm_features" != x; then
|
||||
AC_MSG_CHECKING([additional JVM features])
|
||||
JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
|
||||
AC_MSG_RESULT([$JVM_FEATURES])
|
||||
fi
|
||||
|
||||
# Verify that dependencies are met for explicitly set features.
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! HOTSPOT_CHECK_JVM_FEATURE(compiler2); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(compiler2) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'compiler2' requires feature 'all-gcs'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(vm-structs) && ! HOTSPOT_CHECK_JVM_FEATURE(all-gcs); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'vm-structs' requires feature 'all-gcs'])
|
||||
fi
|
||||
|
||||
# Turn on additional features based on other parts of configure
|
||||
if test "x$INCLUDE_DTRACE" = "xtrue"; then
|
||||
JVM_FEATURES="$JVM_FEATURES dtrace"
|
||||
else
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
|
||||
AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$STATIC_BUILD" = "xtrue"; then
|
||||
JVM_FEATURES="$JVM_FEATURES static-build"
|
||||
else
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
|
||||
AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zero) && ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(zero); then
|
||||
AC_MSG_ERROR([To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark])
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(shark); then
|
||||
AC_MSG_ERROR([To enable shark, you must use --with-jvm-variants=zeroshark])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
JVM_FEATURES_jvmci="jvmci"
|
||||
else
|
||||
JVM_FEATURES_jvmci=""
|
||||
fi
|
||||
|
||||
# All variants but minimal (and custom) get these features
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
|
||||
|
||||
# Enable features depending on variant.
|
||||
JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
|
||||
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
|
||||
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_custom="$JVM_FEATURES"
|
||||
|
||||
AC_SUBST(JVM_FEATURES_server)
|
||||
AC_SUBST(JVM_FEATURES_client)
|
||||
AC_SUBST(JVM_FEATURES_core)
|
||||
AC_SUBST(JVM_FEATURES_minimal)
|
||||
AC_SUBST(JVM_FEATURES_zero)
|
||||
AC_SUBST(JVM_FEATURES_zeroshark)
|
||||
AC_SUBST(JVM_FEATURES_custom)
|
||||
|
||||
# Used for verification of Makefiles by check-jvm-feature
|
||||
AC_SUBST(VALID_JVM_FEATURES)
|
||||
|
||||
# We don't support --with-jvm-interpreter anymore, use zero instead.
|
||||
BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Validate JVM features once all setup is complete, including custom setup.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_VALIDATE_JVM_FEATURES],
|
||||
[
|
||||
# Keep feature lists sorted and free of duplicates
|
||||
JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
|
||||
JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
|
||||
JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
|
||||
JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
|
||||
JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
|
||||
JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
|
||||
JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
|
||||
|
||||
# Validate features
|
||||
for variant in $JVM_VARIANTS; do
|
||||
AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
|
||||
features_var_name=JVM_FEATURES_$variant
|
||||
JVM_FEATURES_TO_TEST=${!features_var_name}
|
||||
AC_MSG_RESULT([$JVM_FEATURES_TO_TEST])
|
||||
INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
|
||||
if test "x$INVALID_FEATURES" != x; then
|
||||
AC_MSG_ERROR([Invalid JVM feature(s): $INVALID_FEATURES])
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Support for old hotspot build. Remove once new hotspot build has proven
|
||||
# to work satisfactory.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_LEGACY_BUILD],
|
||||
[
|
||||
AC_ARG_ENABLE(new-hotspot-build, [AS_HELP_STRING([--disable-new-hotspot-build],
|
||||
[disable the new hotspot build system (use the old) @<:@enabled@:>@])])
|
||||
|
||||
if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
|
||||
USE_NEW_HOTSPOT_BUILD=true
|
||||
else
|
||||
USE_NEW_HOTSPOT_BUILD=false
|
||||
fi
|
||||
AC_SUBST(USE_NEW_HOTSPOT_BUILD)
|
||||
|
||||
case $HOTSPOT_DEBUG_LEVEL in
|
||||
product )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
;;
|
||||
fastdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="true"
|
||||
DEBUG_CLASSFILES="true"
|
||||
;;
|
||||
debug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="true"
|
||||
;;
|
||||
optimized )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(VARIANT)
|
||||
AC_SUBST(FASTDEBUG)
|
||||
AC_SUBST(DEBUG_CLASSFILES)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
MACOSX_UNIVERSAL="true"
|
||||
fi
|
||||
|
||||
AC_SUBST(MACOSX_UNIVERSAL)
|
||||
])
|
||||
|
||||
# Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
|
||||
JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
|
||||
|
||||
###############################################################################
|
||||
# Setup legacy vars/targets and new vars to deal with different debug levels.
|
||||
#
|
||||
# release: no debug information, all optimizations, no asserts.
|
||||
# optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
|
||||
# fastdebug: debug information (-g), all optimizations, all asserts
|
||||
# slowdebug: debug information (-g), no optimizations, all asserts
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_DEBUG_LEVEL],
|
||||
[
|
||||
case $DEBUG_LEVEL in
|
||||
release )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
BUILD_VARIANT_RELEASE=""
|
||||
HOTSPOT_DEBUG_LEVEL="product"
|
||||
HOTSPOT_EXPORT="product"
|
||||
;;
|
||||
fastdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="true"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-fastdebug"
|
||||
HOTSPOT_DEBUG_LEVEL="fastdebug"
|
||||
HOTSPOT_EXPORT="fastdebug"
|
||||
;;
|
||||
slowdebug )
|
||||
VARIANT="DBG"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="true"
|
||||
BUILD_VARIANT_RELEASE="-debug"
|
||||
HOTSPOT_DEBUG_LEVEL="debug"
|
||||
HOTSPOT_EXPORT="debug"
|
||||
;;
|
||||
optimized )
|
||||
VARIANT="OPT"
|
||||
FASTDEBUG="false"
|
||||
DEBUG_CLASSFILES="false"
|
||||
BUILD_VARIANT_RELEASE="-optimized"
|
||||
HOTSPOT_DEBUG_LEVEL="optimized"
|
||||
HOTSPOT_EXPORT="optimized"
|
||||
;;
|
||||
esac
|
||||
|
||||
# The debug level 'optimized' is a little special because it is currently only
|
||||
# applicable to the HotSpot build where it means to build a completely
|
||||
# optimized version of the VM without any debugging code (like for the
|
||||
# 'release' debug level which is called 'product' in the HotSpot build) but
|
||||
# with the exception that it can contain additional code which is otherwise
|
||||
# protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
|
||||
# test new and/or experimental features which are not intended for customer
|
||||
# shipment. Because these new features need to be tested and benchmarked in
|
||||
# real world scenarios, we want to build the containing JDK at the 'release'
|
||||
# debug level.
|
||||
if test "x$DEBUG_LEVEL" = xoptimized; then
|
||||
DEBUG_LEVEL="release"
|
||||
fi
|
||||
JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
|
||||
JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
|
||||
JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
|
||||
JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
|
||||
JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
|
||||
JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
|
||||
|
||||
#####
|
||||
# Generate the legacy makefile targets for hotspot.
|
||||
# The hotspot api for selecting the build artifacts, really, needs to be improved.
|
||||
# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
|
||||
# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
|
||||
# But until then ...
|
||||
HOTSPOT_TARGET=""
|
||||
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
@ -213,27 +387,19 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_DEBUG_LEVEL],
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
|
||||
fi
|
||||
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
|
||||
HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
|
||||
|
||||
# On Macosx universal binaries are produced, but they only contain
|
||||
# 64 bit intel. This invalidates control of which jvms are built
|
||||
# from configure, but only server is valid anyway. Fix this
|
||||
# when hotspot makefiles are rewritten.
|
||||
if test "x$MACOSX_UNIVERSAL" = xtrue; then
|
||||
HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
|
||||
HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
|
||||
fi
|
||||
|
||||
#####
|
||||
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
|
||||
AC_SUBST(HOTSPOT_MAKE_ARGS)
|
||||
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
AC_SUBST(VARIANT)
|
||||
AC_SUBST(FASTDEBUG)
|
||||
AC_SUBST(DEBUG_CLASSFILES)
|
||||
AC_SUBST(BUILD_VARIANT_RELEASE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_HOTSPOT_OPTIONS],
|
||||
[
|
||||
# Control wether Hotspot runs Queens test after build.
|
||||
AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build],
|
||||
[run the Queens test after Hotspot build @<:@disabled@:>@])],,
|
||||
@ -244,10 +410,29 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_HOTSPOT_OPTIONS],
|
||||
TEST_IN_BUILD=false
|
||||
fi
|
||||
AC_SUBST(TEST_IN_BUILD)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_BUILD_TWEAKS],
|
||||
[
|
||||
HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
|
||||
AC_SUBST(HOTSPOT_MAKE_ARGS)
|
||||
if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
|
||||
if test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
AC_MSG_ERROR([You cannot build a minimal JVM for a 64-bit machine.])
|
||||
fi
|
||||
fi
|
||||
if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot build a custom JVM using the old hotspot build system.])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JVM_VARIANTS_COMMA)
|
||||
AC_SUBST(JVM_VARIANT_SERVER)
|
||||
AC_SUBST(JVM_VARIANT_CLIENT)
|
||||
AC_SUBST(JVM_VARIANT_MINIMAL1)
|
||||
AC_SUBST(JVM_VARIANT_HOTSPOT)
|
||||
AC_SUBST(JVM_VARIANT_ZERO)
|
||||
AC_SUBST(JVM_VARIANT_ZEROSHARK)
|
||||
AC_SUBST(JVM_VARIANT_CORE)
|
||||
])
|
||||
|
@ -81,6 +81,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
|
||||
test "x$DEBUG_LEVEL" != xslowdebug; then
|
||||
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug, slowdebug and optimized])
|
||||
fi
|
||||
|
||||
# Translate DEBUG_LEVEL to debug level used by Hotspot
|
||||
HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
HOTSPOT_DEBUG_LEVEL="product"
|
||||
elif test "x$DEBUG_LEVEL" = xslowdebug; then
|
||||
HOTSPOT_DEBUG_LEVEL="debug"
|
||||
fi
|
||||
|
||||
if test "x$DEBUG_LEVEL" = xoptimized; then
|
||||
# The debug level 'optimized' is a little special because it is currently only
|
||||
# applicable to the HotSpot build where it means to build a completely
|
||||
# optimized version of the VM without any debugging code (like for the
|
||||
# 'release' debug level which is called 'product' in the HotSpot build) but
|
||||
# with the exception that it can contain additional code which is otherwise
|
||||
# protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
|
||||
# test new and/or experimental features which are not intended for customer
|
||||
# shipment. Because these new features need to be tested and benchmarked in
|
||||
# real world scenarios, we want to build the containing JDK at the 'release'
|
||||
# debug level.
|
||||
DEBUG_LEVEL="release"
|
||||
fi
|
||||
|
||||
AC_SUBST(HOTSPOT_DEBUG_LEVEL)
|
||||
AC_SUBST(DEBUG_LEVEL)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@ -178,10 +203,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
|
||||
# Should we build the serviceability agent (SA)?
|
||||
INCLUDE_SA=true
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
|
||||
INCLUDE_SA=false
|
||||
fi
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
INCLUDE_SA=false
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix ; then
|
||||
|
@ -72,6 +72,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_SUBST(PRODUCT_SUFFIX)
|
||||
AC_SUBST(JDK_RC_PLATFORM_NAME)
|
||||
AC_SUBST(COMPANY_NAME)
|
||||
AC_SUBST(HOTSPOT_VM_DISTRO)
|
||||
AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
|
||||
AC_SUBST(MACOSX_BUNDLE_ID_BASE)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2016, 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
|
||||
@ -88,13 +88,25 @@ AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
|
||||
# If dynamic was requested, it's available since it would fail above otherwise.
|
||||
# If dynamic wasn't requested, go with static unless it isn't available.
|
||||
AC_MSG_CHECKING([how to link with libstdc++])
|
||||
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
LIBCXX="$LIBCXX -lstdc++"
|
||||
# To help comparisons with old build, put stdc++ first in JVM_LIBS
|
||||
JVM_LIBS="-lstdc++ $JVM_LIBS"
|
||||
# Ideally, we should test stdc++ for the BUILD toolchain separately. For now
|
||||
# just use the same setting as for the TARGET toolchain.
|
||||
OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
|
||||
LDCXX="$CXX"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=false"
|
||||
AC_MSG_RESULT([dynamic])
|
||||
else
|
||||
LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
|
||||
# To help comparisons with old build, put stdc++ first in JVM_LIBS
|
||||
JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
|
||||
# Ideally, we should test stdc++ for the BUILD toolchain separately. For now
|
||||
# just use the same setting as for the TARGET toolchain.
|
||||
OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
|
||||
OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
|
||||
LDCXX="$CC"
|
||||
STATIC_CXX_SETTING="STATIC_CXX=true"
|
||||
AC_MSG_RESULT([static])
|
||||
|
@ -74,7 +74,7 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
fi
|
||||
|
||||
# Check if ffi is needed
|
||||
if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero) || HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
NEEDS_LIB_FFI=true
|
||||
else
|
||||
NEEDS_LIB_FFI=false
|
||||
@ -102,7 +102,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_LLVM],
|
||||
[
|
||||
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zeroshark); then
|
||||
AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config])
|
||||
|
||||
if test "x$LLVM_CONFIG" != xllvm-config; then
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2016, 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
|
||||
@ -273,169 +273,173 @@ AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
|
||||
# Setup the legacy variables, for controlling the old makefiles.
|
||||
#
|
||||
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
||||
[
|
||||
PLATFORM_SETUP_LEGACY_VARS_HELPER([TARGET])
|
||||
PLATFORM_SETUP_LEGACY_VARS_HELPER([BUILD])
|
||||
|
||||
# ZERO_ARCHDEF is used to enable architecture-specific code.
|
||||
# This is used in legacy hotspot build.
|
||||
ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
|
||||
AC_SUBST(ZERO_ARCHDEF)
|
||||
|
||||
])
|
||||
|
||||
# $1 - Either TARGET or BUILD to setup the variables for.
|
||||
AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
[
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY="i586"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_LEGACY="$OPENJDK_$1_CPU"
|
||||
if test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
OPENJDK_$1_CPU_LEGACY="i586"
|
||||
elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
# On all platforms except MacOSX replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_LEGACY="amd64"
|
||||
OPENJDK_$1_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY)
|
||||
AC_SUBST(OPENJDK_$1_CPU_LEGACY)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
|
||||
OPENJDK_$1_CPU_LEGACY_LIB="$OPENJDK_$1_CPU"
|
||||
if test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
OPENJDK_$1_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LEGACY_LIB)
|
||||
AC_SUBST(OPENJDK_$1_CPU_LEGACY_LIB)
|
||||
|
||||
# This is the name of the cpu (but using i386 and amd64 instead of
|
||||
# x86 and x86_64, respectively), preceeded by a /, to be used when
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_CPU_LIBDIR=""
|
||||
OPENJDK_$1_CPU_LIBDIR="/$OPENJDK_$1_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
OPENJDK_$1_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
AC_SUBST(OPENJDK_$1_CPU_LIBDIR)
|
||||
|
||||
# Now do the same for OPENJDK_BUILD_CPU...
|
||||
# Also store the legacy naming of the cpu.
|
||||
# Ie i586 and amd64 instead of x86 and x86_64
|
||||
OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_LEGACY="i586"
|
||||
elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
# On all platforms except MacOSX replace x86_64 with amd64.
|
||||
OPENJDK_BUILD_CPU_LEGACY="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LEGACY)
|
||||
|
||||
# And the second legacy naming of the cpu.
|
||||
# Ie i386 and amd64 instead of x86 and x86_64.
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
|
||||
elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LEGACY_LIB)
|
||||
|
||||
# This is the name of the cpu (but using i386 and amd64 instead of
|
||||
# x86 and x86_64, respectively), preceeded by a /, to be used when
|
||||
# locating libraries. On macosx, it's empty, though.
|
||||
OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
OPENJDK_BUILD_CPU_LIBDIR=""
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_LIBDIR)
|
||||
|
||||
# OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
|
||||
# OPENJDK_$1_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
|
||||
# /amd64 or /sparcv9. This string is appended to some library paths, like this:
|
||||
# /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_TARGET_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
|
||||
OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
|
||||
# /usr/lib${OPENJDK_$1_CPU_ISADIR}/libexample.so
|
||||
OPENJDK_$1_CPU_ISADIR=""
|
||||
if test "x$OPENJDK_$1_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_ISADIR="/amd64"
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
|
||||
OPENJDK_$1_CPU_ISADIR="/sparcv9"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_ISADIR)
|
||||
AC_SUBST(OPENJDK_$1_CPU_ISADIR)
|
||||
|
||||
# Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
|
||||
OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
# Setup OPENJDK_$1_CPU_OSARCH, which is used to set the os.arch Java system property
|
||||
OPENJDK_$1_CPU_OSARCH="$OPENJDK_$1_CPU"
|
||||
if test "x$OPENJDK_$1_OS" = xlinux && test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
# On linux only, we replace x86 with i386.
|
||||
OPENJDK_TARGET_CPU_OSARCH="i386"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_OSARCH="i386"
|
||||
elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_OSARCH="amd64"
|
||||
OPENJDK_$1_CPU_OSARCH="amd64"
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_OSARCH)
|
||||
AC_SUBST(OPENJDK_$1_CPU_OSARCH)
|
||||
|
||||
OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI="i386"
|
||||
elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
OPENJDK_$1_CPU_JLI="$OPENJDK_$1_CPU"
|
||||
if test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
OPENJDK_$1_CPU_JLI="i386"
|
||||
elif test "x$OPENJDK_$1_OS" != xmacosx && test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_TARGET_CPU_JLI="amd64"
|
||||
OPENJDK_$1_CPU_JLI="amd64"
|
||||
fi
|
||||
# Now setup the -D flags for building libjli.
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
|
||||
OPENJDK_$1_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_$1_CPU_JLI\"'"
|
||||
if test "x$OPENJDK_$1_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_$1_CPU_ARCH" = xsparc; then
|
||||
OPENJDK_$1_CPU_JLI_CFLAGS="$OPENJDK_$1_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
|
||||
elif test "x$OPENJDK_$1_CPU_ARCH" = xx86; then
|
||||
OPENJDK_$1_CPU_JLI_CFLAGS="$OPENJDK_$1_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_CPU_JLI_CFLAGS)
|
||||
AC_SUBST(OPENJDK_$1_CPU_JLI_CFLAGS)
|
||||
|
||||
OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
|
||||
if test "x$OPENJDK_BUILD_CPU" = xx86; then
|
||||
OPENJDK_BUILD_CPU_JLI="i386"
|
||||
elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
|
||||
# On all platforms except macosx, we replace x86_64 with amd64.
|
||||
OPENJDK_BUILD_CPU_JLI="amd64"
|
||||
fi
|
||||
# Now setup the -D flags for building libjli.
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
|
||||
elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
|
||||
OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(OPENJDK_BUILD_CPU_JLI_CFLAGS)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR=macosx
|
||||
if test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
OPENJDK_$1_OS_EXPORT_DIR=macosx
|
||||
else
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
|
||||
OPENJDK_$1_OS_EXPORT_DIR=${OPENJDK_$1_OS_TYPE}
|
||||
fi
|
||||
AC_SUBST(OPENJDK_TARGET_OS_EXPORT_DIR)
|
||||
AC_SUBST(OPENJDK_$1_OS_EXPORT_DIR)
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
if test "x$OPENJDK_$1_CPU_BITS" = x64; then
|
||||
A_LP64="LP64:="
|
||||
# -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
|
||||
# unpack200.exe
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ADD_LP64="-D_LP64=1"
|
||||
if test "x$OPENJDK_$1_OS" = xlinux || test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
OPENJDK_$1_ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LP64,$A_LP64)
|
||||
if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
|
||||
if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$COMPILE_TYPE" = "xcross"; then
|
||||
# FIXME: ... or should this include reduced builds..?
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
|
||||
DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_$1_CPU_LEGACY"
|
||||
else
|
||||
DEFINE_CROSS_COMPILE_ARCH=""
|
||||
fi
|
||||
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
|
||||
|
||||
# ZERO_ARCHDEF is used to enable architecture-specific code
|
||||
case "${OPENJDK_TARGET_CPU}" in
|
||||
ppc) ZERO_ARCHDEF=PPC32 ;;
|
||||
ppc64) ZERO_ARCHDEF=PPC64 ;;
|
||||
s390*) ZERO_ARCHDEF=S390 ;;
|
||||
sparc*) ZERO_ARCHDEF=SPARC ;;
|
||||
x86_64*) ZERO_ARCHDEF=AMD64 ;;
|
||||
x86) ZERO_ARCHDEF=IA32 ;;
|
||||
*) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
|
||||
esac
|
||||
AC_SUBST(ZERO_ARCHDEF)
|
||||
# Convert openjdk platform names to hotspot names
|
||||
|
||||
HOTSPOT_$1_OS=${OPENJDK_$1_OS}
|
||||
if test "x$OPENJDK_$1_OS" = xmacosx; then
|
||||
HOTSPOT_$1_OS=bsd
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_$1_OS)
|
||||
|
||||
HOTSPOT_$1_OS_TYPE=${OPENJDK_$1_OS_TYPE}
|
||||
if test "x$OPENJDK_$1_OS_TYPE" = xunix; then
|
||||
HOTSPOT_$1_OS_TYPE=posix
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_$1_OS_TYPE)
|
||||
|
||||
HOTSPOT_$1_CPU=${OPENJDK_$1_CPU}
|
||||
if test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
HOTSPOT_$1_CPU=x86_32
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
|
||||
HOTSPOT_$1_CPU=sparc
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64; then
|
||||
HOTSPOT_$1_CPU=ppc_64
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
|
||||
HOTSPOT_$1_CPU=ppc_64
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_$1_CPU)
|
||||
|
||||
# This is identical with OPENJDK_*, but define anyway for consistency.
|
||||
HOTSPOT_$1_CPU_ARCH=${OPENJDK_$1_CPU_ARCH}
|
||||
AC_SUBST(HOTSPOT_$1_CPU_ARCH)
|
||||
|
||||
# Setup HOTSPOT_$1_CPU_DEFINE
|
||||
if test "x$OPENJDK_$1_CPU" = xx86; then
|
||||
HOTSPOT_$1_CPU_DEFINE=IA32
|
||||
elif test "x$OPENJDK_$1_CPU" = xx86_64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=AMD64
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
|
||||
HOTSPOT_$1_CPU_DEFINE=SPARC
|
||||
elif test "x$OPENJDK_$1_CPU" = xaarch64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=AARCH64
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
|
||||
# The cpu defines below are for zero, we don't support them directly.
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparc; then
|
||||
HOTSPOT_$1_CPU_DEFINE=SPARC
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC32
|
||||
elif test "x$OPENJDK_$1_CPU" = xs390; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = ss390x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_$1_CPU_DEFINE)
|
||||
|
||||
])
|
||||
|
||||
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
|
||||
@ -521,6 +525,10 @@ AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
||||
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
|
||||
|
||||
JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
|
||||
JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
@ -542,6 +550,11 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
fi
|
||||
|
||||
# Make compilation sanity check
|
||||
AC_CHECK_HEADERS([stdio.h], , [
|
||||
|
@ -82,6 +82,13 @@ OPENJDK_TARGET_CPU_OSARCH:=@OPENJDK_TARGET_CPU_OSARCH@
|
||||
OPENJDK_TARGET_CPU_JLI_CFLAGS:=@OPENJDK_TARGET_CPU_JLI_CFLAGS@
|
||||
OPENJDK_TARGET_OS_EXPORT_DIR:=@OPENJDK_TARGET_OS_EXPORT_DIR@
|
||||
|
||||
HOTSPOT_TARGET_OS := @HOTSPOT_TARGET_OS@
|
||||
HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_TARGET_OS_TYPE@
|
||||
|
||||
HOTSPOT_TARGET_CPU := @HOTSPOT_TARGET_CPU@
|
||||
HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_TARGET_CPU_ARCH@
|
||||
HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_TARGET_CPU_DEFINE@
|
||||
|
||||
# We are building on this build system.
|
||||
# When not cross-compiling, it is the same as the target.
|
||||
OPENJDK_BUILD_OS:=@OPENJDK_BUILD_OS@
|
||||
@ -192,6 +199,7 @@ PRODUCT_NAME:=@PRODUCT_NAME@
|
||||
PRODUCT_SUFFIX:=@PRODUCT_SUFFIX@
|
||||
JDK_RC_PLATFORM_NAME:=@JDK_RC_PLATFORM_NAME@
|
||||
COMPANY_NAME:=@COMPANY_NAME@
|
||||
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
|
||||
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
|
||||
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
|
||||
USERNAME:=@USERNAME@
|
||||
@ -201,11 +209,32 @@ RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
|
||||
|
||||
# How to compile the code: release, fastdebug or slowdebug
|
||||
DEBUG_LEVEL:=@DEBUG_LEVEL@
|
||||
HOTSPOT_DEBUG_LEVEL:=@HOTSPOT_DEBUG_LEVEL@
|
||||
|
||||
# This is the JDK variant to build.
|
||||
# The JDK variant is a name for a specific set of modules to be compiled for the JDK.
|
||||
JDK_VARIANT:=@JDK_VARIANT@
|
||||
|
||||
# Which JVM variants to build (space-separated list)
|
||||
JVM_VARIANTS := @JVM_VARIANTS@
|
||||
|
||||
# Lists of features per variant. Only relevant for the variants listed in
|
||||
# JVM_VARIANTS.
|
||||
JVM_FEATURES_server := @JVM_FEATURES_server@
|
||||
JVM_FEATURES_client := @JVM_FEATURES_client@
|
||||
JVM_FEATURES_core := @JVM_FEATURES_core@
|
||||
JVM_FEATURES_minimal := @JVM_FEATURES_minimal@
|
||||
JVM_FEATURES_zero := @JVM_FEATURES_zero@
|
||||
JVM_FEATURES_zeroshark := @JVM_FEATURES_zeroshark@
|
||||
JVM_FEATURES_custom := @JVM_FEATURES_custom@
|
||||
|
||||
# Used for make-time verifications
|
||||
VALID_JVM_FEATURES := @VALID_JVM_FEATURES@
|
||||
VALID_JVM_VARIANTS := @VALID_JVM_VARIANTS@
|
||||
|
||||
# Control use of precompiled header in hotspot libjvm build
|
||||
USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
|
||||
|
||||
# Should we compile support for running with a graphical UI? (ie headful)
|
||||
# Should we compile support for running without? (ie headless)
|
||||
SUPPORT_HEADFUL:=@SUPPORT_HEADFUL@
|
||||
@ -213,25 +242,11 @@ SUPPORT_HEADLESS:=@SUPPORT_HEADLESS@
|
||||
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options.
|
||||
@BUILD_HEADLESS@
|
||||
|
||||
# These are the libjvms that we want to build.
|
||||
# The java launcher uses the default.
|
||||
# The others can be selected by specifying -client -server -minimal1 -zero or -zeroshark
|
||||
# on the java launcher command line.
|
||||
JVM_VARIANTS:=@JVM_VARIANTS@
|
||||
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@
|
||||
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@
|
||||
JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@
|
||||
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@
|
||||
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@
|
||||
JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@
|
||||
# Legacy support
|
||||
USE_NEW_HOTSPOT_BUILD:=@USE_NEW_HOTSPOT_BUILD@
|
||||
|
||||
# Universal binaries on macosx
|
||||
MACOSX_UNIVERSAL=@MACOSX_UNIVERSAL@
|
||||
|
||||
# Legacy setting: -debug or -fastdebug
|
||||
# Still used in version string...
|
||||
BUILD_VARIANT_RELEASE:=@BUILD_VARIANT_RELEASE@
|
||||
|
||||
# JDK_OUTPUTDIR specifies where a working jvm is built.
|
||||
# You can run $(JDK_OUTPUTDIR)/bin/java
|
||||
# Though the layout of the contents of $(JDK_OUTPUTDIR) is not
|
||||
@ -320,6 +335,11 @@ MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
|
||||
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
|
||||
TOOLCHAIN_VERSION := @TOOLCHAIN_VERSION@
|
||||
CC_VERSION_NUMBER := @CC_VERSION_NUMBER@
|
||||
CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
|
||||
|
||||
# Legacy support
|
||||
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
|
||||
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
|
||||
@ -338,14 +358,18 @@ LD_OUT_OPTION:=@LD_OUT_OPTION@
|
||||
AR_OUT_OPTION:=@AR_OUT_OPTION@
|
||||
|
||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||
C_O_FLAG_HIGHEST_JVM:=@C_O_FLAG_HIGHEST_JVM@
|
||||
C_O_FLAG_HIGHEST:=@C_O_FLAG_HIGHEST@
|
||||
C_O_FLAG_HI:=@C_O_FLAG_HI@
|
||||
C_O_FLAG_NORM:=@C_O_FLAG_NORM@
|
||||
C_O_FLAG_NONE:=@C_O_FLAG_NONE@
|
||||
C_O_FLAG_SIZE:=@C_O_FLAG_SIZE@
|
||||
CXX_O_FLAG_HIGHEST_JVM:=@CXX_O_FLAG_HIGHEST_JVM@
|
||||
CXX_O_FLAG_HIGHEST:=@CXX_O_FLAG_HIGHEST@
|
||||
CXX_O_FLAG_HI:=@CXX_O_FLAG_HI@
|
||||
CXX_O_FLAG_NORM:=@CXX_O_FLAG_NORM@
|
||||
CXX_O_FLAG_NONE:=@CXX_O_FLAG_NONE@
|
||||
CXX_O_FLAG_SIZE:=@CXX_O_FLAG_SIZE@
|
||||
|
||||
C_FLAG_DEPS:=@C_FLAG_DEPS@
|
||||
CXX_FLAG_DEPS:=@CXX_FLAG_DEPS@
|
||||
@ -374,6 +398,23 @@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
|
||||
|
||||
LDFLAGS_HASH_STYLE := @LDFLAGS_HASH_STYLE@
|
||||
|
||||
JVM_CFLAGS := @JVM_CFLAGS@
|
||||
JVM_CFLAGS_SYMBOLS := @JVM_CFLAGS_SYMBOLS@
|
||||
JVM_LDFLAGS := @JVM_LDFLAGS@
|
||||
JVM_ASFLAGS := @JVM_ASFLAGS@
|
||||
JVM_LIBS := @JVM_LIBS@
|
||||
JVM_RCFLAGS := @JVM_RCFLAGS@
|
||||
|
||||
# Flags for zeroshark
|
||||
LLVM_CFLAGS := @LLVM_CFLAGS@
|
||||
LLVM_LIBS := @LLVM_LIBS@
|
||||
LLVM_LDFLAGS := @LLVM_LDFLAGS@
|
||||
|
||||
# These flags might contain variables set by a custom extension that is included later.
|
||||
EXTRA_CFLAGS = @EXTRA_CFLAGS@
|
||||
EXTRA_CXXFLAGS = @EXTRA_CXXFLAGS@
|
||||
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
|
||||
|
||||
CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
|
||||
|
||||
CPP:=@FIXPATH@ @CPP@
|
||||
@ -630,6 +671,7 @@ XATTR:=@XATTR@
|
||||
JT_HOME:=@JT_HOME@
|
||||
JTREGEXE:=@JTREGEXE@
|
||||
XCODEBUILD=@XCODEBUILD@
|
||||
DTRACE := @DTRACE@
|
||||
FIXPATH:=@FIXPATH@
|
||||
|
||||
# Build setup
|
||||
|
@ -930,6 +930,17 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
rm -rf version-script.map main.c a.out
|
||||
fi
|
||||
AC_SUBST(USING_BROKEN_SUSE_LD)
|
||||
|
||||
# Setup hotspot lecagy names for toolchains
|
||||
HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
HOTSPOT_TOOLCHAIN_TYPE=gcc
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
HOTSPOT_TOOLCHAIN_TYPE=visCPP
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_TOOLCHAIN_TYPE)
|
||||
])
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
|
@ -32,6 +32,7 @@ PRODUCT_NAME=OpenJDK
|
||||
PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
|
||||
# Might need better names for these
|
||||
MACOSX_BUNDLE_NAME_BASE="OpenJDK"
|
||||
|
@ -241,7 +241,7 @@ var getJibProfilesProfiles = function (input, common) {
|
||||
target_os: "linux",
|
||||
target_cpu: "x64",
|
||||
dependencies: concat(common.dependencies, "devkit"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
make_args: common.make_args
|
||||
},
|
||||
|
||||
@ -259,7 +259,7 @@ var getJibProfilesProfiles = function (input, common) {
|
||||
target_os: "macosx",
|
||||
target_cpu: "x64",
|
||||
dependencies: concat(common.dependencies, "devkit"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
make_args: common.make_args
|
||||
},
|
||||
|
||||
@ -267,7 +267,7 @@ var getJibProfilesProfiles = function (input, common) {
|
||||
target_os: "solaris",
|
||||
target_cpu: "x64",
|
||||
dependencies: concat(common.dependencies, "devkit", "cups"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
make_args: common.make_args
|
||||
},
|
||||
|
||||
@ -275,7 +275,7 @@ var getJibProfilesProfiles = function (input, common) {
|
||||
target_os: "solaris",
|
||||
target_cpu: "sparcv9",
|
||||
dependencies: concat(common.dependencies, "devkit", "cups"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
configure_args: concat(common.configure_args, "--with-zlib=system"),
|
||||
make_args: common.make_args
|
||||
},
|
||||
|
||||
|
@ -357,3 +357,4 @@ b75afa17aefe480c23c616a6a2497063312f7189 jdk-9+109
|
||||
780d0620add32bf545471cf65038c9ac6d9c036d jdk-9+112
|
||||
cc30faa2da498c478e89ab062ff160653ca1b170 jdk-9+113
|
||||
10d175b0368c30f54350fc648adc41b94ce357ee jdk-9+114
|
||||
7bab1b1b36824924b1c657a8419369ba93d198d3 jdk-9+115
|
||||
|
@ -255,7 +255,7 @@ public class RequestImpl
|
||||
public synchronized void send_deferred()
|
||||
{
|
||||
AsynchInvoke invokeObject = new AsynchInvoke(_orb, this, false);
|
||||
new sun.misc.ManagedLocalsThread(invokeObject).start();
|
||||
new Thread(null, invokeObject, "Async-Request-Invoker-Thread", 0, false).start();
|
||||
}
|
||||
|
||||
public synchronized boolean poll_response()
|
||||
|
@ -751,12 +751,13 @@ public class Util implements javax.rmi.CORBA.UtilDelegate
|
||||
}
|
||||
}
|
||||
|
||||
class KeepAlive extends sun.misc.ManagedLocalsThread
|
||||
class KeepAlive extends Thread
|
||||
{
|
||||
boolean quit = false;
|
||||
|
||||
public KeepAlive ()
|
||||
{
|
||||
super(null, null, "Servant-KeepAlive-Thread", 0, false);
|
||||
setDaemon(false);
|
||||
}
|
||||
|
||||
|
@ -516,7 +516,7 @@ public class POAImpl extends ObjectAdapterBase implements POA
|
||||
|
||||
// Converted from anonymous class to local class
|
||||
// so that we can call performDestroy() directly.
|
||||
static class DestroyThread extends sun.misc.ManagedLocalsThread {
|
||||
static class DestroyThread extends Thread {
|
||||
private boolean wait ;
|
||||
private boolean etherealize ;
|
||||
private boolean debug ;
|
||||
@ -524,6 +524,7 @@ public class POAImpl extends ObjectAdapterBase implements POA
|
||||
|
||||
public DestroyThread( boolean etherealize, boolean debug )
|
||||
{
|
||||
super(null, null, "POA-Destroy-Thread", 0, false);
|
||||
this.etherealize = etherealize ;
|
||||
this.debug = debug ;
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ public class POAManagerImpl extends org.omg.CORBA.LocalObject implements
|
||||
if (wait_for_completion)
|
||||
deactivator.run() ;
|
||||
else {
|
||||
Thread thr = new sun.misc.ManagedLocalsThread(deactivator) ;
|
||||
Thread thr = new Thread(null, deactivator, "POA-Deactivator-Thread", 0, false) ;
|
||||
thr.start() ;
|
||||
}
|
||||
} finally {
|
||||
|
@ -302,7 +302,7 @@ public class POAPolicyMediatorImpl_R_USM extends POAPolicyMediatorBase_R {
|
||||
throw new WrongPolicy();
|
||||
}
|
||||
|
||||
class Etherealizer extends sun.misc.ManagedLocalsThread {
|
||||
class Etherealizer extends Thread {
|
||||
private POAPolicyMediatorImpl_R_USM mediator ;
|
||||
private ActiveObjectMap.Key key ;
|
||||
private AOMEntry entry ;
|
||||
@ -314,6 +314,7 @@ public class POAPolicyMediatorImpl_R_USM extends POAPolicyMediatorBase_R {
|
||||
ActiveObjectMap.Key key, AOMEntry entry, Servant servant,
|
||||
boolean debug )
|
||||
{
|
||||
super(null, null, "PAO-Etherealizer-Thread", 0, false);
|
||||
this.mediator = mediator ;
|
||||
this.key = key ;
|
||||
this.entry = entry;
|
||||
|
@ -691,7 +691,7 @@ public class ORBImpl extends com.sun.corba.se.spi.orb.ORB
|
||||
for (int i = 0; i < req.length; i++) {
|
||||
AsynchInvoke invokeObject = new AsynchInvoke( this,
|
||||
(com.sun.corba.se.impl.corba.RequestImpl)req[i], true);
|
||||
new sun.misc.ManagedLocalsThread(invokeObject).start();
|
||||
new Thread(null, invokeObject, "ORB-Request-Thread", 0, false).start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -459,7 +459,7 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
}
|
||||
|
||||
|
||||
private class WorkerThread extends sun.misc.ManagedLocalsThread implements Closeable
|
||||
private class WorkerThread extends Thread implements Closeable
|
||||
{
|
||||
private Work currentWork;
|
||||
private int threadId = 0; // unique id for the thread
|
||||
@ -469,7 +469,7 @@ public class ThreadPoolImpl implements ThreadPool
|
||||
private StringBuffer workerThreadName = new StringBuffer();
|
||||
|
||||
WorkerThread(ThreadGroup tg, String threadPoolName) {
|
||||
super(tg, "Idle");
|
||||
super(tg, null, "Idle", 0, false);
|
||||
this.threadId = ThreadPoolImpl.getUniqueThreadId();
|
||||
this.threadPoolName = threadPoolName;
|
||||
setName(composeWorkerThreadName(threadPoolName, "Idle"));
|
||||
|
@ -61,7 +61,7 @@ import com.sun.corba.se.impl.orbutil.ORBUtility;
|
||||
*/
|
||||
class SelectorImpl
|
||||
extends
|
||||
sun.misc.ManagedLocalsThread
|
||||
Thread
|
||||
implements
|
||||
com.sun.corba.se.pept.transport.Selector
|
||||
{
|
||||
@ -79,6 +79,7 @@ class SelectorImpl
|
||||
|
||||
public SelectorImpl(ORB orb)
|
||||
{
|
||||
super(null, null, "ORB-Selector-Thread", 0, false);
|
||||
this.orb = orb;
|
||||
selector = null;
|
||||
selectorStarted = false;
|
||||
@ -277,7 +278,6 @@ class SelectorImpl
|
||||
|
||||
public void run()
|
||||
{
|
||||
setName("SelectorThread");
|
||||
while (!closed) {
|
||||
try {
|
||||
int n = 0;
|
||||
|
@ -29,8 +29,6 @@ module java.corba {
|
||||
requires java.logging;
|
||||
requires java.naming;
|
||||
requires java.transaction;
|
||||
// 8148863
|
||||
requires jdk.unsupported;
|
||||
|
||||
exports javax.activity;
|
||||
exports javax.rmi;
|
||||
|
@ -517,3 +517,4 @@ c558850fac5750d8ca98a45180121980f57cdd28 jdk-9+111
|
||||
76582e8dc9e6374e4f99ab797c8d364b6e9449b4 jdk-9+112
|
||||
c569f8d89269fb6205b90f727581eb8cc04132f9 jdk-9+113
|
||||
b64432bae5271735fd53300b2005b713e98ef411 jdk-9+114
|
||||
88dd08d7be0fe7fb9f1914b1628f0aae9bf56e25 jdk-9+115
|
||||
|
@ -237,19 +237,21 @@ else
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
endif
|
||||
|
||||
# NOTE: Changes in this file was just to facilitate comparison when
|
||||
# developing the new build, and should not be integrated.
|
||||
generic_buildcore: $(HOTSPOT_SCRIPT)
|
||||
ifeq ($(HS_ARCH),ppc)
|
||||
ifeq ($(ARCH_DATA_MODEL),64)
|
||||
#ifeq ($(HS_ARCH),ppc)
|
||||
# ifeq ($(ARCH_DATA_MODEL),64)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
$(MAKE) -f $(ABS_OS_MAKEFILE) \
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
else
|
||||
@$(ECHO) "No ($(VM_TARGET)) for ppc ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
|
||||
endif
|
||||
else
|
||||
@$(ECHO) "No ($(VM_TARGET)) for $(HS_ARCH)"
|
||||
endif
|
||||
# else
|
||||
# @$(ECHO) "No ($(VM_TARGET)) for ppc ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
|
||||
# endif
|
||||
#else
|
||||
# @$(ECHO) "No ($(VM_TARGET)) for $(HS_ARCH)"
|
||||
#endif
|
||||
|
||||
generic_buildzero: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
|
@ -53,13 +53,13 @@ VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
endif
|
||||
|
||||
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
|
||||
|
@ -53,13 +53,13 @@ VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
endif
|
||||
|
||||
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
|
||||
|
@ -221,7 +221,7 @@ ifeq ($(USE_CLANG),)
|
||||
ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
|
||||
# GCC < 4.3
|
||||
WARNING_FLAGS += -Wconversion
|
||||
endif
|
||||
endif
|
||||
ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 8 \) \))" "1"
|
||||
# GCC >= 4.8
|
||||
# This flag is only known since GCC 4.3. Gcc 4.8 contains a fix so that with templates no
|
||||
@ -260,7 +260,7 @@ endif
|
||||
|
||||
OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
|
||||
|
||||
# Variable tracking size limit exceeded for VMStructs::init()
|
||||
# Variable tracking size limit exceeded for VMStructs::init()
|
||||
ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "1"
|
||||
# GCC >= 4.3
|
||||
# Gcc 4.1.2 does not support this flag, nor does it have problems compiling the file.
|
||||
|
@ -53,13 +53,13 @@ VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
endif
|
||||
|
||||
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
|
||||
|
@ -30,3 +30,8 @@ TYPE = ZERO
|
||||
|
||||
# Install libjvm.so, etc in in server directory.
|
||||
VM_SUBDIR = server
|
||||
|
||||
# Disable trace for zero builds
|
||||
# NOTE: This is used for simple comparison with the new build system, and
|
||||
# should not be merged into mainline with build-infra.
|
||||
INCLUDE_TRACE := false
|
||||
|
@ -41,7 +41,6 @@
|
||||
JVM_DumpAllStacks;
|
||||
JVM_DumpThreads;
|
||||
JVM_FillInStackTrace;
|
||||
JVM_FillStackFrames;
|
||||
JVM_FindClassFromCaller;
|
||||
JVM_FindClassFromClass;
|
||||
JVM_FindClassFromBootLoader;
|
||||
@ -157,13 +156,13 @@
|
||||
JVM_SetClassSigners;
|
||||
JVM_SetNativeThreadName;
|
||||
JVM_SetPrimitiveArrayElement;
|
||||
JVM_SetMethodInfo;
|
||||
JVM_SetThreadPriority;
|
||||
JVM_Sleep;
|
||||
JVM_StartThread;
|
||||
JVM_StopThread;
|
||||
JVM_SuspendThread;
|
||||
JVM_SupportsCX8;
|
||||
JVM_ToStackTraceElement;
|
||||
JVM_TotalMemory;
|
||||
JVM_UnloadLibrary;
|
||||
JVM_Yield;
|
||||
|
@ -270,7 +270,7 @@ $(DTRACE.o): $(DTRACE).d $(DTraced_Files)
|
||||
@echo $(LOG_INFO) Compiling $(DTRACE).d
|
||||
|
||||
$(QUIETLY) $(DTRACE_PROG) $(DTRACE_OPTS) -C -I. -G -xlazyload -o $@ -s $(DTRACE).d \
|
||||
$(DTraced_Files) ||\
|
||||
$(sort $(DTraced_Files)) ||\
|
||||
STATUS=$$?;\
|
||||
if [ x"$$STATUS" = x"1" ]; then \
|
||||
if [ x`uname -r` = x"5.10" -a \
|
||||
|
@ -53,13 +53,13 @@ VPATH += $(Src_Dirs_V:%=%:)
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp
|
||||
|
||||
ifeq ($(HAS_ALT_SRC), true)
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
TraceGeneratedNames += \
|
||||
traceRequestables.hpp \
|
||||
traceEventControl.hpp
|
||||
endif
|
||||
|
||||
TraceGeneratedFiles = $(TraceGeneratedNames:%=$(TraceOutDir)/%)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2016, 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
|
||||
@ -47,6 +47,7 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC := \
|
||||
$(HOTSPOT_TOPDIR)/test/runtime/jni/ToStringInInterfaceTest \
|
||||
$(HOTSPOT_TOPDIR)/test/runtime/modules/getModuleJNI \
|
||||
$(HOTSPOT_TOPDIR)/test/runtime/SameObject \
|
||||
$(HOTSPOT_TOPDIR)/test/runtime/BoolReturn \
|
||||
$(HOTSPOT_TOPDIR)/test/compiler/floatingpoint/ \
|
||||
$(HOTSPOT_TOPDIR)/test/compiler/calls \
|
||||
$(HOTSPOT_TOPDIR)/test/compiler/native \
|
||||
|
@ -48,10 +48,10 @@ HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-debug
|
||||
# Force resources to be rebuilt every time
|
||||
$(Res_Files): FORCE
|
||||
|
||||
# NOTE: Changes in this file was just to give a proper command line when linking
|
||||
# for use when developing the new build, and should not be integrated.
|
||||
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
$(LD) @<<
|
||||
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
<<
|
||||
$(LD) $(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
!if "$(MT)" != ""
|
||||
# The previous link command created a .manifest file that we want to
|
||||
# insert into the linked artifact so we do not need to track it
|
||||
|
@ -47,10 +47,10 @@ HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)-fastdebug
|
||||
# Force resources to be rebuilt every time
|
||||
$(Res_Files): FORCE
|
||||
|
||||
# NOTE: Changes in this file was just to give a proper command line when linking
|
||||
# for use when developing the new build, and should not be integrated.
|
||||
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
$(LD) @<<
|
||||
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
<<
|
||||
$(LD) $(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
!if "$(MT)" != ""
|
||||
# The previous link command created a .manifest file that we want to
|
||||
# insert into the linked artifact so we do not need to track it
|
||||
|
@ -51,10 +51,11 @@ HS_BUILD_ID=$(HOTSPOT_VERSION_STRING)
|
||||
# Force resources to be rebuilt every time
|
||||
$(Res_Files): FORCE
|
||||
|
||||
# NOTE: Changes in this file was just to give a proper command line when linking
|
||||
# for use when developing the new build, and should not be integrated.
|
||||
$(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
$(LD) @<<
|
||||
$(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
<<
|
||||
$(LD) $(LD_FLAGS) /out:$@ /implib:$*.lib /def:vm.def $(Obj_Files) $(Res_Files)
|
||||
|
||||
!if "$(MT)" != ""
|
||||
# The previous link command created a .manifest file that we want to
|
||||
# insert into the linked artifact so we do not need to track it
|
||||
|
@ -41,6 +41,12 @@ HAS_ALT_SRC = true
|
||||
!endif
|
||||
!endif
|
||||
|
||||
!ifndef OPENJDK
|
||||
!if EXISTS($(TraceAltSrcDir))
|
||||
HAS_ALT_SRC = true
|
||||
!endif
|
||||
!endif
|
||||
|
||||
TraceGeneratedNames = \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
|
@ -305,8 +305,10 @@ bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWi
|
||||
|
||||
# This guy should remain a single colon rule because
|
||||
# otherwise we can't specify the output filename.
|
||||
# NOTE: Changes in this file was just to give a proper command line when linking
|
||||
# for use when developing the new build, and should not be integrated.
|
||||
{$(COMMONSRC)\os\windows\vm}.rc.res:
|
||||
@$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||
$(RC) $(RC_FLAGS) /fo"$@" $<
|
||||
|
||||
{$(COMMONSRC)\cpu\$(Platform_arch)\vm}.cpp.obj::
|
||||
$(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $<
|
||||
|
54
hotspot/makefiles/BuildHotspot.gmk
Normal file
54
hotspot/makefiles/BuildHotspot.gmk
Normal file
@ -0,0 +1,54 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
VARIANT_TARGETS := $(foreach v, $(JVM_VARIANTS), variant-$v)
|
||||
VARIANT_GENSRC_TARGETS := $(addsuffix -gensrc, $(VARIANT_TARGETS))
|
||||
VARIANT_LIBS_TARGETS := $(addsuffix -libs, $(VARIANT_TARGETS))
|
||||
|
||||
$(VARIANT_GENSRC_TARGETS): variant-%-gensrc:
|
||||
$(call LogWarn, Building JVM variant '$*' with features '$(JVM_FEATURES_$*)')
|
||||
+$(MAKE) -f gensrc/GenerateSources.gmk JVM_VARIANT=$*
|
||||
|
||||
$(VARIANT_LIBS_TARGETS): variant-%-libs: variant-%-gensrc
|
||||
+$(MAKE) -f lib/CompileLibraries.gmk JVM_VARIANT=$*
|
||||
|
||||
$(VARIANT_TARGETS): variant-%: variant-%-gensrc variant-%-libs
|
||||
|
||||
jsig:
|
||||
+$(MAKE) -f lib/CompileLibjsig.gmk
|
||||
|
||||
dist: $(VARIANT_TARGETS) jsig
|
||||
+$(MAKE) -f Dist.gmk
|
||||
|
||||
all: dist
|
||||
|
||||
.PHONY: $(VARIANT_TARGETS) $(VARIANT_GENSRC_TARGETS) $(VARIANT_LIBS_TARGETS) \
|
||||
jsig dist all
|
239
hotspot/makefiles/Dist.gmk
Normal file
239
hotspot/makefiles/Dist.gmk
Normal file
@ -0,0 +1,239 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Copy the generated output into well-defined places in the dist directory.
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, Dist.gmk))
|
||||
|
||||
DIST_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/dist
|
||||
|
||||
# Unfortunately, all platforms have different target subdirs.
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
LIB_SUBDIR := bin
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIB_SUBDIR := lib
|
||||
else
|
||||
LIB_SUBDIR := lib$(OPENJDK_TARGET_CPU_LIBDIR)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Functions to setup copying of files for variants
|
||||
|
||||
# Support macro for SetupDistLibFile
|
||||
define macosx_universalize
|
||||
$(MKDIR) -p $(@D)
|
||||
$(LIPO) -create -output $@ $<
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Setup make rules to copy a native library and associated data.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# NAME -- The base name of the native library (e.g. 'jvm')
|
||||
# VARIANT -- The variant to copy from
|
||||
# VARIANT_TARGET_DIR -- The variant target sub dir, with trailing slash, optional
|
||||
SetupDistLibFile = $(NamedParamsMacroTemplate)
|
||||
define SetupDistLibFileBody
|
||||
ifneq ($$($1_VARIANT), )
|
||||
$1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/variant-$$($1_VARIANT)/lib$$($1_NAME)
|
||||
else
|
||||
$1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/lib$$($1_NAME)
|
||||
endif
|
||||
$1_LIB_NAME := $(LIBRARY_PREFIX)$$($1_NAME)
|
||||
$1_TARGET_DIR := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$$($1_VARIANT_TARGET_DIR)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# We must use the 'universalize' macro to run lipo on shared libraries, at
|
||||
# least until JDK-8069540 is fixed.
|
||||
$1_MACRO := macosx_universalize
|
||||
endif
|
||||
|
||||
# Copy the the native library.
|
||||
$$(eval $$(call SetupCopyFiles, $1_COPY_LIB, \
|
||||
DEST := $$($1_TARGET_DIR), \
|
||||
MACRO := $$($1_MACRO), \
|
||||
FILES := $$(wildcard \
|
||||
$$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX)), \
|
||||
))
|
||||
|
||||
TARGETS += $$($1_COPY_LIB)
|
||||
|
||||
# Copy related data (debug symbols, static-build symbols file etc)
|
||||
$$(eval $$(call SetupCopyFiles, $1_COPY_FILES, \
|
||||
DEST := $$($1_TARGET_DIR), \
|
||||
FILES := $$(wildcard \
|
||||
$$(addprefix $$($1_SRC_DIR)/$$($1_LIB_NAME), \
|
||||
.diz .debuginfo .pdb .map .symbols)), \
|
||||
))
|
||||
|
||||
TARGETS += $$($1_COPY_FILES)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# Debug symbols on macosx is a directory, not a single file, per library.
|
||||
$1_DSYM_SRC := $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX).dSYM)
|
||||
ifneq ($$(wildcard $$($1_DSYM_SRC)), )
|
||||
$$(eval $$(call SetupCopyFiles, $1_COPY_DSYM_DIR, \
|
||||
DEST := $$($1_TARGET_DIR), \
|
||||
SRC := $$($1_SRC_DIR), \
|
||||
FILES := $$(shell $(FIND) $$($1_DSYM_SRC) -type f), \
|
||||
))
|
||||
TARGETS += $$($1_COPY_DSYM_DIR)
|
||||
endif
|
||||
endif
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Copy common files, which are independent on the jvm variant(s) being built.
|
||||
# For files that were generated during the build, we assume all versions of
|
||||
# these files are identical, and just pick one arbitrarily to use as source.
|
||||
|
||||
ANY_JVM_VARIANT := $(firstword $(JVM_VARIANTS))
|
||||
JVM_VARIANT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/variant-$(ANY_JVM_VARIANT)
|
||||
|
||||
### Copy platform-independent .h files
|
||||
INCLUDE_FILES_SRC_DIR := $(HOTSPOT_TOPDIR)/src/share/vm
|
||||
$(eval $(call SetupCopyFiles, COPY_INCLUDE, \
|
||||
SRC := $(INCLUDE_FILES_SRC_DIR), \
|
||||
DEST := $(DIST_OUTPUTDIR)/include, \
|
||||
FLATTEN := true, \
|
||||
FILES := $(INCLUDE_FILES_SRC_DIR)/prims/jni.h \
|
||||
$(INCLUDE_FILES_SRC_DIR)/code/jvmticmlr.h \
|
||||
$(INCLUDE_FILES_SRC_DIR)/services/jmm.h))
|
||||
|
||||
TARGETS += $(COPY_INCLUDE)
|
||||
|
||||
### Copy jni_md.h
|
||||
|
||||
# This might have been defined in a custom extension
|
||||
ifeq ($(JNI_MD_H_SRC), )
|
||||
JNI_MD_H_SRC := $(HOTSPOT_TOPDIR)/src/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/jni_$(HOTSPOT_TARGET_CPU_ARCH).h
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# NOTE: This should most likely be darwin, but the old hotspot build uses bsd
|
||||
JNI_MD_SUBDIR := bsd
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
JNI_MD_SUBDIR := win32
|
||||
else
|
||||
JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
# SetupCopyFiles is not used here since it's non-trivial to copy a single
|
||||
# file with a different target name.
|
||||
$(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
|
||||
$(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
|
||||
$(install-file)
|
||||
|
||||
TARGETS += $(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
|
||||
DEST := $(DIST_OUTPUTDIR)/include, \
|
||||
FLATTEN := true, \
|
||||
FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h))
|
||||
|
||||
TARGETS += $(COPY_JVMTI_H)
|
||||
|
||||
# NOTE: In the old build, this file was not copied on Windows.
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
|
||||
DEST := $(DIST_OUTPUTDIR)/docs/platform/jvmti, \
|
||||
FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.html))
|
||||
endif
|
||||
|
||||
TARGETS += $(COPY_JVMTI_HTML)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
|
||||
DEST := $(DIST_OUTPUTDIR)/lib, \
|
||||
FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib))
|
||||
|
||||
TARGETS += $(COPY_JVM_LIB)
|
||||
endif
|
||||
|
||||
# Copy libjsig, if it exists
|
||||
$(eval $(call SetupDistLibFile, DIST_jsig, \
|
||||
NAME := jsig, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# Copy variant-specific files
|
||||
|
||||
# Setup make rules to copy a single variant to dist.
|
||||
# $1: The name of the variant
|
||||
define SetupDistForVariant
|
||||
ifneq ($$(filter client minimal, $1), )
|
||||
VARIANT_TARGET_DIR := $1
|
||||
else
|
||||
# Use 'server' as default target directory name for all other variants.
|
||||
VARIANT_TARGET_DIR := server
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm, \
|
||||
NAME := jvm, \
|
||||
VARIANT := $1, \
|
||||
VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
|
||||
))
|
||||
|
||||
# Copy the dtrace libraries, if they exist
|
||||
$$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_db, \
|
||||
NAME := jvm_db, \
|
||||
VARIANT := $1, \
|
||||
VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
|
||||
))
|
||||
|
||||
$$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_dtrace, \
|
||||
NAME := jvm_dtrace, \
|
||||
VARIANT := $1, \
|
||||
VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
|
||||
))
|
||||
|
||||
# Copy the Xusage.txt file
|
||||
$$(eval $$(call SetupCopyFiles, DIST_$(strip $1)_Xusage, \
|
||||
DEST := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$(strip $1), \
|
||||
FILES := $$(HOTSPOT_OUTPUTDIR)/variant-$(strip $1)/support/misc/Xusage.txt, \
|
||||
))
|
||||
|
||||
TARGETS += $$(DIST_$(strip $1)_Xusage)
|
||||
endef
|
||||
|
||||
$(foreach variant, $(JVM_VARIANTS), \
|
||||
$(eval $(call SetupDistForVariant, $(variant))) \
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
45
hotspot/makefiles/HotspotCommon.gmk
Normal file
45
hotspot/makefiles/HotspotCommon.gmk
Normal file
@ -0,0 +1,45 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
ifeq ($(JVM_VARIANT), )
|
||||
$(error This makefile must be called with JVM_VARIANT set)
|
||||
endif
|
||||
|
||||
JVM_VARIANT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/variant-$(JVM_VARIANT)
|
||||
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
|
||||
JVM_SUPPORT_DIR := $(JVM_VARIANT_OUTPUTDIR)/support
|
||||
|
||||
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
|
||||
|
||||
################################################################################
|
||||
|
||||
# Test if a feature is available in the present build of JVM_VARIANT. Will return
|
||||
# 'true' or 'false'.
|
||||
# $1 - the feature to test for
|
||||
check-jvm-feature = \
|
||||
$(strip \
|
||||
$(if $(filter-out $(VALID_JVM_FEATURES), $1), \
|
||||
$(error Internal error: Invalid feature tested: $1)) \
|
||||
$(if $(filter $1, $(JVM_FEATURES_$(JVM_VARIANT))), true, false))
|
75
hotspot/makefiles/gensrc/GenerateSources.gmk
Normal file
75
hotspot/makefiles/gensrc/GenerateSources.gmk
Normal file
@ -0,0 +1,75 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
||||
include HotspotCommon.gmk
|
||||
|
||||
# The real work is done in these files
|
||||
|
||||
include gensrc/GensrcAdlc.gmk
|
||||
include gensrc/GensrcDtrace.gmk
|
||||
include gensrc/GensrcJvmti.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, gensrc/GenerateSources.gmk))
|
||||
|
||||
# While technically the rules below are "gendata" which can be done in parallel
|
||||
# with native compilation, let's keep it here for simplicity.
|
||||
|
||||
# The Xusage.txt file needs to have platform specific path separator
|
||||
$(eval $(call SetupTextFileProcessing, CREATE_XUSAGE, \
|
||||
SOURCE_FILES := $(HOTSPOT_TOPDIR)/src/share/vm/Xusage.txt, \
|
||||
OUTPUT_FILE := $(JVM_SUPPORT_DIR)/misc/Xusage.txt, \
|
||||
REPLACEMENTS := separated by ;> => separated by $(PATH_SEP)> ; , \
|
||||
))
|
||||
|
||||
TARGETS += $(CREATE_XUSAGE)
|
||||
|
||||
# Setup the hotspot launcher script for developer use
|
||||
$(eval $(call SetupTextFileProcessing, CREATE_HOTSPOT_LAUNCHER, \
|
||||
SOURCE_FILES := $(HOTSPOT_TOPDIR)/make/hotspot.script, \
|
||||
OUTPUT_FILE := $(JVM_OUTPUTDIR)/hotspot, \
|
||||
REPLACEMENTS := \
|
||||
@@LIBARCH@@ => $(OPENJDK_TARGET_CPU_LEGACY_LIB) ; \
|
||||
@@JDK_IMPORT_PATH@@ => $(JDK_OUTPUTDIR) ; , \
|
||||
))
|
||||
|
||||
CHMOD_HOTSPOT_LAUNCHER := $(JVM_VARIANT_OUTPUTDIR)/libjvm/_hotspot-script-chmod.marker
|
||||
|
||||
$(CHMOD_HOTSPOT_LAUNCHER): $(CREATE_HOTSPOT_LAUNCHER)
|
||||
$(CHMOD) +x $<
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(CREATE_HOTSPOT_LAUNCHER) $(CHMOD_HOTSPOT_LAUNCHER)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
191
hotspot/makefiles/gensrc/GensrcAdlc.gmk
Normal file
191
hotspot/makefiles/gensrc/GensrcAdlc.gmk
Normal file
@ -0,0 +1,191 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, gensrc/GensrcAdlc.gmk))
|
||||
|
||||
ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
|
||||
ADLC_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/adlc
|
||||
|
||||
##############################################################################
|
||||
# Build the ad compiler (the adlc build tool)
|
||||
|
||||
# Flags depending on the build platform/tool chain
|
||||
# NOTE: No optimization or debug flags set here
|
||||
ifeq ($(OPENJDK_BUILD_OS), linux)
|
||||
ADLC_CFLAGS := -fno-exceptions -DLINUX
|
||||
else ifeq ($(OPENJDK_BUILD_OS), solaris)
|
||||
ADLC_LDFLAGS := -m64
|
||||
ADLC_CFLAGS := -m64
|
||||
ADLC_CFLAGS_WARNINGS := +w
|
||||
else ifeq ($(OPENJDK_BUILD_OS), aix)
|
||||
ADLC_LDFLAGS := -q64
|
||||
ADLC_CFLAGS := -qnortti -qeh -q64 -DAIX
|
||||
else ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
ADLC_LDFLAGS := -nologo
|
||||
ADLC_CFLAGS := -nologo -EHsc
|
||||
# NOTE: The old build also have -D_CRT_SECURE_NO_DEPRECATE but it doesn't
|
||||
# seem needed any more.
|
||||
ADLC_CFLAGS_WARNINGS := -W3 -D_CRT_SECURE_NO_WARNINGS
|
||||
endif
|
||||
|
||||
# NOTE: The old build didn't set -DASSERT for windows but it doesn't seem to
|
||||
# hurt.
|
||||
ADLC_CFLAGS += -DASSERT
|
||||
|
||||
ADLC_CFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)
|
||||
|
||||
ADLC_CFLAGS += -I$(HOTSPOT_TOPDIR)/src/share/vm
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_ADLC, \
|
||||
TOOLCHAIN := TOOLCHAIN_BUILD_LINK_CXX, \
|
||||
SRC := $(HOTSPOT_TOPDIR)/src/share/vm/adlc, \
|
||||
EXTRA_FILES := $(HOTSPOT_TOPDIR)/src/share/vm/opto/opcodes.cpp, \
|
||||
CFLAGS := $(ADLC_CFLAGS) $(ADLC_CFLAGS_WARNINGS), \
|
||||
LDFLAGS := $(ADLC_LDFLAGS), \
|
||||
LIBS := $(ADLC_LIBS), \
|
||||
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc/objs, \
|
||||
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/adlc, \
|
||||
PROGRAM := adlc, \
|
||||
DEBUG_SYMBOLS := false, \
|
||||
DISABLED_WARNINGS_clang := parentheses tautological-compare, \
|
||||
DISABLED_WARNINGS_solstudio := notemsource, \
|
||||
))
|
||||
|
||||
ADLC_TOOL := $(BUILD_ADLC_TARGET)
|
||||
|
||||
##############################################################################
|
||||
# Transform the ad source files into C++ source files using adlc
|
||||
|
||||
# Setup flags for the adlc build tool (ADLCFLAGS).
|
||||
ADLCFLAGS += -q -T
|
||||
|
||||
# ADLC flags depending on target OS
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
ADLCFLAGS += -DLINUX=1 -D_GNU_SOURCE=1
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ADLCFLAGS += -DSOLARIS=1 -DSPARC_WORKS=1
|
||||
else ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
ADLCFLAGS += -DAIX=1
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
ADLCFLAGS += -D_ALLBSD_SOURCE=1 -D_GNU_SOURCE=1
|
||||
endif
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
# NOTE: Windows adlc flags was different in the old build. Is this really
|
||||
# correct?
|
||||
|
||||
# -g makes #line directives in the generated C++ files.
|
||||
ADLCFLAGS += -g
|
||||
|
||||
ADLCFLAGS += -D$(HOTSPOT_TARGET_CPU_DEFINE)=1
|
||||
endif
|
||||
|
||||
# This generates checks in the generated C++ files that _LP64 is correctly
|
||||
# (un)defined when compiling them.
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
||||
ADLCFLAGS += -D_LP64=1
|
||||
else
|
||||
ADLCFLAGS += -U_LP64
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
# Concatenate all ad source files into a single file, which will be fed to
|
||||
# adlc. Also include a #line directive at the start of every included file
|
||||
# (after the initial header block), stating the original source file name.
|
||||
#
|
||||
# Normally, debugging is done directly on the ad_<arch>*.cpp files, but the
|
||||
# #line directives in those files will be pointing back to <arch>.ad.
|
||||
|
||||
# AD_SRC_ROOTS might have been added to by a custom extension
|
||||
AD_SRC_ROOTS += $(HOTSPOT_TOPDIR)/src
|
||||
|
||||
AD_SRC_FILES := $(call uniq, $(wildcard $(foreach d, $(AD_SRC_ROOTS), \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_CPU).ad \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_CPU_ARCH).ad \
|
||||
$d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/vm/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH).ad \
|
||||
)))
|
||||
|
||||
SINGLE_AD_SRCFILE := $(ADLC_SUPPORT_DIR)/all-ad-src.ad
|
||||
|
||||
INSERT_FILENAME_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if (CUR_FN != FILENAME) { CUR_FN=FILENAME; NR_BASE=NR-1; need_lineno=1 } \
|
||||
if (need_lineno && $$0 !~ /\/\//) \
|
||||
{ print "\n\n\#line " (NR-NR_BASE) " \"" FILENAME "\""; need_lineno=0 }; \
|
||||
print \
|
||||
}'
|
||||
|
||||
$(SINGLE_AD_SRCFILE): $(AD_SRC_FILES)
|
||||
$(call LogInfo, Preprocessing adlc files $(^F))
|
||||
$(call MakeDir, $(@D))
|
||||
$(NAWK) $(INSERT_FILENAME_AWK_SCRIPT) $^ > $@
|
||||
|
||||
##############################################################################
|
||||
# Run the adlc tool on the single concatenated ad source file, and store the
|
||||
# output in support/adlc for further processing.
|
||||
ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
|
||||
|
||||
$(ADLC_RUN_MARKER): $(BUILD_ADLC) $(SINGLE_AD_SRCFILE)
|
||||
$(call LogInfo, Generating adlc files)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
|
||||
$(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
|
||||
-c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).cpp \
|
||||
-h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU).hpp \
|
||||
-a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU).cpp \
|
||||
-v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU).hpp)
|
||||
$(TOUCH) $@
|
||||
|
||||
##############################################################################
|
||||
# Finally copy the generated files from support/adlc into gensrc/adfiles,
|
||||
# and postprocess them by fixing dummy #line directives.
|
||||
|
||||
ADLC_GENERATED_FILES := $(addprefix $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/, \
|
||||
ad_$(HOTSPOT_TARGET_CPU).cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU).hpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_clone.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_expand.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_format.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_gen.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_misc.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_peephole.cpp \
|
||||
ad_$(HOTSPOT_TARGET_CPU)_pipeline.cpp \
|
||||
adGlobals_$(HOTSPOT_TARGET_CPU).hpp \
|
||||
dfa_$(HOTSPOT_TARGET_CPU).cpp \
|
||||
)
|
||||
|
||||
$(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
|
||||
$(call LogInfo, Postprocessing adlc file $*)
|
||||
$(call MakeDir, $(@D))
|
||||
$(NAWK) \
|
||||
'BEGIN { print "#line 1 \"$*\""; } \
|
||||
/^#line 999999$$/ {print "#line " (NR+1) " \"$*\""; next} \
|
||||
{print}' \
|
||||
< $(ADLC_SUPPORT_DIR)/$* > $@
|
||||
|
||||
TARGETS := $(ADLC_GENERATED_FILES)
|
||||
|
||||
endif
|
56
hotspot/makefiles/gensrc/GensrcDtrace.gmk
Normal file
56
hotspot/makefiles/gensrc/GensrcDtrace.gmk
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Gensrc support for dtrace. The files generated here are included by dtrace.hpp
|
||||
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
DTRACE_FLAGS := -64
|
||||
DTRACE_CPP_FLAGS := -D_LP64
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
DTRACE_CPP_FLAGS := -D_LP64 -x c
|
||||
else ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
DTRACE_CPP_FLAGS := -x c
|
||||
endif
|
||||
|
||||
DTRACE_SOURCE_DIR := $(HOTSPOT_TOPDIR)/src/os/posix/dtrace
|
||||
DTRACE_GENSRC_DIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/dtracefiles
|
||||
|
||||
# Make sure we run our selected compiler for preprocessing instead of letting
|
||||
# the dtrace tool pick it on it's own.
|
||||
$(DTRACE_GENSRC_DIR)/%.h: $(DTRACE_SOURCE_DIR)/%.d
|
||||
$(call LogInfo, Generating dtrace header file $(@F))
|
||||
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E $(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
|
||||
# Process all .d files in DTRACE_SOURCE_DIR. They are:
|
||||
# hotspot_jni.d hotspot.d hs_private.d
|
||||
TARGETS += $(patsubst $(DTRACE_SOURCE_DIR)/%.d, \
|
||||
$(DTRACE_GENSRC_DIR)/%.h, $(wildcard $(DTRACE_SOURCE_DIR)/*.d))
|
||||
|
||||
endif
|
174
hotspot/makefiles/gensrc/GensrcJvmti.gmk
Normal file
174
hotspot/makefiles/gensrc/GensrcJvmti.gmk
Normal file
@ -0,0 +1,174 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, gensrc/GensrcJvmti.gmk))
|
||||
|
||||
################################################################################
|
||||
# Build tools needed for the JVMTI source code generation
|
||||
|
||||
JVMTI_TOOLS_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/prims
|
||||
JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
||||
|
||||
$(eval $(call SetupJavaCompiler, GENERATE_OLDBYTECODE, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := $(DISABLE_WARNINGS), \
|
||||
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
|
||||
SERVER_JVM := $(SJAVAC_SERVER_JAVA), \
|
||||
DISABLE_SJAVAC := true, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JVMTI_TOOLS, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
SRC := $(JVMTI_TOOLS_SRCDIR), \
|
||||
INCLUDE_FILES := jvmtiGen.java jvmtiEnvFill.java, \
|
||||
BIN := $(JVMTI_TOOLS_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
TOOL_JVMTI_GEN := $(JAVA_SMALL) -cp $(JVMTI_TOOLS_OUTPUTDIR) jvmtiGen
|
||||
TOOL_JVMTI_ENV_FILL := $(JAVA_SMALL) -cp $(JVMTI_TOOLS_OUTPUTDIR) jvmtiEnvFill
|
||||
|
||||
################################################################################
|
||||
# Setup make rules for an xml transform for jvmti/trace file generation.
|
||||
#
|
||||
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||
# and the targets generated are listed in a variable by that name. This name is
|
||||
# also used as the name of the output file.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# XML_FILE -- The input source file to use
|
||||
# XSL_FILE -- The xsl file to use
|
||||
# OUTPUT_DIR -- The directory to put the generated file in
|
||||
# ARGS -- Additional arguments to the jvmtiGen tool
|
||||
# DEPS -- Additional dependencies
|
||||
SetupXslTransform = $(NamedParamsMacroTemplate)
|
||||
define SetupXslTransformBody
|
||||
$$($1_OUTPUT_DIR)/$1: $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS)
|
||||
$$(call LogInfo, Generating $$(@F))
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) -XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
|
||||
# jvmtiGen does not return error code properly on fail.
|
||||
# NOTE: We should really fix jvmtiGen.java instead.
|
||||
test -f $$@
|
||||
|
||||
TARGETS += $$($1_OUTPUT_DIR)/$1
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Create JVMTI files in gensrc/jvmtifiles
|
||||
|
||||
JVMTI_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/prims
|
||||
JVMTI_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles
|
||||
|
||||
# Setup rule for generating a jvmti file
|
||||
#
|
||||
# $1 is generated source file name in $(JVMTI_OUTPUTDIR)
|
||||
# $2 is XSL file to use in $(JVMTI_SRCDIR)
|
||||
# $3 is optional extra arguments to jvmtiGen
|
||||
define SetupJvmtiGeneration
|
||||
$$(eval $$(call SetupXslTransform, $1, \
|
||||
XML_FILE := $$(JVMTI_SRCDIR)/jvmti.xml, \
|
||||
XSL_FILE := $$(JVMTI_SRCDIR)/$(strip $2), \
|
||||
OUTPUT_DIR := $$(JVMTI_OUTPUTDIR), \
|
||||
ARGS := $3, \
|
||||
DEPS := $$(JVMTI_SRCDIR)/jvmtiLib.xsl, \
|
||||
))
|
||||
endef
|
||||
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnter.cpp, jvmtiEnter.xsl, \
|
||||
-PARAM interface jvmti))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnterTrace.cpp, jvmtiEnter.xsl, \
|
||||
-PARAM interface jvmti -PARAM trace Trace))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnv.hpp, jvmtiHpp.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.h, jvmtiH.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmti.html, jvmti.xsl))
|
||||
$(eval $(call SetupJvmtiGeneration, jvmtiEnvStub.cpp, jvmtiEnv.xsl))
|
||||
|
||||
JVMTI_BC_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/interpreter
|
||||
|
||||
$(eval $(call SetupXslTransform, bytecodeInterpreterWithChecks.cpp, \
|
||||
XML_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xml, \
|
||||
XSL_FILE := $(JVMTI_BC_SRCDIR)/bytecodeInterpreterWithChecks.xsl, \
|
||||
OUTPUT_DIR := $(JVMTI_OUTPUTDIR), \
|
||||
DEPS := $(JVMTI_BC_SRCDIR)/bytecodeInterpreter.cpp, \
|
||||
))
|
||||
|
||||
# We need $(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp (generated above) as input
|
||||
$(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp: $(JVMTI_SRCDIR)/jvmtiEnv.cpp \
|
||||
$(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp $(BUILD_JVMTI_TOOLS)
|
||||
$(call LogInfo, Generating $(@F))
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, $(TOOL_JVMTI_ENV_FILL) $(JVMTI_SRCDIR)/jvmtiEnv.cpp \
|
||||
$(JVMTI_OUTPUTDIR)/jvmtiEnvStub.cpp \
|
||||
$(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp)
|
||||
# jvmtiEnvFill does not necessarily return an error code on failure.
|
||||
# NOTE: We should really fix jvmtiEnvFill.java instead.
|
||||
test -f $@
|
||||
|
||||
TARGETS += $(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp
|
||||
|
||||
################################################################################
|
||||
# Create trace files in gensrc/tracefiles
|
||||
|
||||
TRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles
|
||||
TRACE_SRCDIR := $(HOTSPOT_TOPDIR)/src/share/vm/trace
|
||||
|
||||
# Append directories to search (might have been set by custom extensions)
|
||||
TRACE_SEARCH_DIRS += $(TRACE_SRCDIR)
|
||||
|
||||
TRACE_XML ?= $(TRACE_SRCDIR)/trace.xml
|
||||
|
||||
# Changing these will trigger a rebuild of generated trace files.
|
||||
TRACE_DEPS += \
|
||||
$(TRACE_XML) \
|
||||
$(TRACE_SRCDIR)/tracetypes.xml \
|
||||
$(TRACE_SRCDIR)/tracerelationdecls.xml \
|
||||
$(TRACE_SRCDIR)/traceevents.xml \
|
||||
$(TRACE_SRCDIR)/trace.dtd \
|
||||
$(TRACE_SRCDIR)/xinclude.mod \
|
||||
#
|
||||
|
||||
# Setup rule for generating a trace file
|
||||
#
|
||||
# $1 is generated source file name in $(TRACE_OUTPUTDIR)
|
||||
define SetupTraceGeneration
|
||||
$$(eval $$(call SetupXslTransform, $1, \
|
||||
XML_FILE := $$(TRACE_XML), \
|
||||
XSL_FILE := $$(firstword $$(wildcard $$(addsuffix /$$(basename $1).xsl, $$(TRACE_SEARCH_DIRS)))), \
|
||||
OUTPUT_DIR := $$(TRACE_OUTPUTDIR), \
|
||||
DEPS := $$(TRACE_DEPS), \
|
||||
))
|
||||
endef
|
||||
|
||||
# Append files to generated (might have been set by custom extensions)
|
||||
TRACE_GENSRC_FILES += \
|
||||
traceEventClasses.hpp \
|
||||
traceEventIds.hpp \
|
||||
traceTypes.hpp \
|
||||
#
|
||||
|
||||
# Call SetupTraceGeneration for all trace gensrc files
|
||||
$(foreach tracefile, $(TRACE_GENSRC_FILES), \
|
||||
$(eval $(call SetupTraceGeneration, $(tracefile))) \
|
||||
)
|
153
hotspot/makefiles/ide/CreateVSProject.gmk
Normal file
153
hotspot/makefiles/ide/CreateVSProject.gmk
Normal file
@ -0,0 +1,153 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# This must be the first rule
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# The next part is a bit hacky. We include the CompileJvm.gmk to be
|
||||
# able to extact flags, but we do not wish to execute the rules.
|
||||
|
||||
# Use client as base for defines and includes
|
||||
JVM_VARIANT=client
|
||||
|
||||
include HotspotCommon.gmk
|
||||
include lib/CompileJvm.gmk
|
||||
|
||||
# Reset targets so we don't build libjvm.
|
||||
TARGETS :=
|
||||
|
||||
# Helper macro to convert a unix path to a Windows path, suitable for
|
||||
# inclusion in a command line.
|
||||
FixPath = \
|
||||
$(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
|
||||
|
||||
JVM_DEFINES_client := $(patsubst -D%,%, $(filter -D%, $(JVM_CFLAGS)))
|
||||
EXTRACTED_DEFINES_client := $(addprefix -define , $(JVM_DEFINES_client))
|
||||
|
||||
JVM_INCLUDES_client := $(patsubst -I%,%, $(filter -I%, $(JVM_CFLAGS)))
|
||||
EXTRACTED_INCLUDES_client := $(foreach path, $(JVM_INCLUDES_client), -absoluteInclude $(call FixPath, $(path)))
|
||||
|
||||
# Hand-code variant-specific arguments, based on the fact that we use
|
||||
# client for general arguments. Not optimal but other solutions require
|
||||
# major changes in ProjectCreator.
|
||||
ADDITIONAL_VARIANT_ARGS := \
|
||||
-define_server COMPILER2 \
|
||||
-ignorePath_client adfiles \
|
||||
-ignorePath_client c2_ \
|
||||
-ignorePath_client runtime_ \
|
||||
-ignorePath_client libadt \
|
||||
-ignorePath_client opto \
|
||||
#
|
||||
|
||||
IGNORED_PLATFORMS_ARGS := \
|
||||
-ignorePath aarch64 \
|
||||
-ignorePath aix \
|
||||
-ignorePath arm \
|
||||
-ignorePath bsd \
|
||||
-ignorePath linux \
|
||||
-ignorePath posix \
|
||||
-ignorePath ppc \
|
||||
-ignorePath shark \
|
||||
-ignorePath solaris \
|
||||
-ignorePath sparc \
|
||||
-ignorePath x86_32 \
|
||||
-ignorePath zero \
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Build the ProjectCreator java tool.
|
||||
|
||||
TOOLS_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/support/tools_classes
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_PROJECT_CREATOR, \
|
||||
SETUP := GENERATE_OLDBYTECODE, \
|
||||
ADD_JAVAC_FLAGS := -Xlint:-auxiliaryclass, \
|
||||
SRC := $(HOTSPOT_TOPDIR)/makefiles/src/classes, \
|
||||
BIN := $(TOOLS_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_PROJECT_CREATOR)
|
||||
|
||||
# Run the ProjectCreator tool
|
||||
PROJECT_CREATOR_TOOL := $(JAVA_SMALL) -cp $(TOOLS_OUTPUTDIR) build.tools.projectcreator.ProjectCreator
|
||||
|
||||
IDE_OUTPUTDIR := $(BUILD_OUTPUT)/ide/hotspot-visualstudio
|
||||
|
||||
VCPROJ_FILE := $(IDE_OUTPUTDIR)/jvm.vcxproj
|
||||
|
||||
PROJECT_CREATOR_CLASS := build.tools.projectcreator.WinGammaPlatformVC10
|
||||
|
||||
# We hard-code gensrc dir to server (since this includes adfiles)
|
||||
PROJECT_CREATOR_ARGS := \
|
||||
-sourceBase $(call FixPath, $(HOTSPOT_TOPDIR)) \
|
||||
-startAt src \
|
||||
-relativeSrcInclude src \
|
||||
-hidePath .hg \
|
||||
-hidePath .jcheck \
|
||||
-hidePath jdk.hotspot.agent \
|
||||
-hidePath jdk.vm.ci \
|
||||
-hidePath jdk.jfr \
|
||||
-compiler VC10 \
|
||||
-jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \
|
||||
-platformName x64 \
|
||||
-buildBase $(call FixPath, $(IDE_OUTPUTDIR)/vs-output) \
|
||||
-buildSpace $(call FixPath, $(IDE_OUTPUTDIR)) \
|
||||
-makeBinary $(call FixPath, $(MAKE)) \
|
||||
-makeOutput $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-%f/libjvm) \
|
||||
-absoluteInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \
|
||||
-absoluteSrcInclude $(call FixPath, $(HOTSPOT_OUTPUTDIR)/variant-server/gensrc) \
|
||||
$(EXTRACTED_DEFINES_client) \
|
||||
$(EXTRACTED_INCLUDES_client) \
|
||||
$(ADDITIONAL_VARIANT_ARGS) \
|
||||
$(IGNORED_PLATFORMS_ARGS) \
|
||||
#
|
||||
|
||||
VCPROJ_VARDEPS := $(PROJECT_CREATOR_CLASS) $(PROJECT_CREATOR_ARGS)
|
||||
VCPROJ_VARDEPS_FILE := $(call DependOnVariable, VCPROJ_VARDEPS, \
|
||||
$(VCPROJ_FILE).vardeps)
|
||||
|
||||
$(VCPROJ_FILE): $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
|
||||
$(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $@)) \
|
||||
$(LOG_INFO)
|
||||
|
||||
TARGETS += $(VCPROJ_FILE)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
else
|
||||
all:
|
||||
$(info Hotspot Visual Studio generation only supported on Windows)
|
||||
endif
|
||||
|
||||
.PHONY: all
|
217
hotspot/makefiles/lib/CompileDtracePostJvm.gmk
Normal file
217
hotspot/makefiles/lib/CompileDtracePostJvm.gmk
Normal file
@ -0,0 +1,217 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Support for dtrace integration with libjvm, and stand-alone dtrace library
|
||||
# compilation.
|
||||
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
##############################################################################
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
############################################################################
|
||||
# Integrate with libjvm. Here we generate three object files which are
|
||||
# linked with libjvm.so. This step is complicated from a dependency
|
||||
# perspective, since it needs the rest of the compiled object files from the
|
||||
# libjvm compilation, but the output is object files that are to be included
|
||||
# when linking libjvm.so. So this generation must happen as a part of the
|
||||
# libjvm compilation.
|
||||
|
||||
# First we need to generate the dtraceGenOffsets tool. When run, this will
|
||||
# produce more header files and a C++ file.
|
||||
|
||||
# Note that generateJvmOffsets.cpp must be compiled as if it were a file
|
||||
# in the libjvm.so, using JVM_CFLAGS as setup in CompileJvm.gmk. Otherwise
|
||||
# this would preferrably have been done as a part of GensrcDtrace.gmk.
|
||||
$(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
|
||||
SRC := $(HOTSPOT_TOPDIR)/src/os/$(OPENJDK_TARGET_OS)/dtrace, \
|
||||
INCLUDE_FILES := generateJvmOffsets.cpp generateJvmOffsetsMain.c, \
|
||||
CC := $(BUILD_CXX), \
|
||||
CXX := $(BUILD_CXX), \
|
||||
LDEXE := $(BUILD_CXX), \
|
||||
generateJvmOffsets.cpp_CXXFLAGS := $(JVM_CFLAGS) -mt -xnolib -norunpath, \
|
||||
generateJvmOffsetsMain.c_CFLAGS := -library=%none -mt -m64 -norunpath -z nodefs, \
|
||||
LDFLAGS := -m64, \
|
||||
LIBS := -lc, \
|
||||
OBJECT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets/objs, \
|
||||
OUTPUT_DIR := $(JVM_VARIANT_OUTPUTDIR)/tools/dtrace-gen-offsets, \
|
||||
PROGRAM := dtraceGenOffsets, \
|
||||
))
|
||||
|
||||
DTRACE_GEN_OFFSETS_TOOL := $(BUILD_DTRACE_GEN_OFFSETS_TARGET)
|
||||
|
||||
# Argument 1: Output filename
|
||||
# Argument 2: dtrace-gen-offset tool command line option
|
||||
define SetupDtraceOffsetsGeneration
|
||||
$1: $$(BUILD_DTRACE_GEN_OFFSETS)
|
||||
$$(call LogInfo, Generating dtrace $2 file $$(@F))
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, $$(DTRACE_GEN_OFFSETS_TOOL) -$$(strip $2) > $$@)
|
||||
|
||||
TARGETS += $1
|
||||
endef
|
||||
|
||||
JVM_OFFSETS_H := $(DTRACE_SUPPORT_DIR)/JvmOffsets.h
|
||||
JVM_OFFSETS_CPP := $(DTRACE_SUPPORT_DIR)/JvmOffsets.cpp
|
||||
JVM_OFFSETS_INDEX_H := $(DTRACE_SUPPORT_DIR)/JvmOffsetsIndex.h
|
||||
|
||||
# Run the dtrace-gen-offset tool to generate these three files.
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_H), header))
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_INDEX_H), index))
|
||||
$(eval $(call SetupDtraceOffsetsGeneration, $(JVM_OFFSETS_CPP), table))
|
||||
|
||||
############################################################################
|
||||
# Compile JVM_OFFSETS_OBJ which is linked with libjvm.so.
|
||||
|
||||
# JvmOffsets.cpp is compiled without the common JVM_CFLAGS. Otherwise, the
|
||||
# natural way would have been to included this source code in BUILD_LIBJVM.
|
||||
JVM_OFFSETS_CFLAGS := -m64
|
||||
ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
JVM_OFFSETS_CFLAGS += -xarch=sparc
|
||||
endif
|
||||
|
||||
$(JVM_OFFSETS_OBJ): $(JVM_OFFSETS_CPP) $(JVM_OFFSETS_H)
|
||||
$(call LogInfo, Compiling dtrace file JvmOffsets.cpp (for libjvm.so))
|
||||
$(call ExecuteWithLog, $@, $(CXX) -c -I$(<D) -o $@ $(JVM_OFFSETS_CFLAGS) $<)
|
||||
|
||||
############################################################################
|
||||
# Generate DTRACE_OBJ which is linked with libjvm.so.
|
||||
|
||||
# Concatenate all *.d files into a single file
|
||||
DTRACE_SOURCE_FILES := $(addprefix $(HOTSPOT_TOPDIR)/src/os/posix/dtrace/, \
|
||||
hotspot_jni.d \
|
||||
hotspot.d \
|
||||
hs_private.d \
|
||||
)
|
||||
|
||||
$(JVM_OUTPUTDIR)/objs/dtrace.d: $(DTRACE_SOURCE_FILES)
|
||||
$(call LogInfo, Generating $(@F))
|
||||
$(call MakeDir, $(@D))
|
||||
$(CAT) $^ > $@
|
||||
|
||||
DTRACE_INSTRUMENTED_OBJS := $(addprefix $(JVM_OUTPUTDIR)/objs/, \
|
||||
ciEnv.o \
|
||||
classLoadingService.o \
|
||||
compileBroker.o \
|
||||
hashtable.o \
|
||||
instanceKlass.o \
|
||||
java.o \
|
||||
jni.o \
|
||||
jvm.o \
|
||||
memoryManager.o \
|
||||
nmethod.o \
|
||||
objectMonitor.o \
|
||||
runtimeService.o \
|
||||
sharedRuntime.o \
|
||||
synchronizer.o \
|
||||
thread.o \
|
||||
unsafe.o \
|
||||
vmThread.o \
|
||||
vmGCOperations.o \
|
||||
)
|
||||
|
||||
ifeq ($(call check-jvm-feature, all-gcs), true)
|
||||
DTRACE_INSTRUMENTED_OBJS += $(addprefix $(JVM_OUTPUTDIR)/objs/, \
|
||||
vmCMSOperations.o \
|
||||
vmPSOperations.o \
|
||||
)
|
||||
endif
|
||||
|
||||
DTRACE_FLAGS := -64 -G
|
||||
DTRACE_CPP_FLAGS := -D_LP64
|
||||
|
||||
# Make sure we run our selected compiler for preprocessing instead of letting
|
||||
# the dtrace tool pick it on it's own.
|
||||
$(DTRACE_OBJ): $(JVM_OUTPUTDIR)/objs/dtrace.d $(DTRACE_INSTRUMENTED_OBJS)
|
||||
$(call LogInfo, Generating $(@F) from $(<F) and object files)
|
||||
$(call MakeDir, $(DTRACE_SUPPORT_DIR))
|
||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
|
||||
$(DTRACE_CPP_FLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -xlazyload -o $@ \
|
||||
-s $(DTRACE_SUPPORT_DIR)/$(@F).d $(sort $(DTRACE_INSTRUMENTED_OBJS)))
|
||||
|
||||
############################################################################
|
||||
# Generate DTRACE_JHELPER_OBJ which is linked with libjvm.so.
|
||||
|
||||
# Unfortunately dtrace generates incorrect types for some symbols in
|
||||
# dtrace_jhelper.o, resulting in "warning: symbol X has differing types"
|
||||
# This is tracked in JDK-6890703.
|
||||
$(DTRACE_JHELPER_OBJ): $(HOTSPOT_TOPDIR)/src/os/solaris/dtrace/jhelper.d \
|
||||
$(JVM_OFFSETS_INDEX_H)
|
||||
$(call LogInfo, Running dtrace for $(<F))
|
||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) $(DTRACE_CPP_FLAGS) -C \
|
||||
-I$(DTRACE_SUPPORT_DIR) -o $@ -s $<)
|
||||
|
||||
# NOTE: We should really do something like this, but unfortunately this
|
||||
# results in a compilation error. :-(
|
||||
# $(call MakeDir, $(DTRACE_SUPPORT_DIR))
|
||||
# $(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, $(CC) -E \
|
||||
# $(DTRACE_CPP_FLAGS) -I$(DTRACE_SUPPORT_DIR) $^ \
|
||||
# > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
# $(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -o $@ \
|
||||
# -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||
|
||||
############################################################################
|
||||
# Build the stand-alone dtrace libraries
|
||||
|
||||
LIBJVM_DTRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm_dtrace
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DTRACE, \
|
||||
LIBRARY := jvm_dtrace, \
|
||||
OUTPUT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR), \
|
||||
SRC := $(HOTSPOT_TOPDIR)/src/os/solaris/dtrace, \
|
||||
INCLUDE_FILES := jvm_dtrace.c, \
|
||||
CFLAGS := -m64 -G -mt -KPIC, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := $(LIBDL) -lc -lthread -ldoor, \
|
||||
MAPFILE := $(HOTSPOT_TOPDIR)/makefiles/mapfiles/libjvm_dtrace/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR)/objs, \
|
||||
STRIP_SYMBOLS := true, \
|
||||
))
|
||||
|
||||
LIBJVM_DB_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm_db
|
||||
|
||||
# Note that libjvm_db.c has tests for COMPILER2, but this was never set by
|
||||
# the old build.
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DB, \
|
||||
LIBRARY := jvm_db, \
|
||||
OUTPUT_DIR := $(LIBJVM_DB_OUTPUTDIR), \
|
||||
SRC := $(HOTSPOT_TOPDIR)/src/os/solaris/dtrace, \
|
||||
INCLUDE_FILES := libjvm_db.c, \
|
||||
CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \
|
||||
-m64 -G -mt -KPIC, \
|
||||
LDFLAGS := -m64 -mt -xnolib $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := -lc, \
|
||||
MAPFILE := $(HOTSPOT_TOPDIR)/makefiles/mapfiles/libjvm_db/mapfile-vers, \
|
||||
OBJECT_DIR := $(LIBJVM_DB_OUTPUTDIR)/objs, \
|
||||
STRIP_SYMBOLS := true, \
|
||||
))
|
||||
|
||||
# We need the generated JvmOffsets.h before we can compile the libjvm_db source code.
|
||||
$(BUILD_LIBJVM_DB_ALL_OBJS): $(JVM_OFFSETS_H)
|
||||
|
||||
TARGETS += $(BUILD_LIBJVM_DTRACE) $(BUILD_LIBJVM_DB)
|
||||
endif
|
||||
endif
|
36
hotspot/makefiles/lib/CompileDtracePreJvm.gmk
Normal file
36
hotspot/makefiles/lib/CompileDtracePreJvm.gmk
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
# These files are are generated by CompileDtrace.gmk but consumed by
|
||||
# CompileJvm.gmk
|
||||
DTRACE_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace.o
|
||||
DTRACE_JHELPER_OBJ := $(JVM_OUTPUTDIR)/objs/dtrace_jhelper.o
|
||||
JVM_OFFSETS_OBJ := $(JVM_OUTPUTDIR)/objs/JvmOffsets.o
|
||||
|
||||
DTRACE_EXTRA_OBJECT_FILES := $(DTRACE_OBJ) $(DTRACE_JHELPER_OBJ) $(JVM_OFFSETS_OBJ)
|
||||
endif
|
||||
endif
|
242
hotspot/makefiles/lib/CompileJvm.gmk
Normal file
242
hotspot/makefiles/lib/CompileJvm.gmk
Normal file
@ -0,0 +1,242 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Include support files that will setup compiler flags due to the selected
|
||||
# jvm feature set, and specific file overrides.
|
||||
include lib/JvmFeatures.gmk
|
||||
include lib/JvmOverrideFiles.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, lib/CompileJvm.gmk))
|
||||
|
||||
################################################################################
|
||||
# Setup compilation of the main Hotspot native library (libjvm).
|
||||
|
||||
JVM_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/libjvm
|
||||
JVM_MAPFILE := $(JVM_OUTPUTDIR)/mapfile
|
||||
|
||||
################################################################################
|
||||
# Platform independent setup
|
||||
|
||||
# This variable may be added to by a custom extension
|
||||
JVM_SRC_ROOTS += $(HOTSPOT_TOPDIR)/src
|
||||
|
||||
JVM_SRC_DIRS += $(call uniq, $(wildcard $(foreach d, $(JVM_SRC_ROOTS), \
|
||||
$d/share/vm \
|
||||
$d/os/$(HOTSPOT_TARGET_OS)/vm \
|
||||
$d/os/$(HOTSPOT_TARGET_OS_TYPE)/vm \
|
||||
$d/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm \
|
||||
$d/os_cpu/$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH)/vm \
|
||||
))) \
|
||||
$(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles \
|
||||
$(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles \
|
||||
#
|
||||
|
||||
JVM_CFLAGS_INCLUDES += \
|
||||
$(patsubst %,-I%,$(filter-out $(JVM_VARIANT_OUTPUTDIR)/gensrc/%, $(JVM_SRC_DIRS))) \
|
||||
-I$(JVM_VARIANT_OUTPUTDIR)/gensrc \
|
||||
-I$(HOTSPOT_TOPDIR)/src/share/vm/precompiled \
|
||||
-I$(HOTSPOT_TOPDIR)/src/share/vm/prims \
|
||||
#
|
||||
|
||||
JVM_CFLAGS_TARGET_DEFINES += \
|
||||
-DTARGET_OS_FAMILY_$(HOTSPOT_TARGET_OS) \
|
||||
-DTARGET_ARCH_MODEL_$(HOTSPOT_TARGET_CPU) \
|
||||
-DTARGET_ARCH_$(HOTSPOT_TARGET_CPU_ARCH) \
|
||||
-DTARGET_OS_ARCH_MODEL_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU) \
|
||||
-DTARGET_OS_ARCH_$(HOTSPOT_TARGET_OS)_$(HOTSPOT_TARGET_CPU_ARCH) \
|
||||
-DTARGET_COMPILER_$(HOTSPOT_TOOLCHAIN_TYPE) \
|
||||
-D$(HOTSPOT_TARGET_CPU_DEFINE) \
|
||||
-DHOTSPOT_LIB_ARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' \
|
||||
#
|
||||
|
||||
ifeq ($(DEBUG_LEVEL), release)
|
||||
# For hotspot, release builds differ internally between "optimized" and "product"
|
||||
# in that "optimize" does not define PRODUCT.
|
||||
ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized)
|
||||
JVM_CFLAGS_DEBUGLEVEL := -DPRODUCT
|
||||
endif
|
||||
else ifeq ($(DEBUG_LEVEL), fastdebug)
|
||||
JVM_CFLAGS_DEBUGLEVEL := -DASSERT
|
||||
ifeq ($(filter $(OPENJDK_TARGET_OS), windows aix), )
|
||||
# NOTE: Old build did not define CHECK_UNHANDLED_OOPS on Windows and AIX.
|
||||
JVM_CFLAGS_DEBUGLEVEL += -DCHECK_UNHANDLED_OOPS
|
||||
endif
|
||||
else ifeq ($(DEBUG_LEVEL), slowdebug)
|
||||
# _NMT_NOINLINE_ informs NMT that no inlining is done by the compiler
|
||||
JVM_CFLAGS_DEBUGLEVEL := -DASSERT -D_NMT_NOINLINE_
|
||||
endif
|
||||
|
||||
JVM_CFLAGS += \
|
||||
$(JVM_CFLAGS_DEBUGLEVEL) \
|
||||
$(JVM_CFLAGS_TARGET_DEFINES) \
|
||||
$(JVM_CFLAGS_FEATURES) \
|
||||
$(JVM_CFLAGS_INCLUDES) \
|
||||
$(EXTRA_CFLAGS) \
|
||||
#
|
||||
|
||||
JVM_LDFLAGS += \
|
||||
$(SHARED_LIBRARY_FLAGS) \
|
||||
$(JVM_LDFLAGS_FEATURES) \
|
||||
$(EXTRA_LDFLAGS) \
|
||||
#
|
||||
|
||||
JVM_LIBS += \
|
||||
$(JVM_LIBS_FEATURES) \
|
||||
#
|
||||
|
||||
# These files and directories are always excluded
|
||||
JVM_EXCLUDE_FILES += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp args.cc
|
||||
JVM_EXCLUDES += adlc
|
||||
|
||||
# Needed by vm_version.cpp
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
OPENJDK_TARGET_CPU_VM_VERSION := amd64
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
OPENJDK_TARGET_CPU_VM_VERSION := sparc
|
||||
else
|
||||
OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
|
||||
endif
|
||||
|
||||
CFLAGS_VM_VERSION := \
|
||||
$(VERSION_CFLAGS) \
|
||||
-DHOTSPOT_VERSION_STRING='"$(VERSION_STRING)"' \
|
||||
-DDEBUG_LEVEL='"$(DEBUG_LEVEL)"' \
|
||||
-DHOTSPOT_BUILD_USER='"$(USERNAME)"' \
|
||||
-DHOTSPOT_VM_DISTRO='"$(HOTSPOT_VM_DISTRO)"' \
|
||||
-DCPU='"$(OPENJDK_TARGET_CPU_VM_VERSION)"' \
|
||||
#
|
||||
|
||||
# -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
|
||||
ifeq ($(USE_PRECOMPILED_HEADER), 0)
|
||||
JVM_CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Platform specific setup
|
||||
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), linux macosx windows), )
|
||||
JVM_PRECOMPILED_HEADER := $(HOTSPOT_TOPDIR)/src/share/vm/precompiled/precompiled.hpp
|
||||
endif
|
||||
|
||||
ifneq ($(filter $(OPENJDK_TARGET_OS), macosx aix solaris), )
|
||||
# On macosx, aix and solaris we have to link with the C++ compiler
|
||||
JVM_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
else
|
||||
JVM_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86)
|
||||
JVM_EXCLUDE_PATTERNS += x86_64
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
JVM_EXCLUDE_PATTERNS += x86_32
|
||||
endif
|
||||
|
||||
# Inline assembly for solaris
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
JVM_CFLAGS += $(HOTSPOT_TOPDIR)/src/os_cpu/solaris_x86/vm/solaris_x86_64.il
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), sparcv9)
|
||||
JVM_CFLAGS += $(HOTSPOT_TOPDIR)/src/os_cpu/solaris_sparc/vm/solaris_sparc.il
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), solaris-sparcv9)
|
||||
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), false)
|
||||
# NOTE: In the old build, we weirdly enough set -g/-g0 always, regardless
|
||||
# of if debug symbols were needed. Without it, compilation fails on
|
||||
# sparc! :-(
|
||||
JVM_CFLAGS += -g0
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
|
||||
RC_DESC := 64-Bit$(SPACE)
|
||||
endif
|
||||
JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# NOTE: The old build did not strip binaries on macosx.
|
||||
JVM_STRIP_SYMBOLS := false
|
||||
else
|
||||
JVM_STRIP_SYMBOLS := true
|
||||
endif
|
||||
|
||||
JVM_OPTIMIZATION ?= HIGHEST_JVM
|
||||
|
||||
################################################################################
|
||||
# Now set up the actual compilation of the main hotspot native library
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
|
||||
TOOLCHAIN := $(JVM_TOOLCHAIN), \
|
||||
LIBRARY := jvm, \
|
||||
OUTPUT_DIR := $(JVM_OUTPUTDIR), \
|
||||
SRC := $(JVM_SRC_DIRS), \
|
||||
EXCLUDES := $(JVM_EXCLUDES), \
|
||||
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
|
||||
EXCLUDE_PATTERNS := $(JVM_EXCLUDE_PATTERNS), \
|
||||
EXTRA_OBJECT_FILES := $(DTRACE_EXTRA_OBJECT_FILES), \
|
||||
CFLAGS := $(JVM_CFLAGS), \
|
||||
CFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
CXXFLAGS_DEBUG_SYMBOLS := $(JVM_CFLAGS_SYMBOLS), \
|
||||
vm_version.cpp_CXXFLAGS := $(CFLAGS_VM_VERSION), \
|
||||
DISABLED_WARNINGS_clang := delete-non-virtual-dtor dynamic-class-memaccess \
|
||||
empty-body format logical-op-parentheses parentheses \
|
||||
parentheses-equality switch tautological-compare, \
|
||||
DISABLED_WARNINGS_xlc := 1540-0216 1540-0198 1540-1090 1540-1639 \
|
||||
1540-1088 1500-010, \
|
||||
ASFLAGS := $(JVM_ASFLAGS), \
|
||||
LDFLAGS := $(JVM_LDFLAGS), \
|
||||
LIBS := $(JVM_LIBS), \
|
||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
|
||||
MAPFILE := $(JVM_MAPFILE), \
|
||||
USE_MAPFILE_FOR_SYMBOLS := true, \
|
||||
STRIP_SYMBOLS := $(JVM_STRIP_SYMBOLS), \
|
||||
EMBED_MANIFEST := true, \
|
||||
RC_FLAGS := $(JVM_RCFLAGS), \
|
||||
VERSIONINFO_RESOURCE := $(HOTSPOT_TOPDIR)/src/os/windows/vm/version.rc, \
|
||||
PRECOMPILED_HEADER := $(JVM_PRECOMPILED_HEADER), \
|
||||
PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
|
||||
))
|
||||
|
||||
# AIX warning explanation:
|
||||
# 1500-010 : (W) WARNING in ...: Infinite loop. Program may not stop.
|
||||
# There are several infinite loops in the vm, so better suppress.
|
||||
# 1540-0198 : (W) The omitted keyword "private" is assumed for base class "...".
|
||||
# 1540-0216 : (W) An expression of type .. cannot be converted to type ..
|
||||
# In hotspot this fires for functionpointer to pointer conversions
|
||||
# 1540-1088 : (W) The exception specification is being ignored.
|
||||
# In hotspot this is caused by throw() in declaration of new() in nmethod.hpp.
|
||||
# 1540-1090 : (I) The destructor of "..." might not be called.
|
||||
# 1540-1639 : (I) The behavior of long type bit fields has changed ...
|
||||
|
||||
# Include mapfile generation. It relies on BUILD_LIBJVM_ALL_OBJS which is only
|
||||
# defined after the above call to BUILD_LIBJVM. Mapfile will be generated
|
||||
# after all object files are built, but before the jvm library is linked.
|
||||
include lib/JvmMapfile.gmk
|
||||
|
||||
TARGETS += $(BUILD_LIBJVM)
|
106
hotspot/makefiles/lib/CompileLibjsig.gmk
Normal file
106
hotspot/makefiles/lib/CompileLibjsig.gmk
Normal file
@ -0,0 +1,106 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Create the libjsig.so shared library
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include NativeCompilation.gmk
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS), windows)
|
||||
ifeq ($(STATIC_BUILD), false)
|
||||
LIBJSIG_STRIP_SYMBOLS := true
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
|
||||
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) $(EXTRA_CFLAGS)
|
||||
LIBJSIG_LIBS := $(LIBDL)
|
||||
|
||||
# NOTE: The old build compiled this library without -soname.
|
||||
# To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
|
||||
SET_SHARED_LIBRARY_NAME :=
|
||||
|
||||
# Flags for other CPUs can be provided in EXTRA_CFLAGS
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
LIBJSIG_CPU_FLAGS := -m64
|
||||
else ifeq ($(OPENJDK_TARGET_CPU), x86)
|
||||
LIBJSIG_CPU_FLAGS := -m32 -march=i586
|
||||
endif
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
LIBJSIG_CFLAGS := -m64 -KPIC -mt
|
||||
LIBJSIG_LDFLAGS := -m64 -mt -xnolib
|
||||
LIBJSIG_LIBS := $(LIBDL)
|
||||
|
||||
# NOTE: The old build compiled this library without -soname.
|
||||
# To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
|
||||
SET_SHARED_LIBRARY_NAME :=
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
LIBJSIG_CFLAGS := -q64 -D_GNU_SOURCE -D_REENTRANT -qpic=large
|
||||
LIBJSIG_LDFLAGS := -b64 -bexpall -G -bnoentry -qmkshrobj -brtl -bnolibpath -bernotok
|
||||
LIBJSIG_LIBS := $(LIBDL)
|
||||
|
||||
# NOTE: The old build compiled this library without -soname.
|
||||
# To emulate this, we need to clear out SET_SHARED_LIBRARY_NAME.
|
||||
SET_SHARED_LIBRARY_NAME :=
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
|
||||
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
|
||||
# NOTE: This lib is not stripped on macosx in old build. Looks like a mistake.
|
||||
LIBJSIG_STRIP_SYMBOLS := false
|
||||
else
|
||||
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
|
||||
endif
|
||||
|
||||
LIBJSIG_SRC_FILE := $(HOTSPOT_TOPDIR)/src/os/$(HOTSPOT_TARGET_OS)/vm/jsig.c
|
||||
LIBJSIG_MAPFILE := $(wildcard $(HOTSPOT_TOPDIR)/makefiles/mapfiles/libjsig/mapfile-vers-$(OPENJDK_TARGET_OS))
|
||||
LIBJSIG_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/libjsig
|
||||
|
||||
LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS)
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
|
||||
LIBRARY := jsig, \
|
||||
EXTRA_FILES := $(LIBJSIG_SRC_FILE), \
|
||||
OUTPUT_DIR := $(LIBJSIG_OUTPUTDIR), \
|
||||
LANG := C, \
|
||||
CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \
|
||||
LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \
|
||||
LIBS := $(LIBJSIG_LIBS), \
|
||||
MAPFILE := $(LIBJSIG_MAPFILE), \
|
||||
OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \
|
||||
STRIP_SYMBOLS := $(LIBJSIG_STRIP_SYMBOLS), \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBJSIG)
|
||||
endif
|
||||
endif
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
42
hotspot/makefiles/lib/CompileLibraries.gmk
Normal file
42
hotspot/makefiles/lib/CompileLibraries.gmk
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include NativeCompilation.gmk
|
||||
|
||||
include HotspotCommon.gmk
|
||||
|
||||
# The dtrace setup must be done both before and after CompileJvm.gmk, due to
|
||||
# intricate dependencies.
|
||||
include lib/CompileDtracePreJvm.gmk
|
||||
include lib/CompileJvm.gmk
|
||||
include lib/CompileDtracePostJvm.gmk
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all
|
144
hotspot/makefiles/lib/JvmFeatures.gmk
Normal file
144
hotspot/makefiles/lib/JvmFeatures.gmk
Normal file
@ -0,0 +1,144 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, lib/JvmFeatures.gmk))
|
||||
|
||||
################################################################################
|
||||
# Setup CFLAGS and EXCLUDES for the libjvm compilation, depending on which
|
||||
# jvm features are selected for this jvm variant.
|
||||
|
||||
ifeq ($(call check-jvm-feature, compiler1), true)
|
||||
JVM_CFLAGS_FEATURES += -DCOMPILER1
|
||||
else
|
||||
JVM_EXCLUDE_PATTERNS += c1_
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
JVM_CFLAGS_FEATURES += -DCOMPILER2
|
||||
JVM_SRC_DIRS += $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles
|
||||
else
|
||||
JVM_EXCLUDES += opto libadt
|
||||
JVM_EXCLUDE_FILES += bcEscapeAnalyzer.cpp ciTypeFlow.cpp
|
||||
JVM_EXCLUDE_PATTERNS += c2_ runtime_
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, zero), true)
|
||||
JVM_CFLAGS_FEATURES += -DZERO -DCC_INTERP -DZERO_LIBARCH='"$(OPENJDK_TARGET_CPU_LEGACY_LIB)"' $(LIBFFI_CFLAGS)
|
||||
JVM_LIBS_FEATURES += $(LIBFFI_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, shark), true)
|
||||
JVM_CFLAGS_FEATURES += -DSHARK $(LLVM_CFLAGS)
|
||||
JVM_LDFLAGS_FEATURES += $(LLVM_LDFLAGS)
|
||||
JVM_LIBS_FEATURES += $(LLVM_LIBS)
|
||||
else
|
||||
JVM_EXCLUDES += shark
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, minimal), true)
|
||||
JVM_CFLAGS_FEATURES += -DMINIMAL_JVM -DVMTYPE=\"Minimal\"
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
JVM_CFLAGS_FEATURES += -DDTRACE_ENABLED
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, static-build), true)
|
||||
JVM_CFLAGS_FEATURES += -DSTATIC_BUILD=1
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, jvmti), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_JVMTI=0
|
||||
JVM_EXCLUDE_FILES += jvmtiGetLoadedClasses.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
|
||||
jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
|
||||
jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
|
||||
jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp \
|
||||
jvmtiClassFileReconstituter.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, jvmci), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_JVMCI=0
|
||||
JVM_EXCLUDES += jvmci
|
||||
JVM_EXCLUDE_FILES += jvmciCodeInstaller_$(HOTSPOT_TARGET_CPU_ARCH).cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, fprof), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_FPROF=0
|
||||
JVM_EXCLUDE_FILES += fprofiler.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, vm-structs), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_VM_STRUCTS=0
|
||||
JVM_EXCLUDE_FILES += vmStructs.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, jni-check), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_JNI_CHECK=0
|
||||
JVM_EXCLUDE_FILES += jniCheck.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, services), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_SERVICES=0
|
||||
JVM_EXCLUDE_FILES += heapDumper.cpp heapInspection.cpp \
|
||||
attachListener_$(HOTSPOT_TARGET_OS).cpp attachListener.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, management), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_MANAGEMENT=0
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, cds), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_CDS=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
classListParser.cpp \
|
||||
classLoaderExt.cpp \
|
||||
filemap.cpp \
|
||||
metaspaceShared.cpp \
|
||||
metaspaceShared_$(HOTSPOT_TARGET_CPU).cpp \
|
||||
metaspaceShared_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
sharedClassUtil.cpp \
|
||||
sharedPathsMiscInfo.cpp \
|
||||
systemDictionaryShared.cpp \
|
||||
#
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, all-gcs), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_ALL_GCS=0
|
||||
JVM_EXCLUDE_PATTERNS += \
|
||||
cms/ g1/ parallel/
|
||||
JVM_EXCLUDE_FILES += \
|
||||
concurrentGCThread.cpp \
|
||||
plab.cpp
|
||||
JVM_EXCLUDE_FILES += \
|
||||
g1MemoryPool.cpp \
|
||||
psMemoryPool.cpp
|
||||
endif
|
||||
|
||||
ifneq ($(call check-jvm-feature, nmt), true)
|
||||
JVM_CFLAGS_FEATURES += -DINCLUDE_NMT=0
|
||||
JVM_EXCLUDE_FILES += \
|
||||
memBaseline.cpp memReporter.cpp mallocTracker.cpp virtualMemoryTracker.cpp nmtCommon.cpp \
|
||||
memTracker.cpp nmtDCmd.cpp mallocSiteTable.cpp
|
||||
endif
|
172
hotspot/makefiles/lib/JvmMapfile.gmk
Normal file
172
hotspot/makefiles/lib/JvmMapfile.gmk
Normal file
@ -0,0 +1,172 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, lib/JvmMapfile.gmk))
|
||||
|
||||
################################################################################
|
||||
# Combine a list of static symbols
|
||||
|
||||
ifneq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), windows-x86_64)
|
||||
# On Windows x86_64, we should not have any symbols at all, since that
|
||||
# results in duplicate warnings from the linker (JDK-8043491).
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-shared
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-unix
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-$(OPENJDK_TARGET_OS)), )
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-$(OPENJDK_TARGET_OS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring debug, $(DEBUG_LEVEL)), )
|
||||
ifneq ($(wildcard $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-$(OPENJDK_TARGET_OS)-debug), )
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-$(OPENJDK_TARGET_OS)-debug
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
# Additional mapfiles that are only used when dtrace is enabled
|
||||
ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
# This also covers the case of compiler1+compiler2.
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-solaris-dtrace-compiler2
|
||||
else ifeq ($(call check-jvm-feature, compiler1), true)
|
||||
SYMBOLS_SRC += $(HOTSPOT_TOPDIR)/makefiles/symbols/symbols-solaris-dtrace-compiler1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Create a dynamic list of symbols from the built object files. This is highly
|
||||
# platform dependent.
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
DUMP_SYMBOLS_CMD := $(NM) --defined-only *.o
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM|^UseSharedSpaces$$
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^_ZN9Arguments17SharedArchivePathE$$
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
DUMP_SYMBOLS_CMD := $(NM) -p *.o
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^__1c.*__vtbl_$$|^gHotSpotVM
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^UseSharedSpaces$$
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|^__1cJArgumentsRSharedArchivePath_$$
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$2 == "U") next; \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# nm on macosx prints out "warning: nm: no name list" to stderr for
|
||||
# files without symbols. Hide this, even at the expense of hiding real errors.
|
||||
DUMP_SYMBOLS_CMD := $(NM) -Uj *.o 2> /dev/null
|
||||
ifneq ($(FILTER_SYMBOLS_PATTERN), )
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)|
|
||||
endif
|
||||
FILTER_SYMBOLS_PATTERN := $(FILTER_SYMBOLS_PATTERN)^_ZTV|^gHotSpotVM
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$3 ~ /$(FILTER_SYMBOLS_PATTERN)/) print $$3; \
|
||||
}'
|
||||
|
||||
# NOTE: The script is from the old build. It is broken and finds no symbols.
|
||||
# The script below might be what was intended, but it failes to link with tons
|
||||
# of 'cannot export hidden symbol vtable for X'.
|
||||
# '{ if ($$1 ~ /^__ZTV/ || $$1 ~ /^_gHotSpotVM/) print substr($$1, 2) }'
|
||||
else ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
# NOTE: The old build had the solution below. This should to be fixed in
|
||||
# configure instead.
|
||||
|
||||
# On AIX we have to prevent that we pick up the 'nm' version from the GNU binutils
|
||||
# which may be installed under /opt/freeware/bin. So better use an absolute path here!
|
||||
# NM=/usr/bin/nm
|
||||
|
||||
DUMP_SYMBOLS_CMD := $(NM) -X64 -B -C *.o
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if (($$2="d" || $$2="D") && ($$3 ~ /^__vft/ || $$3 ~ /^gHotSpotVM/)) print $$3; \
|
||||
if ($$3 ~ /^UseSharedSpaces$$/) print $$3; \
|
||||
if ($$3 ~ /^SharedArchivePath__9Arguments$$/) print $$3; \
|
||||
}'
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
DUMP_SYMBOLS_CMD := $(DUMPBIN) -symbols *.obj
|
||||
FILTER_SYMBOLS_AWK_SCRIPT := \
|
||||
'{ \
|
||||
if ($$7 ~ /??_7.*@@6B@/ && $$7 !~ /type_info/) print $$7; \
|
||||
}'
|
||||
|
||||
else
|
||||
$(error Unknown target OS $(OPENJDK_TARGET_OS) in JvmMapfile.gmk)
|
||||
endif
|
||||
|
||||
# A more correct solution would be to send BUILD_LIBJVM_ALL_OBJS instead of
|
||||
# cd && *.o, but this will result in very long command lines, which is
|
||||
# problematic on some platforms.
|
||||
$(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
|
||||
$(call LogInfo, Generating symbol list from object files)
|
||||
$(CD) $(JVM_OUTPUTDIR)/objs && \
|
||||
$(DUMP_SYMBOLS_CMD) | $(NAWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > $@
|
||||
|
||||
SYMBOLS_SRC += $(JVM_OUTPUTDIR)/symbols-objects
|
||||
|
||||
################################################################################
|
||||
# Now concatenate all symbol lists into a single file and remove comments.
|
||||
|
||||
$(JVM_OUTPUTDIR)/symbols: $(SYMBOLS_SRC)
|
||||
$(SED) -e '/^#/d' $^ > $@
|
||||
|
||||
################################################################################
|
||||
# Finally convert the symbol list into a platform-specific mapfile
|
||||
|
||||
$(JVM_MAPFILE): $(JVM_OUTPUTDIR)/symbols
|
||||
$(call LogInfo, Creating mapfile)
|
||||
$(RM) $@
|
||||
ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# On macosx, we need to add a leading underscore
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " _" $$0 } }' < $^ > $@.tmp
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
# On windows, add an 'EXPORTS' header
|
||||
$(ECHO) "EXPORTS" > $@.tmp
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 } }' < $^ >> $@.tmp
|
||||
else
|
||||
# Assume standard linker script
|
||||
$(PRINTF) "SUNWprivate_1.1 { \n global: \n" > $@.tmp
|
||||
$(AWK) '{ if ($$0 ~ ".") { print " " $$0 ";" } }' < $^ >> $@.tmp
|
||||
$(PRINTF) " local: \n *; \n }; \n" >> $@.tmp
|
||||
endif
|
||||
$(MV) $@.tmp $@
|
168
hotspot/makefiles/lib/JvmOverrideFiles.gmk
Normal file
168
hotspot/makefiles/lib/JvmOverrideFiles.gmk
Normal file
@ -0,0 +1,168 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2016, 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. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot, lib/JvmOverrideFiles.gmk))
|
||||
|
||||
################################################################################
|
||||
# This file contains explicit overrides of CFLAGS and/or precompiled header
|
||||
# status for individual files on specific platforms.
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), linux)
|
||||
BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
|
||||
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)
|
||||
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
JVM_PRECOMPILED_HEADER_EXCLUDE := \
|
||||
sharedRuntimeTrig.cpp \
|
||||
sharedRuntimeTrans.cpp \
|
||||
#
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86)
|
||||
# Performance measurements show that by compiling GC related code, we could
|
||||
# significantly reduce the GC pause time on 32 bit Linux/Unix platforms by
|
||||
# compiling without the PIC flag (-fPIC on linux).
|
||||
# See 6454213 for more details.
|
||||
ALL_SRC := $(filter %.cpp, $(call CacheFind, $(HOTSPOT_TOPDIR)/src/share/vm))
|
||||
NONPIC_FILTER := $(addsuffix %, $(addprefix $(HOTSPOT_TOPDIR)/src/share/vm/, \
|
||||
memory oops gc))
|
||||
# Due to what looks like a bug in the old build implementation of this, add a
|
||||
# couple of more files that were accidentally matched as substrings of GC related
|
||||
# files.
|
||||
NONPIC_SRC := $(filter $(NONPIC_FILTER), $(ALL_SRC)) globals.cpp location.cpp
|
||||
# Declare variables for each source file that needs the pic flag like this:
|
||||
# BUILD_JVM_<srcfile>_CXXFLAGS := -fno-PIC
|
||||
# This will get implicitly picked up by SetupNativeCompilation below.
|
||||
$(foreach s, $(NONPIC_SRC), $(eval BUILD_LIBJVM_$(notdir $s)_CXXFLAGS := -fno-PIC))
|
||||
endif
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), solaris)
|
||||
ifneq ($(DEBUG_LEVEL), slowdebug)
|
||||
# Workaround for a bug in dtrace. If ciEnv::post_compiled_method_load_event()
|
||||
# is inlined, the resulting dtrace object file needs a reference to this
|
||||
# function, whose symbol name is too long for dtrace. So disable inlining
|
||||
# for this method for now. (fix this when dtrace bug 6258412 is fixed)
|
||||
BUILD_LIBJVM_ciEnv.cpp_CXXFLAGS := \
|
||||
-xinline=no%__1cFciEnvbFpost_compiled_method_load_event6MpnHnmethod__v_
|
||||
# dtrace cannot handle tail call optimization (6672627, 6693876)
|
||||
BUILD_LIBJVM_jni.cpp_CXXFLAGS := -Qoption ube -O~yz
|
||||
BUILD_LIBJVM_stubGenerator_$(HOTSPOT_TARGET_CPU).cpp_CXXFLAGS := -xspace
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
|
||||
# Temporary until SS10 C++ compiler is fixed
|
||||
BUILD_LIBJVM_generateOptoStub.cpp_CXXFLAGS := -xO2
|
||||
# Temporary util SS12u1 C++ compiler is fixed
|
||||
BUILD_LIBJVM_c1_LinearScan.cpp_CXXFLAGS := -xO2
|
||||
endif
|
||||
endif
|
||||
|
||||
# Need extra inlining to get oop_ps_push_contents functions to perform well enough.
|
||||
ifeq ($(DEBUG_LEVEL),release)
|
||||
BUILD_LIBJVM_psPromotionManager.cpp_CXXFLAGS := -W2,-Ainline:inc=1000
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG_LEVEL), fastdebug)
|
||||
# this hangs in iropt now (7113504)
|
||||
BUILD_LIBJVM_compileBroker.cpp_CXXFLAGS := -xO2
|
||||
|
||||
# Frame size > 100k if we allow inlining via -g0!
|
||||
BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS := +d
|
||||
BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS := +d
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)
|
||||
# ube explodes on x86
|
||||
BUILD_LIBJVM_bytecodeInterpreter.cpp_CXXFLAGS += -xO1
|
||||
BUILD_LIBJVM_bytecodeInterpreterWithChecks.cpp_CXXFLAGS += -xO1
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), macosx)
|
||||
# The copied fdlibm routines in these files must not be optimized
|
||||
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
# NOTE: The old build tested clang version to make sure this workaround
|
||||
# for the clang bug was still needed.
|
||||
BUILD_LIBJVM_loopTransform.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
ifneq ($(DEBUG_LEVEL), slowdebug)
|
||||
BUILD_LIBJVM_unsafe.cpp_CXXFLAGS := -O1
|
||||
endif
|
||||
|
||||
# The following files are compiled at various optimization
|
||||
# levels due to optimization issues encountered at the
|
||||
# default level. The Clang compiler issues a compile
|
||||
# time error if there is an optimization level specification
|
||||
# skew between the PCH file and the C++ file. Especially if the
|
||||
# PCH file is compiled at a higher optimization level than
|
||||
# the C++ file. One solution might be to prepare extra optimization
|
||||
# level specific PCH files for the opt build and use them here, but
|
||||
# it's probably not worth the effort as long as only a few files
|
||||
# need this special handling.
|
||||
JVM_PRECOMPILED_HEADER_EXCLUDE := \
|
||||
sharedRuntimeTrig.cpp \
|
||||
sharedRuntimeTrans.cpp \
|
||||
loopTransform.cpp \
|
||||
unsafe.cpp \
|
||||
jvmciCompilerToVM.cpp \
|
||||
#
|
||||
endif
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), aix)
|
||||
BUILD_LIBJVM_synchronizer.cpp_CXXFLAGS := -qnoinline
|
||||
BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
# Disable aggressive optimizations for functions in sharedRuntimeTrig.cpp
|
||||
# and sharedRuntimeTrans.cpp on ppc64.
|
||||
# -qstrict turns off the following optimizations:
|
||||
# * Performing code motion and scheduling on computations such as loads
|
||||
# and floating-point computations that may trigger an exception.
|
||||
# * Relaxing conformance to IEEE rules.
|
||||
# * Reassociating floating-point expressions.
|
||||
# When using '-qstrict' there still remains one problem
|
||||
# in javasoft.sqe.tests.api.java.lang.Math.sin5Tests when run in compile-all
|
||||
# mode, so don't optimize sharedRuntimeTrig.cpp at all.
|
||||
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(CXX_O_FLAG_NONE)
|
||||
|
||||
# Disable ELF decoder on AIX (AIX uses XCOFF).
|
||||
JVM_EXCLUDE_PATTERNS += elf
|
||||
|
||||
else ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
JVM_PRECOMPILED_HEADER_EXCLUDE := \
|
||||
bytecodeInterpreter.cpp \
|
||||
bytecodeInterpreterWithChecks.cpp \
|
||||
opcodes.cpp \
|
||||
os_windows.cpp \
|
||||
os_windows_x86.cpp \
|
||||
osThread_windows.cpp \
|
||||
#
|
||||
endif
|
38
hotspot/makefiles/mapfiles/libjsig/mapfile-vers-solaris
Normal file
38
hotspot/makefiles/mapfiles/libjsig/mapfile-vers-solaris
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
# Copyright (c) 2005, 2013, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
JVM_begin_signal_setting;
|
||||
JVM_end_signal_setting;
|
||||
JVM_get_libjsig_version;
|
||||
JVM_get_signal_action;
|
||||
sigaction;
|
||||
signal;
|
||||
sigset;
|
||||
local:
|
||||
*;
|
||||
};
|
38
hotspot/makefiles/mapfiles/libjvm_db/mapfile-vers
Normal file
38
hotspot/makefiles/mapfiles/libjvm_db/mapfile-vers
Normal file
@ -0,0 +1,38 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2005, 2008, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface.
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
Jagent_create;
|
||||
Jagent_destroy;
|
||||
Jframe_iter;
|
||||
#Jget_vframe;
|
||||
#Jlookup_by_regs;
|
||||
local:
|
||||
*;
|
||||
};
|
37
hotspot/makefiles/mapfiles/libjvm_dtrace/mapfile-vers
Normal file
37
hotspot/makefiles/mapfiles/libjvm_dtrace/mapfile-vers
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
|
||||
#
|
||||
# Copyright (c) 2006, 2008, 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.
|
||||
#
|
||||
#
|
||||
|
||||
# Define library interface for JVM-DTrace interface
|
||||
|
||||
SUNWprivate_1.1 {
|
||||
global:
|
||||
jvm_attach;
|
||||
jvm_get_last_error;
|
||||
jvm_enable_dtprobes;
|
||||
jvm_detach;
|
||||
local:
|
||||
*;
|
||||
};
|
27
hotspot/makefiles/symbols/symbols-aix
Normal file
27
hotspot/makefiles/symbols/symbols-aix
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_handle_linux_signal
|
||||
numa_error
|
||||
numa_warn
|
||||
sysThreadAvailableStackWithSlack
|
26
hotspot/makefiles/symbols/symbols-aix-debug
Normal file
26
hotspot/makefiles/symbols/symbols-aix-debug
Normal file
@ -0,0 +1,26 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_AccessVMBooleanFlag
|
||||
JVM_AccessVMIntFlag
|
||||
JVM_VMBreakPoint
|
27
hotspot/makefiles/symbols/symbols-linux
Normal file
27
hotspot/makefiles/symbols/symbols-linux
Normal file
@ -0,0 +1,27 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_handle_linux_signal
|
||||
numa_error
|
||||
numa_warn
|
||||
sysThreadAvailableStackWithSlack
|
24
hotspot/makefiles/symbols/symbols-macosx
Normal file
24
hotspot/makefiles/symbols/symbols-macosx
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_handle_bsd_signal
|
35
hotspot/makefiles/symbols/symbols-shared
Normal file
35
hotspot/makefiles/symbols/symbols-shared
Normal file
@ -0,0 +1,35 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
AsyncGetCallTrace
|
||||
jio_fprintf
|
||||
jio_printf
|
||||
jio_snprintf
|
||||
jio_vfprintf
|
||||
jio_vsnprintf
|
||||
JNI_CreateJavaVM
|
||||
JNI_GetCreatedJavaVMs
|
||||
JNI_GetDefaultJavaVMInitArgs
|
||||
JVM_FindClassFromBootLoader
|
||||
JVM_GetVersionInfo
|
||||
JVM_InitAgentProperties
|
25
hotspot/makefiles/symbols/symbols-solaris
Normal file
25
hotspot/makefiles/symbols/symbols-solaris
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_handle_solaris_signal
|
||||
sysThreadAvailableStackWithSlack
|
34
hotspot/makefiles/symbols/symbols-solaris-dtrace-compiler1
Normal file
34
hotspot/makefiles/symbols/symbols-solaris-dtrace-compiler1
Normal file
@ -0,0 +1,34 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
__1cGMethodG__vtbl_
|
||||
__1cHnmethodG__vtbl_
|
||||
__1cICodeBlobG__vtbl_
|
||||
__1cIUniverseO_collectedHeap_
|
||||
__1cJCodeCacheG_heaps_
|
||||
__1cKBufferBlobG__vtbl_
|
||||
__1cLRuntimeStubG__vtbl_
|
||||
__1cNSafepointBlobG__vtbl_
|
||||
__1cSDeoptimizationBlobG__vtbl_
|
||||
|
||||
__JvmOffsets
|
36
hotspot/makefiles/symbols/symbols-solaris-dtrace-compiler2
Normal file
36
hotspot/makefiles/symbols/symbols-solaris-dtrace-compiler2
Normal file
@ -0,0 +1,36 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
__1cGMethodG__vtbl_
|
||||
__1cHnmethodG__vtbl_
|
||||
__1cICodeBlobG__vtbl_
|
||||
__1cIUniverseO_collectedHeap_
|
||||
__1cJCodeCacheG_heaps_
|
||||
__1cKBufferBlobG__vtbl_
|
||||
__1cLRuntimeStubG__vtbl_
|
||||
__1cNSafepointBlobG__vtbl_
|
||||
__1cSDeoptimizationBlobG__vtbl_
|
||||
__1cNExceptionBlobG__vtbl_
|
||||
__1cQUncommonTrapBlobG__vtbl_
|
||||
|
||||
__JvmOffsets
|
194
hotspot/makefiles/symbols/symbols-unix
Normal file
194
hotspot/makefiles/symbols/symbols-unix
Normal file
@ -0,0 +1,194 @@
|
||||
#
|
||||
# Copyright (c) 2016, 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.
|
||||
#
|
||||
|
||||
JVM_ActiveProcessorCount
|
||||
JVM_ArrayCopy
|
||||
JVM_AssertionStatusDirectives
|
||||
JVM_CallStackWalk
|
||||
JVM_ClassDepth
|
||||
JVM_ClassLoaderDepth
|
||||
JVM_Clone
|
||||
JVM_ConstantPoolGetClassAt
|
||||
JVM_ConstantPoolGetClassAtIfLoaded
|
||||
JVM_ConstantPoolGetClassRefIndexAt
|
||||
JVM_ConstantPoolGetDoubleAt
|
||||
JVM_ConstantPoolGetFieldAt
|
||||
JVM_ConstantPoolGetFieldAtIfLoaded
|
||||
JVM_ConstantPoolGetFloatAt
|
||||
JVM_ConstantPoolGetIntAt
|
||||
JVM_ConstantPoolGetLongAt
|
||||
JVM_ConstantPoolGetMemberRefInfoAt
|
||||
JVM_ConstantPoolGetMethodAt
|
||||
JVM_ConstantPoolGetMethodAtIfLoaded
|
||||
JVM_ConstantPoolGetNameAndTypeRefIndexAt
|
||||
JVM_ConstantPoolGetNameAndTypeRefInfoAt
|
||||
JVM_ConstantPoolGetSize
|
||||
JVM_ConstantPoolGetStringAt
|
||||
JVM_ConstantPoolGetTagAt
|
||||
JVM_ConstantPoolGetUTF8At
|
||||
JVM_CountStackFrames
|
||||
JVM_CurrentClassLoader
|
||||
JVM_CurrentLoadedClass
|
||||
JVM_CurrentThread
|
||||
JVM_CurrentTimeMillis
|
||||
JVM_DefineClass
|
||||
JVM_DefineClassWithSource
|
||||
JVM_DesiredAssertionStatus
|
||||
JVM_DoPrivileged
|
||||
JVM_DumpAllStacks
|
||||
JVM_DumpThreads
|
||||
JVM_FillInStackTrace
|
||||
JVM_FindClassFromCaller
|
||||
JVM_FindClassFromClass
|
||||
JVM_FindLibraryEntry
|
||||
JVM_FindLoadedClass
|
||||
JVM_FindPrimitiveClass
|
||||
JVM_FindSignal
|
||||
JVM_FreeMemory
|
||||
JVM_GC
|
||||
JVM_GetAllThreads
|
||||
JVM_GetArrayElement
|
||||
JVM_GetArrayLength
|
||||
JVM_GetCallerClass
|
||||
JVM_GetClassAccessFlags
|
||||
JVM_GetClassAnnotations
|
||||
JVM_GetClassConstantPool
|
||||
JVM_GetClassContext
|
||||
JVM_GetClassCPEntriesCount
|
||||
JVM_GetClassCPTypes
|
||||
JVM_GetClassDeclaredConstructors
|
||||
JVM_GetClassDeclaredFields
|
||||
JVM_GetClassDeclaredMethods
|
||||
JVM_GetClassFieldsCount
|
||||
JVM_GetClassInterfaces
|
||||
JVM_GetClassMethodsCount
|
||||
JVM_GetClassModifiers
|
||||
JVM_GetClassName
|
||||
JVM_GetClassNameUTF
|
||||
JVM_GetClassSignature
|
||||
JVM_GetClassSigners
|
||||
JVM_GetClassTypeAnnotations
|
||||
JVM_GetCPClassNameUTF
|
||||
JVM_GetCPFieldClassNameUTF
|
||||
JVM_GetCPFieldModifiers
|
||||
JVM_GetCPFieldNameUTF
|
||||
JVM_GetCPFieldSignatureUTF
|
||||
JVM_GetCPMethodClassNameUTF
|
||||
JVM_GetCPMethodModifiers
|
||||
JVM_GetCPMethodNameUTF
|
||||
JVM_GetCPMethodSignatureUTF
|
||||
JVM_GetDeclaredClasses
|
||||
JVM_GetDeclaringClass
|
||||
JVM_GetEnclosingMethodInfo
|
||||
JVM_GetFieldIxModifiers
|
||||
JVM_GetFieldTypeAnnotations
|
||||
JVM_GetInheritedAccessControlContext
|
||||
JVM_GetInterfaceVersion
|
||||
JVM_GetManagement
|
||||
JVM_GetMethodIxArgsSize
|
||||
JVM_GetMethodIxByteCode
|
||||
JVM_GetMethodIxByteCodeLength
|
||||
JVM_GetMethodIxExceptionIndexes
|
||||
JVM_GetMethodIxExceptionsCount
|
||||
JVM_GetMethodIxExceptionTableEntry
|
||||
JVM_GetMethodIxExceptionTableLength
|
||||
JVM_GetMethodIxLocalsCount
|
||||
JVM_GetMethodIxMaxStack
|
||||
JVM_GetMethodIxModifiers
|
||||
JVM_GetMethodIxNameUTF
|
||||
JVM_GetMethodIxSignatureUTF
|
||||
JVM_GetMethodParameters
|
||||
JVM_GetMethodTypeAnnotations
|
||||
JVM_GetNanoTimeAdjustment
|
||||
JVM_GetPrimitiveArrayElement
|
||||
JVM_GetProtectionDomain
|
||||
JVM_GetSimpleBinaryName
|
||||
JVM_GetStackAccessControlContext
|
||||
JVM_GetStackTraceElements
|
||||
JVM_GetSystemPackage
|
||||
JVM_GetSystemPackages
|
||||
JVM_GetTemporaryDirectory
|
||||
JVM_GetVmArguments
|
||||
JVM_Halt
|
||||
JVM_HoldsLock
|
||||
JVM_IHashCode
|
||||
JVM_InitProperties
|
||||
JVM_InternString
|
||||
JVM_Interrupt
|
||||
JVM_InvokeMethod
|
||||
JVM_IsArrayClass
|
||||
JVM_IsConstructorIx
|
||||
JVM_IsInterface
|
||||
JVM_IsInterrupted
|
||||
JVM_IsPrimitiveClass
|
||||
JVM_IsSameClassPackage
|
||||
JVM_IsSupportedJNIVersion
|
||||
JVM_IsThreadAlive
|
||||
JVM_IsVMGeneratedMethodIx
|
||||
JVM_LatestUserDefinedLoader
|
||||
JVM_LoadLibrary
|
||||
JVM_MaxMemory
|
||||
JVM_MaxObjectInspectionAge
|
||||
JVM_MonitorNotify
|
||||
JVM_MonitorNotifyAll
|
||||
JVM_MonitorWait
|
||||
JVM_MoreStackWalk
|
||||
JVM_NanoTime
|
||||
JVM_NativePath
|
||||
JVM_NewArray
|
||||
JVM_NewInstanceFromConstructor
|
||||
JVM_NewMultiArray
|
||||
JVM_RaiseSignal
|
||||
JVM_RawMonitorCreate
|
||||
JVM_RawMonitorDestroy
|
||||
JVM_RawMonitorEnter
|
||||
JVM_RawMonitorExit
|
||||
JVM_RegisterSignal
|
||||
JVM_ReleaseUTF
|
||||
JVM_ResumeThread
|
||||
JVM_SetArrayElement
|
||||
JVM_SetClassSigners
|
||||
JVM_SetNativeThreadName
|
||||
JVM_SetPrimitiveArrayElement
|
||||
JVM_SetThreadPriority
|
||||
JVM_Sleep
|
||||
JVM_StartThread
|
||||
JVM_StopThread
|
||||
JVM_SupportsCX8
|
||||
JVM_SuspendThread
|
||||
JVM_ToStackTraceElement
|
||||
JVM_TotalMemory
|
||||
JVM_UnloadLibrary
|
||||
JVM_Yield
|
||||
|
||||
# Module related API's
|
||||
JVM_AddModuleExports
|
||||
JVM_AddModuleExportsToAll
|
||||
JVM_AddModuleExportsToAllUnnamed
|
||||
JVM_AddModulePackage
|
||||
JVM_AddReadsModule
|
||||
JVM_CanReadModule
|
||||
JVM_DefineModule
|
||||
JVM_IsExportedToModule
|
||||
JVM_SetBootLoaderUnnamedModule
|
||||
JVM_GetModuleByPackageName
|
@ -30,6 +30,5 @@
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
void pd_ps(frame f) {}
|
||||
|
@ -27,7 +27,6 @@
|
||||
#define CPU_AARCH64_VM_FRAME_AARCH64_HPP
|
||||
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// A frame represents a physical stack frame (an activation). Frames can be
|
||||
// C or Java frames, and the Java frames can be interpreted or compiled.
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// We have interfaces for the following instructions:
|
||||
// - NativeInstruction
|
||||
|
@ -198,6 +198,16 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm) {
|
||||
bool SharedRuntime::is_wide_vector(int size) {
|
||||
return size > 8;
|
||||
}
|
||||
|
||||
size_t SharedRuntime::trampoline_size() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) {
|
||||
__ mov(rscratch1, destination);
|
||||
__ br(rscratch1);
|
||||
}
|
||||
|
||||
// The java_calling_convention describes stack locations as ideal slots on
|
||||
// a frame with no abi restrictions. Since we must observe abi restrictions
|
||||
// (like the placement of the register window) the slots must be biased by
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
@ -360,7 +360,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
|
||||
length.set_instruction(x->length());
|
||||
length.load_item();
|
||||
}
|
||||
if (needs_store_check) {
|
||||
if (needs_store_check || x->check_boolean()) {
|
||||
value.load_item();
|
||||
} else {
|
||||
value.load_for_store(x->elt_type());
|
||||
@ -407,7 +407,8 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
|
||||
pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,
|
||||
true /* do_load */, false /* patch */, NULL);
|
||||
}
|
||||
__ move(value.result(), array_addr, null_check_info);
|
||||
LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
|
||||
__ move(result, array_addr, null_check_info);
|
||||
if (obj_store) {
|
||||
// Precise card mark.
|
||||
post_barrier(LIR_OprFact::address(array_addr), value.result());
|
||||
|
@ -30,6 +30,5 @@
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
void pd_ps(frame f) {}
|
||||
|
@ -27,7 +27,6 @@
|
||||
#define CPU_PPC_VM_FRAME_PPC_HPP
|
||||
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// C frame layout on PPC-64.
|
||||
//
|
||||
|
@ -169,6 +169,7 @@ void InterpreterMacroAssembler::load_earlyret_value(TosState state, Register Rsc
|
||||
case ltos: ld(R17_tos, in_bytes(JvmtiThreadState::earlyret_value_offset()), RjvmtiState);
|
||||
break;
|
||||
case btos: // fall through
|
||||
case ztos: // fall through
|
||||
case ctos: // fall through
|
||||
case stos: // fall through
|
||||
case itos: lwz(R17_tos, in_bytes(JvmtiThreadState::earlyret_value_offset()), RjvmtiState);
|
||||
@ -294,6 +295,7 @@ void InterpreterMacroAssembler::push(TosState state) {
|
||||
switch (state) {
|
||||
case atos: push_ptr(); break;
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case itos: push_i(); break;
|
||||
@ -309,6 +311,7 @@ void InterpreterMacroAssembler::pop(TosState state) {
|
||||
switch (state) {
|
||||
case atos: pop_ptr(); break;
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case itos: pop_i(); break;
|
||||
@ -749,6 +752,43 @@ void InterpreterMacroAssembler::merge_frames(Register Rsender_sp, Register retur
|
||||
stdux(Rscratch2, R1_SP, Rscratch1); // atomically set *(SP = top_frame_sp) = **SP
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::narrow(Register result) {
|
||||
Register ret_type = R11_scratch1;
|
||||
ld(R11_scratch1, in_bytes(Method::const_offset()), R19_method);
|
||||
lbz(ret_type, in_bytes(ConstMethod::result_type_offset()), R11_scratch1);
|
||||
|
||||
Label notBool, notByte, notChar, done;
|
||||
|
||||
// common case first
|
||||
cmpwi(CCR0, ret_type, T_INT);
|
||||
beq(CCR0, done);
|
||||
|
||||
cmpwi(CCR0, ret_type, T_BOOLEAN);
|
||||
bne(CCR0, notBool);
|
||||
andi(result, result, 0x1);
|
||||
b(done);
|
||||
|
||||
bind(notBool);
|
||||
cmpwi(CCR0, ret_type, T_BYTE);
|
||||
bne(CCR0, notByte);
|
||||
extsb(result, result);
|
||||
b(done);
|
||||
|
||||
bind(notByte);
|
||||
cmpwi(CCR0, ret_type, T_CHAR);
|
||||
bne(CCR0, notChar);
|
||||
andi(result, result, 0xffff);
|
||||
b(done);
|
||||
|
||||
bind(notChar);
|
||||
// cmpwi(CCR0, ret_type, T_SHORT); // all that's left
|
||||
// bne(CCR0, done);
|
||||
extsh(result, result);
|
||||
|
||||
// Nothing to do for T_INT
|
||||
bind(done);
|
||||
}
|
||||
|
||||
// Remove activation.
|
||||
//
|
||||
// Unlock the receiver if this is a synchronized method.
|
||||
|
@ -140,6 +140,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void get_cpool_and_tags(Register Rcpool, Register Rtags);
|
||||
void is_a(Label& L);
|
||||
|
||||
void narrow(Register result);
|
||||
|
||||
// Java Call Helpers
|
||||
void call_from_interpreter(Register Rtarget_method, Register Rret_addr, Register Rscratch1, Register Rscratch2);
|
||||
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// We have interfaces for the following instructions:
|
||||
//
|
||||
|
@ -483,6 +483,18 @@ bool SharedRuntime::is_wide_vector(int size) {
|
||||
assert(size <= 8, "%d bytes vectors are not supported", size);
|
||||
return size > 8;
|
||||
}
|
||||
|
||||
size_t SharedRuntime::trampoline_size() {
|
||||
return Assembler::load_const_size + 8;
|
||||
}
|
||||
|
||||
void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) {
|
||||
Register Rtemp = R12;
|
||||
__ load_const(Rtemp, destination);
|
||||
__ mtctr(Rtemp);
|
||||
__ bctr();
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
static int reg2slot(VMReg r) {
|
||||
return r->reg2stack() + SharedRuntime::out_preserve_stack_slots();
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
@ -655,6 +655,7 @@ address TemplateInterpreterGenerator::generate_return_entry_for(TosState state,
|
||||
switch (state) {
|
||||
case ltos:
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case atos:
|
||||
@ -701,6 +702,7 @@ address TemplateInterpreterGenerator::generate_deopt_entry_for(TosState state, i
|
||||
switch (state) {
|
||||
case ltos:
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case atos:
|
||||
@ -2092,12 +2094,14 @@ address TemplateInterpreterGenerator::generate_earlyret_entry_for(TosState state
|
||||
// Copied from TemplateTable::_return.
|
||||
// Restoration of lr done by remove_activation.
|
||||
switch (state) {
|
||||
// Narrow result if state is itos but result type is smaller.
|
||||
case itos: __ narrow(R17_tos); /* fall through */
|
||||
case ltos:
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case atos:
|
||||
case itos: __ mr(R3_RET, R17_tos); break;
|
||||
case atos: __ mr(R3_RET, R17_tos); break;
|
||||
case ftos:
|
||||
case dtos: __ fmr(F1_RET, F15_ftos); break;
|
||||
case vtos: // This might be a constructor. Final fields (and volatile fields on PPC64) need
|
||||
@ -2157,6 +2161,10 @@ address TemplateInterpreterGenerator::generate_trace_code(TosState state) {
|
||||
bname = "trace_code_btos {";
|
||||
tsize = 2;
|
||||
break;
|
||||
case ztos:
|
||||
bname = "trace_code_ztos {";
|
||||
tsize = 2;
|
||||
break;
|
||||
case ctos:
|
||||
bname = "trace_code_ctos {";
|
||||
tsize = 2;
|
||||
|
@ -170,6 +170,7 @@ void TemplateTable::patch_bytecode(Bytecodes::Code new_bc, Register Rnew_bc, Reg
|
||||
switch (new_bc) {
|
||||
case Bytecodes::_fast_aputfield:
|
||||
case Bytecodes::_fast_bputfield:
|
||||
case Bytecodes::_fast_zputfield:
|
||||
case Bytecodes::_fast_cputfield:
|
||||
case Bytecodes::_fast_dputfield:
|
||||
case Bytecodes::_fast_fputfield:
|
||||
@ -981,9 +982,21 @@ void TemplateTable::bastore() {
|
||||
Rarray = R12_scratch2,
|
||||
Rscratch = R3_ARG1;
|
||||
__ pop_i(Rindex);
|
||||
__ pop_ptr(Rarray);
|
||||
// tos: val
|
||||
// Rarray: array ptr (popped by index_check)
|
||||
__ index_check(Rarray, Rindex, 0, Rscratch, Rarray);
|
||||
|
||||
// Need to check whether array is boolean or byte
|
||||
// since both types share the bastore bytecode.
|
||||
__ load_klass(Rscratch, Rarray);
|
||||
__ lwz(Rscratch, in_bytes(Klass::layout_helper_offset()), Rscratch);
|
||||
int diffbit = exact_log2(Klass::layout_helper_boolean_diffbit());
|
||||
__ testbitdi(CCR0, R0, Rscratch, diffbit);
|
||||
Label L_skip;
|
||||
__ bfalse(CCR0, L_skip);
|
||||
__ andi(R17_tos, R17_tos, 1); // if it is a T_BOOLEAN array, mask the stored value to 0/1
|
||||
__ bind(L_skip);
|
||||
|
||||
__ index_check_without_pop(Rarray, Rindex, 0, Rscratch, Rarray);
|
||||
__ stb(R17_tos, arrayOopDesc::base_offset_in_bytes(T_BYTE), Rarray);
|
||||
}
|
||||
|
||||
@ -2108,12 +2121,16 @@ void TemplateTable::_return(TosState state) {
|
||||
__ remove_activation(state, /* throw_monitor_exception */ true);
|
||||
// Restoration of lr done by remove_activation.
|
||||
switch (state) {
|
||||
// Narrow result if state is itos but result type is smaller.
|
||||
// Need to narrow in the return bytecode rather than in generate_return_entry
|
||||
// since compiled code callers expect the result to already be narrowed.
|
||||
case itos: __ narrow(R17_tos); /* fall through */
|
||||
case ltos:
|
||||
case btos:
|
||||
case ztos:
|
||||
case ctos:
|
||||
case stos:
|
||||
case atos:
|
||||
case itos: __ mr(R3_RET, R17_tos); break;
|
||||
case atos: __ mr(R3_RET, R17_tos); break;
|
||||
case ftos:
|
||||
case dtos: __ fmr(F1_RET, F15_ftos); break;
|
||||
case vtos: // This might be a constructor. Final fields (and volatile fields on PPC64) need
|
||||
@ -2518,6 +2535,21 @@ void TemplateTable::getfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
__ beq(CCR6, Lacquire); // Volatile?
|
||||
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
|
||||
|
||||
__ align(32, 28, 28); // Align load.
|
||||
// __ bind(Lztos); (same code as btos)
|
||||
__ fence(); // Volatile entry point (one instruction before non-volatile_entry point).
|
||||
assert(branch_table[ztos] == 0, "can't compute twice");
|
||||
branch_table[ztos] = __ pc(); // non-volatile_entry point
|
||||
__ lbzx(R17_tos, Rclass_or_obj, Roffset);
|
||||
__ extsb(R17_tos, R17_tos);
|
||||
__ push(ztos);
|
||||
if (!is_static) {
|
||||
// use btos rewriting, no truncating to t/f bit is needed for getfield.
|
||||
patch_bytecode(Bytecodes::_fast_bgetfield, Rbc, Rscratch);
|
||||
}
|
||||
__ beq(CCR6, Lacquire); // Volatile?
|
||||
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
|
||||
|
||||
__ align(32, 28, 28); // Align load.
|
||||
// __ bind(Lctos);
|
||||
__ fence(); // Volatile entry point (one instruction before non-volatile_entry point).
|
||||
@ -2618,6 +2650,7 @@ void TemplateTable::jvmti_post_field_mod(Register Rcache, Register Rscratch, boo
|
||||
case Bytecodes::_fast_aputfield: __ push_ptr(); offs+= Interpreter::stackElementSize; break;
|
||||
case Bytecodes::_fast_iputfield: // Fall through
|
||||
case Bytecodes::_fast_bputfield: // Fall through
|
||||
case Bytecodes::_fast_zputfield: // Fall through
|
||||
case Bytecodes::_fast_cputfield: // Fall through
|
||||
case Bytecodes::_fast_sputfield: __ push_i(); offs+= Interpreter::stackElementSize; break;
|
||||
case Bytecodes::_fast_lputfield: __ push_l(); offs+=2*Interpreter::stackElementSize; break;
|
||||
@ -2658,6 +2691,7 @@ void TemplateTable::jvmti_post_field_mod(Register Rcache, Register Rscratch, boo
|
||||
case Bytecodes::_fast_aputfield: __ pop_ptr(); break;
|
||||
case Bytecodes::_fast_iputfield: // Fall through
|
||||
case Bytecodes::_fast_bputfield: // Fall through
|
||||
case Bytecodes::_fast_zputfield: // Fall through
|
||||
case Bytecodes::_fast_cputfield: // Fall through
|
||||
case Bytecodes::_fast_sputfield: __ pop_i(); break;
|
||||
case Bytecodes::_fast_lputfield: __ pop_l(); break;
|
||||
@ -2824,6 +2858,21 @@ void TemplateTable::putfield_or_static(int byte_no, bool is_static, RewriteContr
|
||||
}
|
||||
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
|
||||
|
||||
__ align(32, 28, 28); // Align pop.
|
||||
// __ bind(Lztos);
|
||||
__ release(); // Volatile entry point (one instruction before non-volatile_entry point).
|
||||
assert(branch_table[ztos] == 0, "can't compute twice");
|
||||
branch_table[ztos] = __ pc(); // non-volatile_entry point
|
||||
__ pop(ztos);
|
||||
if (!is_static) { pop_and_check_object(Rclass_or_obj); } // Kills R11_scratch1.
|
||||
__ andi(R17_tos, R17_tos, 0x1);
|
||||
__ stbx(R17_tos, Rclass_or_obj, Roffset);
|
||||
if (!is_static) { patch_bytecode(Bytecodes::_fast_zputfield, Rbc, Rscratch, true, byte_no); }
|
||||
if (!support_IRIW_for_not_multiple_copy_atomic_cpu) {
|
||||
__ beq(CR_is_vol, Lvolatile); // Volatile?
|
||||
}
|
||||
__ dispatch_epilog(vtos, Bytecodes::length_for(bytecode()));
|
||||
|
||||
__ align(32, 28, 28); // Align pop.
|
||||
// __ bind(Lctos);
|
||||
__ release(); // Volatile entry point (one instruction before non-volatile_entry point).
|
||||
@ -2949,6 +2998,9 @@ void TemplateTable::fast_storefield(TosState state) {
|
||||
__ stdx(R17_tos, Rclass_or_obj, Roffset);
|
||||
break;
|
||||
|
||||
case Bytecodes::_fast_zputfield:
|
||||
__ andi(R17_tos, R17_tos, 0x1); // boolean is true if LSB is 1
|
||||
// fall through to bputfield
|
||||
case Bytecodes::_fast_bputfield:
|
||||
__ stbx(R17_tos, Rclass_or_obj, Roffset);
|
||||
break;
|
||||
|
@ -344,7 +344,7 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
|
||||
length.set_instruction(x->length());
|
||||
length.load_item();
|
||||
}
|
||||
if (needs_store_check) {
|
||||
if (needs_store_check || x->check_boolean()) {
|
||||
value.load_item();
|
||||
} else {
|
||||
value.load_for_store(x->elt_type());
|
||||
@ -389,7 +389,8 @@ void LIRGenerator::do_StoreIndexed(StoreIndexed* x) {
|
||||
pre_barrier(LIR_OprFact::address(array_addr), LIR_OprFact::illegalOpr /* pre_val */,
|
||||
true /* do_load */, false /* patch */, NULL);
|
||||
}
|
||||
__ move(value.result(), array_addr, null_check_info);
|
||||
LIR_Opr result = maybe_mask_boolean(x, array.result(), value.result(), null_check_info);
|
||||
__ move(result, array_addr, null_check_info);
|
||||
if (obj_store) {
|
||||
// Precise card mark
|
||||
post_barrier(LIR_OprFact::address(array_addr), value.result());
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "runtime/init.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
|
@ -26,7 +26,6 @@
|
||||
#define CPU_SPARC_VM_FRAME_SPARC_HPP
|
||||
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// A frame represents a physical stack frame (an activation). Frames can be
|
||||
// C or Java frames, and the Java frames can be interpreted or compiled.
|
||||
|
@ -208,6 +208,7 @@ void InterpreterMacroAssembler::load_earlyret_value(TosState state) {
|
||||
case atos: ld_ptr(oop_addr, Otos_l);
|
||||
st_ptr(G0, oop_addr); break;
|
||||
case btos: // fall through
|
||||
case ztos: // fall through
|
||||
case ctos: // fall through
|
||||
case stos: // fall through
|
||||
case itos: ld(val_addr, Otos_l1); break;
|
||||
@ -452,9 +453,10 @@ void InterpreterMacroAssembler::push(TosState state) {
|
||||
interp_verify_oop(Otos_i, state, __FILE__, __LINE__);
|
||||
switch (state) {
|
||||
case atos: push_ptr(); break;
|
||||
case btos: push_i(); break;
|
||||
case ctos:
|
||||
case stos: push_i(); break;
|
||||
case btos: // fall through
|
||||
case ztos: // fall through
|
||||
case ctos: // fall through
|
||||
case stos: // fall through
|
||||
case itos: push_i(); break;
|
||||
case ltos: push_l(); break;
|
||||
case ftos: push_f(); break;
|
||||
@ -468,9 +470,10 @@ void InterpreterMacroAssembler::push(TosState state) {
|
||||
void InterpreterMacroAssembler::pop(TosState state) {
|
||||
switch (state) {
|
||||
case atos: pop_ptr(); break;
|
||||
case btos: pop_i(); break;
|
||||
case ctos:
|
||||
case stos: pop_i(); break;
|
||||
case btos: // fall through
|
||||
case ztos: // fall through
|
||||
case ctos: // fall through
|
||||
case stos: // fall through
|
||||
case itos: pop_i(); break;
|
||||
case ltos: pop_l(); break;
|
||||
case ftos: pop_f(); break;
|
||||
@ -1103,6 +1106,49 @@ void InterpreterMacroAssembler::unlock_if_synchronized_method(TosState state,
|
||||
interp_verify_oop(Otos_i, state, __FILE__, __LINE__);
|
||||
}
|
||||
|
||||
void InterpreterMacroAssembler::narrow(Register result) {
|
||||
|
||||
ld_ptr(Address(Lmethod, Method::const_offset()), G3_scratch);
|
||||
ldub(G3_scratch, in_bytes(ConstMethod::result_type_offset()), G3_scratch);
|
||||
|
||||
Label notBool, notByte, notChar, done;
|
||||
|
||||
// common case first
|
||||
cmp(G3_scratch, T_INT);
|
||||
br(Assembler::equal, true, pn, done);
|
||||
delayed()->nop();
|
||||
|
||||
cmp(G3_scratch, T_BOOLEAN);
|
||||
br(Assembler::notEqual, true, pn, notBool);
|
||||
delayed()->cmp(G3_scratch, T_BYTE);
|
||||
and3(result, 1, result);
|
||||
ba(done);
|
||||
delayed()->nop();
|
||||
|
||||
bind(notBool);
|
||||
// cmp(G3_scratch, T_BYTE);
|
||||
br(Assembler::notEqual, true, pn, notByte);
|
||||
delayed()->cmp(G3_scratch, T_CHAR);
|
||||
sll(result, 24, result);
|
||||
sra(result, 24, result);
|
||||
ba(done);
|
||||
delayed()->nop();
|
||||
|
||||
bind(notByte);
|
||||
// cmp(G3_scratch, T_CHAR);
|
||||
sll(result, 16, result);
|
||||
br(Assembler::notEqual, true, pn, done);
|
||||
delayed()->sra(result, 16, result);
|
||||
// sll(result, 16, result);
|
||||
srl(result, 16, result);
|
||||
|
||||
// bind(notChar);
|
||||
// must be short, instructions already executed in delay slot
|
||||
// sll(result, 16, result);
|
||||
// sra(result, 16, result);
|
||||
|
||||
bind(done);
|
||||
}
|
||||
|
||||
// remove activation
|
||||
//
|
||||
@ -1151,6 +1197,7 @@ void InterpreterMacroAssembler::remove_activation(TosState state,
|
||||
case ltos: mov(Otos_l2, Otos_l2->after_save()); // fall through // O1 -> I1
|
||||
#endif
|
||||
case btos: // fall through
|
||||
case ztos: // fall through
|
||||
case ctos:
|
||||
case stos: // fall through
|
||||
case atos: // fall through
|
||||
|
@ -103,6 +103,8 @@ class InterpreterMacroAssembler: public MacroAssembler {
|
||||
void dispatch_via (TosState state, address* table);
|
||||
|
||||
|
||||
void narrow(Register result);
|
||||
|
||||
// Removes the current activation (incl. unlocking of monitors).
|
||||
// Additionally this code is used for earlyReturn in which case we
|
||||
// want to skip throwing an exception and installing an exception.
|
||||
|
@ -65,8 +65,6 @@ void MetaspaceShared::generate_vtable_methods(void** vtbl_list,
|
||||
*vtable = dummy_vtable;
|
||||
*md_top += vtable_bytes;
|
||||
|
||||
guarantee(*md_top <= md_end, "Insufficient space for vtables.");
|
||||
|
||||
// Get ready to generate dummy methods.
|
||||
|
||||
CodeBuffer cb((unsigned char*)*mc_top, mc_end - *mc_top);
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "memory/allocation.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
#include "runtime/os.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
|
||||
// We have interface for the following instructions:
|
||||
// - NativeInstruction
|
||||
|
@ -324,6 +324,16 @@ bool SharedRuntime::is_wide_vector(int size) {
|
||||
return size > 8;
|
||||
}
|
||||
|
||||
size_t SharedRuntime::trampoline_size() {
|
||||
return 40;
|
||||
}
|
||||
|
||||
void SharedRuntime::generate_trampoline(MacroAssembler *masm, address destination) {
|
||||
__ set((intptr_t)destination, G3_scratch);
|
||||
__ JMP(G3_scratch, 0);
|
||||
__ delayed()->nop();
|
||||
}
|
||||
|
||||
// The java_calling_convention describes stack locations as ideal slots on
|
||||
// a frame with no abi restrictions. Since we must observe abi restrictions
|
||||
// (like the placement of the register window) the slots must be biased by
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/top.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
@ -616,7 +616,7 @@ void TemplateInterpreterGenerator::generate_stack_overflow_check(Register Rframe
|
||||
|
||||
// compute the beginning of the protected zone minus the requested frame size
|
||||
__ sub( Rscratch, Rscratch2, Rscratch );
|
||||
__ set( JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_zone_size(), Rscratch2 );
|
||||
__ set(MAX2(JavaThread::stack_shadow_zone_size(), JavaThread::stack_guard_zone_size()), Rscratch2 );
|
||||
__ add( Rscratch, Rscratch2, Rscratch );
|
||||
|
||||
// Add in the size of the frame (which is the same as subtracting it from the
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user