Merge
This commit is contained in:
commit
209f1b7d18
@ -841,7 +841,6 @@ JDK_MINOR_VERSION
|
||||
JDK_MAJOR_VERSION
|
||||
USER_RELEASE_SUFFIX
|
||||
COMPRESS_JARS
|
||||
RMICONNECTOR_IIOP
|
||||
UNLIMITED_CRYPTO
|
||||
CACERTS_FILE
|
||||
TEST_IN_BUILD
|
||||
@ -1060,7 +1059,6 @@ enable_headful
|
||||
enable_hotspot_test_in_build
|
||||
with_cacerts_file
|
||||
enable_unlimited_crypto
|
||||
enable_rmiconnector_iiop
|
||||
with_milestone
|
||||
with_update_version
|
||||
with_user_release_suffix
|
||||
@ -1848,9 +1846,6 @@ Optional Features:
|
||||
run the Queens test after Hotspot build [disabled]
|
||||
--enable-unlimited-crypto
|
||||
Enable unlimited crypto policy [disabled]
|
||||
--enable-rmiconnector-iiop
|
||||
enable the JMX RMIConnector iiop transport
|
||||
[disabled]
|
||||
--disable-warnings-as-errors
|
||||
do not consider native warnings to be an error
|
||||
[enabled]
|
||||
@ -3951,7 +3946,7 @@ pkgadd_help() {
|
||||
|
||||
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -20098,22 +20093,6 @@ fi
|
||||
#
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# --enable-rmiconnector-iiop
|
||||
#
|
||||
# Check whether --enable-rmiconnector-iiop was given.
|
||||
if test "${enable_rmiconnector_iiop+set}" = set; then :
|
||||
enableval=$enable_rmiconnector_iiop;
|
||||
fi
|
||||
|
||||
if test "x$enable_rmiconnector_iiop" = "xyes"; then
|
||||
RMICONNECTOR_IIOP=true
|
||||
else
|
||||
RMICONNECTOR_IIOP=false
|
||||
fi
|
||||
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -453,19 +453,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
AC_SUBST(ENABLE_INTREE_EC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# --enable-rmiconnector-iiop
|
||||
#
|
||||
AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
|
||||
[enable the JMX RMIConnector iiop transport @<:@disabled@:>@])])
|
||||
if test "x$enable_rmiconnector_iiop" = "xyes"; then
|
||||
RMICONNECTOR_IIOP=true
|
||||
else
|
||||
RMICONNECTOR_IIOP=false
|
||||
fi
|
||||
AC_SUBST(RMICONNECTOR_IIOP)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
|
@ -262,9 +262,6 @@ CACERTS_FILE=@CACERTS_FILE@
|
||||
# Enable unlimited crypto policy
|
||||
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
|
||||
|
||||
# Enable RMIConnector IIOP transport
|
||||
RMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@
|
||||
|
||||
GCOV_ENABLED=@GCOV_ENABLED@
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
|
60
common/bin/blessed-modifier-order.sh
Normal file
60
common/bin/blessed-modifier-order.sh
Normal file
@ -0,0 +1,60 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright 2015 Google, Inc. 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.
|
||||
|
||||
usage() {
|
||||
(
|
||||
echo "$0 DIR ..."
|
||||
echo "Modifies in place all the java source files found"
|
||||
echo "in the given directories so that all java language modifiers"
|
||||
echo "are in the canonical order given by Modifier#toString()."
|
||||
echo "Tries to get it right even within javadoc comments,"
|
||||
echo "and even if the list of modifiers spans 2 lines."
|
||||
echo
|
||||
echo "See:"
|
||||
echo "https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#toString-int-"
|
||||
echo
|
||||
echo "Example:"
|
||||
echo "$0 jdk/src/java.base jdk/test/java/{util,io,lang}"
|
||||
) >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
set -eu
|
||||
declare -ar dirs=("$@")
|
||||
[[ "${#dirs[@]}" > 0 ]] || usage
|
||||
for dir in "${dirs[@]}"; do [[ -d "$dir" ]] || usage; done
|
||||
|
||||
declare -ar modifiers=(
|
||||
public protected private
|
||||
abstract static final transient
|
||||
volatile synchronized native strictfp
|
||||
)
|
||||
declare -r SAVE_IFS="$IFS"
|
||||
for ((i = 3; i < "${#modifiers[@]}"; i++)); do
|
||||
IFS='|'; x="${modifiers[*]:0:i}" y="${modifiers[*]:i}"; IFS="$SAVE_IFS"
|
||||
if [[ -n "$x" && -n "$y" ]]; then
|
||||
find "${dirs[@]}" -name '*.java' -type f -print0 | \
|
||||
xargs -0 perl -0777 -p -i -e \
|
||||
"do {} while s/^([A-Za-z@* ]*)\b($y)(\s|(?:\s|\n\s+\*)*\s)($x)\b/\1\4\3\2/mg"
|
||||
fi
|
||||
done
|
@ -274,13 +274,6 @@ java.sql.rowset_CLEAN_FILES := $(wildcard \
|
||||
$(JDK_TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
|
||||
$(JDK_TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
|
||||
|
||||
################################################################################
|
||||
# Exclude building of IIOP transport for RMI Connector
|
||||
|
||||
ifeq ($(RMICONNECTOR_IIOP), false)
|
||||
java.management_EXCLUDES += com/sun/jmx/remote/protocol/iiop
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
java.rmi_ADD_JAVAC_FLAGS := -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
|
@ -285,9 +285,12 @@ test-image-jdk-jtreg-native:
|
||||
+($(CD) $(JDK_TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNative.gmk \
|
||||
test-image-jdk-jtreg-native)
|
||||
|
||||
build-test-lib:
|
||||
+($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
|
||||
|
||||
ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
|
||||
test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
|
||||
test-image-jdk-jtreg-native
|
||||
test-image-jdk-jtreg-native build-test-lib
|
||||
|
||||
################################################################################
|
||||
# Run tests
|
||||
@ -553,7 +556,7 @@ ALL_TARGETS += default jdk images docs all
|
||||
CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
|
||||
images make-support test-make bundles
|
||||
CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
|
||||
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native
|
||||
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
|
||||
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
||||
CLEAN_PHASES := gensrc java native include docs
|
||||
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
||||
|
@ -567,16 +567,22 @@ else
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Convenience functions for working around make's limitations with $(filter ).
|
||||
containing = \
|
||||
$(strip $(foreach v,$(strip $2),$(if $(findstring $(strip $1),$v),$v)))
|
||||
not-containing = \
|
||||
$(strip $(foreach v,$(strip $2),$(if $(findstring $(strip $1),$v),,$v)))
|
||||
|
||||
# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
|
||||
uniq = \
|
||||
$(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where at least one of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
containing = \
|
||||
$(strip \
|
||||
$(foreach v,$(strip $2),\
|
||||
$(call uniq,$(foreach p,$(strip $1),$(if $(findstring $p,$v),$v)))))
|
||||
|
||||
# Returns all whitespace-separated words in $2 where none of the
|
||||
# whitespace-separated words in $1 is a substring.
|
||||
not-containing = \
|
||||
$(strip $(filter-out $(call containing,$1,$2),$2))
|
||||
|
||||
# Return a list of all string elements that are duplicated in $1.
|
||||
dups = \
|
||||
$(strip $(foreach v, $(sort $1), $(if $(filter-out 1, \
|
||||
|
67
make/test/BuildTestLib.gmk
Normal file
67
make/test/BuildTestLib.gmk
Normal file
@ -0,0 +1,67 @@
|
||||
#
|
||||
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# 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 SetupJavaCompilers.gmk
|
||||
|
||||
TARGETS :=
|
||||
|
||||
TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
|
||||
TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
|
||||
|
||||
# Unfortunately, test-lib.jar does not compile properly without warnings.
|
||||
$(eval $(call SetupJavaCompiler, BOOT_JAVAC_NOWARNINGS, \
|
||||
JAVAC := $(JAVAC), \
|
||||
FLAGS := -XDignore.symbol.file=true -g, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
|
||||
SETUP := BOOT_JAVAC, \
|
||||
SRC := $(TEST_LIB_SOURCE_DIR)/sun, \
|
||||
BIN := $(TEST_LIB_SUPPORT), \
|
||||
JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_WB_JAR)
|
||||
|
||||
# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
|
||||
$(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
|
||||
SETUP := BOOT_JAVAC_NOWARNINGS, \
|
||||
SRC := $(TEST_LIB_SOURCE_DIR)/share/classes/jdk/test/lib/hprof, \
|
||||
BIN := $(TEST_LIB_SUPPORT), \
|
||||
JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_TEST_LIB_JAR)
|
||||
|
||||
##########################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: default all
|
@ -277,6 +277,7 @@
|
||||
<to>jdk.jvmstat</to>
|
||||
<to>jdk.management.resource</to>
|
||||
<to>jdk.pack200</to>
|
||||
<to>jdk.scripting.nashorn</to>
|
||||
<to>jdk.security.auth</to>
|
||||
<to>jdk.security.jgss</to>
|
||||
<to>jdk.snmp</to>
|
||||
|
@ -1,79 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Utility Makefile that creates wb.jar, which is used to simplify using
|
||||
# the Whitebox API outside the jtreg-testbase.
|
||||
|
||||
ifneq "x$(ALT_BOOTDIR)" "x"
|
||||
BOOTDIR := $(ALT_BOOTDIR)
|
||||
endif
|
||||
|
||||
ifeq "x$(BOOTDIR)" "x"
|
||||
JDK_HOME := $(shell dirname $(shell which java))/..
|
||||
else
|
||||
JDK_HOME := $(BOOTDIR)
|
||||
endif
|
||||
|
||||
SRC_DIR = ./
|
||||
BUILD_DIR = build
|
||||
OUTPUT_DIR = $(BUILD_DIR)/classes
|
||||
|
||||
JAVAC = $(JDK_HOME)/bin/javac
|
||||
JAR = $(JDK_HOME)/bin/jar
|
||||
|
||||
WB_SRC_FILES = $(shell find $(SRC_DIR)/sun/hotspot -name '*.java')
|
||||
# test-lib.jar will contain only hprof classes until JDK-8081381 is resolved
|
||||
SHARE_SRC_FILES = $(shell find $(SRC_DIR)/share/classes/jdk/test/lib/hprof -name '*.java')
|
||||
|
||||
.PHONY: wb.filelist share.filelist clean cleantmp
|
||||
|
||||
all: wb.jar test-lib.jar cleantmp
|
||||
|
||||
wb.jar: wb.filelist
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
$(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @wb.filelist
|
||||
$(JAR) cf wb.jar -C $(OUTPUT_DIR) .
|
||||
@rm -rf $(OUTPUT_DIR)
|
||||
|
||||
wb.filelist: $(WB_SRC_FILES)
|
||||
@rm -f $@
|
||||
@echo $(WB_SRC_FILES) > $@
|
||||
|
||||
test-lib.jar: share.filelist
|
||||
@mkdir -p $(OUTPUT_DIR)
|
||||
$(JAVAC) -sourcepath $(SRC_DIR) -d $(OUTPUT_DIR) -cp $(OUTPUT_DIR) @share.filelist
|
||||
$(JAR) cf test-lib.jar -C $(OUTPUT_DIR) .
|
||||
@rm -rf $(OUTPUT_DIR)
|
||||
|
||||
share.filelist: $(SHARE_SRC_FILES)
|
||||
@rm -f $@
|
||||
@echo $(SHARE_SRC_FILES) > $@
|
||||
|
||||
clean: cleantmp
|
||||
@rm -rf wb.jar
|
||||
@rm -rf test-list.jar
|
||||
|
||||
cleantmp:
|
||||
@rm -rf wb.filelist
|
||||
@rm -rf share.filelist
|
||||
@rm -rf $(BUILD_DIR)
|
@ -26,12 +26,10 @@ package sun.hotspot;
|
||||
|
||||
import java.lang.management.MemoryUsage;
|
||||
import java.lang.reflect.Executable;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
import java.security.BasicPermission;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -85,6 +83,7 @@ public class WhiteBox {
|
||||
public native int getVMPageSize();
|
||||
public native long getVMAllocationGranularity();
|
||||
public native long getVMLargePageSize();
|
||||
public native long getHeapSpaceAlignment();
|
||||
|
||||
private native boolean isObjectInOldGen0(Object o);
|
||||
public boolean isObjectInOldGen(Object o) {
|
||||
@ -144,6 +143,10 @@ public class WhiteBox {
|
||||
return parseCommandLine0(commandline, delim, args);
|
||||
}
|
||||
|
||||
// Parallel GC
|
||||
public native long psVirtualSpaceAlignment();
|
||||
public native long psHeapGenerationAlignment();
|
||||
|
||||
// NMT
|
||||
public native long NMTMalloc(long size);
|
||||
public native void NMTFree(long mem);
|
||||
@ -386,23 +389,6 @@ public class WhiteBox {
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
public native boolean readImageFile(String imagePath);
|
||||
public native long imageOpenImage(String imagePath, boolean bigEndian);
|
||||
public native void imageCloseImage(long id);
|
||||
public native long imageGetIndexAddress(long id);
|
||||
public native long imageGetDataAddress(long id);
|
||||
public native boolean imageReadCompressed(long id, long offset,
|
||||
ByteBuffer compressedBuffer, long compressedSize,
|
||||
ByteBuffer uncompressedBuffer, long uncompressedSize);
|
||||
public native boolean imageRead(long id, long offset,
|
||||
ByteBuffer uncompressedBuffer, long uncompressedSize);
|
||||
public native byte[] imageGetStringBytes(long id, int offset);
|
||||
public native long imageGetStringsSize(long id);
|
||||
public native long[] imageGetAttributes(long id, int offset);
|
||||
public native long[] imageFindAttributes(long id, byte[] path);
|
||||
public native int[] imageAttributeOffsets(long id);
|
||||
public native int imageGetIntAtAddress(long address, int offset, boolean big_endian);
|
||||
|
||||
// Safepoint Checking
|
||||
public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);
|
||||
|
||||
|
@ -72,6 +72,37 @@ $(ESCAPE_DOLLAR_DIR)/_escape_dollar: $(DEPS)
|
||||
|
||||
TEST_TARGETS += $(ESCAPE_DOLLAR_DIR)/_escape_dollar
|
||||
|
||||
################################################################################
|
||||
# Test containing and not-containing
|
||||
|
||||
CONT_LIST := foo bar baz foobar foobaz
|
||||
|
||||
# Param 1 - string to look for
|
||||
# Param 2 - expected result
|
||||
define TestContaining
|
||||
value := $$(call containing, $1, $(CONT_LIST))
|
||||
ifneq ($$(value), $2)
|
||||
$$(info (call containing, $1, $(CONT_LIST)))
|
||||
$$(error result >$$(value)<, expected >$2<)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call TestContaining,bar,bar foobar))
|
||||
$(eval $(call TestContaining,foo bar,foo bar foobar foobaz))
|
||||
|
||||
# Param 1 - string to look for
|
||||
# Param 2 - expected result
|
||||
define TestNotContaining
|
||||
value := $$(call not-containing, $1, $(CONT_LIST))
|
||||
ifneq ($$(value), $2)
|
||||
$$(info (call not-containing, $1, $(CONT_LIST)))
|
||||
$$(error result >$$(value)<, expected >$2<)
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call TestNotContaining,bar,foo baz foobaz))
|
||||
$(eval $(call TestNotContaining,foo bar,baz))
|
||||
|
||||
################################################################################
|
||||
# Test Equals
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user