This commit is contained in:
Phil Race 2018-02-12 10:31:42 -08:00
commit 30d35b2854
5719 changed files with 129470 additions and 808137 deletions

View File

@ -1,5 +1,4 @@
^build/
^.build/
^dist/
^.idea/
nbproject/private/

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, 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
@ -69,8 +69,6 @@ $(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \
COPY := .properties, \
ADD_JAVAC_FLAGS := \
--module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
--add-modules java.corba \
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
$(INTERIM_RMIC_ADD_EXPORTS), \
))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2018, 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
@ -38,10 +38,6 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
################################################################################
# Module specific build settings
java.activation_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
################################################################################
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
java.base_CLEAN += intrinsic.properties
@ -256,10 +252,6 @@ java.prefs_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,
################################################################################
java.transaction_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
################################################################################
java.sql_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
@ -279,27 +271,6 @@ java.rmi_CLEAN_FILES += $(wildcard \
################################################################################
java.corba_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.corba_COPY += .prp
java.corba_CLEAN += .properties
java.corba_EXCLUDES += \
com/sun/corba/se/PortableActivationIDL \
com/sun/tools/corba/se/logutil \
#
java.corba_EXCLUDE_FILES += \
com/sun/corba/se/impl/presentation/rmi/JNDIStateFactoryImpl.java \
com/sun/corba/se/spi/presentation/rmi/StubWrapper.java \
com/sun/org/omg/CORBA/IDLTypeOperations.java \
com/sun/org/omg/CORBA/IRObjectOperations.java \
org/omg/PortableInterceptor/UNKNOWN.java \
com/sun/tools/corba/se/idl/ResourceBundleUtil.java \
com/sun/corba/se/impl/presentation/rmi/jndi.properties \
#
################################################################################
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
javax.xml.transform javax.xml.validation javax.xml.xpath)'
@ -307,32 +278,11 @@ java.xml_CLEAN += .properties
################################################################################
java.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.bind_CLEAN += .properties
################################################################################
java.xml.soap_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.soap_CLEAN += .properties
################################################################################
java.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
java.xml.ws_COPY += .xml
java.xml.ws_CLEAN += .properties
################################################################################
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
java.naming_CLEAN += jndiprovider.properties
################################################################################
java.security.saaj_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
java.security.saaj_CLEAN += .properties
################################################################################
java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
################################################################################
@ -553,17 +503,6 @@ jdk.aot_ADD_JAVAC_FLAGS += -parameters -XDstringConcat=inline \
################################################################################
jdk.xml.bind_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
jdk.xml.bind_CLEAN += .properties
jdk.xml.bind_COPY += .xsd JAXBContextFactory.java ZeroOneBooleanAdapter.java
################################################################################
jdk.xml.ws_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
jdk.xml.ws_CLEAN += .properties
################################################################################
sun.charsets_COPY += .dat
################################################################################

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, 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
@ -53,9 +53,7 @@ $(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes, \
ADD_JAVAC_FLAGS := \
--add-modules java.xml.bind \
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
--add-exports java.xml.bind/javax.xml.bind.annotation=ALL-UNNAMED \
--add-exports java.base/sun.text=ALL-UNNAMED \
, \
))

View File

@ -44,7 +44,7 @@ $(eval $(call IncludeCustomExtension, Docs.gmk))
#
# We will generate API documentation for two different selections of the source
# code: "Java SE", which contains just the modules covered by the top-level
# module java.se.ee, and "JDK", which covers all of Java SE and also all
# module java.se and "JDK", which covers all of Java SE and also all
# other available modules that should be documented, including imported modules,
# if any.
#
@ -396,8 +396,8 @@ endef
# Define the groups of the JDK API documentation
JavaSE_GROUP_NAME := Java SE
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se.ee \
$(call FindTransitiveIndirectDepsForModules, java.se.ee)))
JavaSE_GROUP_MODULES := $(call ColonList, $(sort java.se \
$(call FindTransitiveIndirectDepsForModules, java.se)))
JavaSE_GROUP_DESCRIPTION := \
The Java Platform, Standard Edition (Java SE) APIs define the core Java \
platform for general-purpose computing. These APIs are in modules whose \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2018, 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,7 +47,7 @@ JRE_MODULES += $(filter $(ALL_MODULES), $(BOOT_MODULES) \
$(PLATFORM_MODULES) $(JRE_TOOL_MODULES))
JDK_MODULES += $(ALL_MODULES)
# Modules list for compact builds
# Modules list for compact builds
JRE_COMPACT1_MODULES := \
java.logging \
java.scripting \
@ -199,7 +199,6 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
rmid.1 \
rmiregistry.1 \
servertool.1 \
tnameserv.1 \
unpack200.1
JDK_MAN_PAGES += \
@ -223,11 +222,7 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
jstat.1 \
jstatd.1 \
rmic.1 \
schemagen.1 \
serialver.1 \
wsgen.1 \
wsimport.1 \
xjc.1
serialver.1
# This variable is potentially overridden in the closed makefile.
MAN_SRC_BASEDIR ?= $(TOPDIR)/src

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, 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
@ -124,10 +124,9 @@ ifneq ($(CREATING_BUILDJDK), true)
LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, $(LANGTOOLS_MODULES)), $(GENSRC_TARGETS))
INTERIM_LANGTOOLS_GENSRC_TARGETS := $(filter $(addsuffix -%, \
$(INTERIM_LANGTOOLS_BASE_MODULES)), $(GENSRC_TARGETS))
CORBA_GENSRC_TARGETS := $(filter $(addsuffix -%, $(CORBA_MODULES)), $(GENSRC_TARGETS))
HOTSPOT_GENSRC_TARGETS := $(filter $(addsuffix -%, $(HOTSPOT_MODULES)), $(GENSRC_TARGETS))
JDK_GENSRC_TARGETS := $(filter-out $(LANGTOOLS_GENSRC_TARGETS) \
$(CORBA_GENSRC_TARGETS) $(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
$(HOTSPOT_GENSRC_TARGETS), $(GENSRC_TARGETS))
GENSRC_MODULEINFO_MODULES := $(ALL_MODULES)
GENSRC_MODULEINFO_TARGETS := $(addsuffix -gensrc-moduleinfo, \
@ -618,8 +617,6 @@ else
buildtools-modules: exploded-image-base
$(CORBA_GENSRC_TARGETS): interim-langtools
$(HOTSPOT_GENSRC_TARGETS): interim-langtools buildtools-hotspot
$(JDK_GENSRC_TARGETS): interim-langtools buildtools-jdk

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2018, 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
@ -92,7 +92,6 @@ TOOL_SPP = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.too
# Nimbus is used somewhere in the swing build.
TOOL_GENERATENIMBUS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
--add-modules java.xml.bind \
build.tools.generatenimbus.Generator
TOOL_WRAPPERGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \

View File

@ -814,6 +814,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
| $SED -e 's/config.log//g' \
-e 's/configure.log//g' \
-e 's/confdefs.h//g' \
-e 's/configure-support//g' \
-e 's/ //g' \
| $TR -d '\n'`
if test "x$filtered_files" != x; then

View File

@ -102,8 +102,33 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[
if test "x$with_boot_jdk" != x; then
BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe
if test -d "$with_boot_jdk"; then
BOOT_JDK=$with_boot_jdk
BOOT_JDK_FOUND=maybe
elif test -f "$with_boot_jdk"; then
case "$with_boot_jdk" in
*.tar.gz )
BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
$RM -rf $BOOT_JDK_SUPPORT_DIR
$MKDIR -p $BOOT_JDK_SUPPORT_DIR
$GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
# Try to find javac to determine BOOT_JDK path
BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
if test "x$BOOT_JDK_JAVAC_PATH" != x; then
BOOT_JDK_FOUND=maybe
BOOT_JDK=$($DIRNAME $($DIRNAME $BOOT_JDK_JAVAC_PATH))
else
BOOT_JDK_FOUND=no
fi
;;
* )
BOOT_JDK_FOUND=no
;;
esac
else
BOOT_JDK_FOUND=no
fi
AC_MSG_NOTICE([Found potential Boot JDK using configure arguments])
fi
])

View File

@ -50,9 +50,21 @@ if test "x$CUSTOM_CONFIG_DIR" != x; then
echo "Error: Cannot continue" 1>&2
exit 1
fi
build_support_dir="$CUSTOM_ROOT/.build"
fi
CURRENT_DIR=`pwd`
if test "x$CURRENT_DIR" = "x$TOPDIR"; then
# We are running configure from the src root.
# Create '.configure-support' under $TOPDIR/build
build_support_dir="$TOPDIR/build/.configure-support"
elif test "x$CURRENT_DIR" = "x$CUSTOM_ROOT"; then
# We are running configure from the custom root.
# Create '.configure-support' under $CUSTOM_ROOT/build
build_support_dir="$CUSTOM_ROOT/build/.configure-support"
else
build_support_dir="$TOPDIR/.build"
# We are running configure from outside of the src dir.
# Create 'build_support_dir' in the current directory.
build_support_dir="$CURRENT_DIR/configure-support"
fi
conf_script_dir="$TOPDIR/make/autoconf"
@ -114,7 +126,7 @@ generate_configure_script() {
custom_patcher='cat'
fi
mkdir -p `dirname $generated_script`
mkdir -p $build_support_dir
# Call autoconf but replace the "magic" variable in configure.ac if requested.
cat $conf_script_dir/configure.ac | eval $custom_patcher | \
${AUTOCONF} -W all -I$conf_script_dir - > $generated_script
@ -164,7 +176,7 @@ else
fi
if test "x$run_autoconf" = xtrue; then
echo "Generating runnable configure script"
echo "Generating runnable configure script at $generated_script"
generate_configure_script
fi

View File

@ -221,9 +221,9 @@ ifneq ($(COMPANY_NAME),)
# Only export "VENDOR" to the build if COMPANY_NAME contains a real value.
# Otherwise the default value for VENDOR, which is used to set the "java.vendor"
# and "java.vm.vendor" properties is hard-coded into the source code (i.e. in
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
# System.c in the jdk for "vm.vendor" and vm_version.cpp in the VM for "java.vm.vendor")
ifneq ($(COMPANY_NAME), N/A)
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
VERSION_CFLAGS += -DVENDOR='"$(COMPANY_NAME)"'
endif
endif
@ -629,14 +629,11 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
INTERIM_RMIC_BASE_MODULES := jdk.rmic
INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES))
INTERIM_RMIC_ADD_EXPORTS := \
--add-exports java.corba/com.sun.corba.se.impl.util=jdk.rmic.interim \
#
# Use = to delay expansion of PathList since it's not available in this file.
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc,java.corba \
INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc \
--module-path $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \
$(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules) \
$(INTERIM_RMIC_ADD_EXPORTS) \
#
# You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ...

View File

@ -1,113 +0,0 @@
#
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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.
#
PREFIXES=-pkgPrefix CORBA org.omg \
-pkgPrefix CosNaming org.omg \
-pkgPrefix CosTransactions org.omg \
-pkgPrefix CosTSInteroperation org.omg \
-pkgPrefix DynamicAny org.omg \
-pkgPrefix Dynamic org.omg \
-pkgPrefix IOP org.omg \
-pkgPrefix Messaging org.omg \
-pkgPrefix PortableInterceptor org.omg \
-pkgPrefix PortableServer org.omg \
-pkgPrefix activation com.sun.corba.se.spi \
-pkgPrefix GIOP com.sun.corba.se \
-pkgPrefix PortableActivationIDL com.sun.corba.se \
-pkgPrefix messages com.sun.corba.se
define add_idl_package
# param 1 = MYPACKAGE
# param 2 = src root
# param 3 = gensrc root
# param 4 = source idl to compile
# param 5 = target idl package
# param 6 = delete these files that were output from the idlj
# param 7 = idls that match these patterns should be compiled with -oldImplBase
# param 8 = the idlj command
# Save the generated java files to a temporary directory so
# that we can find them and create proper dependencies.
# After that, we move them to the real gensrc target dir.
$4_TMPDIR:=tmp___$(subst /,_,$(patsubst $2/%,%,$4))___
ifneq ($$(filter $7,$4),)
$4_OLDIMPLBASE:=-oldImplBase
$4_OLDIMPLBASE_MSG:=with -oldImplBase
endif
$5 : $4
$$(call LogInfo, Compiling IDL $(patsubst $2/%,%,$4))
$$(call MakeDir, $$(@D))
$(RM) -rf $3/$$($4_TMPDIR)
$8 -td $3/$$($4_TMPDIR) \
-i $2/org/omg/CORBA \
-i $2/org/omg/PortableInterceptor \
-i $2/org/omg/PortableServer \
-D CORBA3 -corba 3.0 \
-fall \
$$($4_OLDIMPLBASE) \
$(PREFIXES) \
$4
$(RM) -f $$(addprefix $3/$$($4_TMPDIR)/,$6)
$(CP) -r $3/$$($4_TMPDIR)/* $3
($(CD) $3/$$($4_TMPDIR) && $(FIND) . -type f | $(SED) 's!\./!$3/!g' | $(NAWK) '{ print $$$$1 ": $4" }' > $5)
$(RM) -rf $3/$$($4_TMPDIR)
endef
# Setup make rules for creating an IDL compilation.
#
# 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:
# IDLJ
# SRC
# BIN
# INCLUDES
# EXCLUDES
# OLDIMPLBASES
# DELETES
SetupIdlCompilation = $(NamedParamsMacroTemplate)
define SetupIdlCompilationBody
# Find all existing java files and existing class files.
$$(call MakeDir,$$($1_BIN))
$1_SRCS := $$(shell find $$($1_SRC) -name "*.idl")
$1_BINS := $$(shell find $$($1_BIN) -name "*.java")
# Prepend the source/bin path to the filter expressions.
$1_SRC_INCLUDES := $$(addprefix $$($1_SRC)/,$$($1_INCLUDES))
$1_SRC_EXCLUDES := $$(addprefix $$($1_SRC)/,$$($1_EXCLUDES))
$1_BIN_INCLUDES := $$(addprefix $$($1_BIN)/,$$($1_INCLUDES))
$1_BIN_EXCLUDES := $$(addprefix $$($1_BIN)/,$$($1_EXCLUDES))
$1_OLDIMPLBASES := $$(addprefix $$($1_SRC)/,$$($1_OLDIMPLBASES))
# Now remove unwanted java/class files.
$1_SRCS := $$(filter $$($1_SRC_INCLUDES),$$($1_SRCS))
$1_SRCS := $$(filter-out $$($1_SRC_EXCLUDES),$$($1_SRCS))
$1_BINS := $$(filter $$($1_BIN_INCLUDES),$$($1_BINS))
$1_BINS := $$(filter-out $$($1_BIN_EXCLUDES),$$($1_BINS))
$1 := $$(sort $$(patsubst $$($1_SRC)/%.idl,$$($1_BIN)/%.idl.d,$$($1_SRCS)))
# Now create the dependencies for each idl target.
$$(foreach p,$$($1),$$(eval $$(call add_idl_package,$1,$$($1_SRC),$$($1_BIN),$$(patsubst $$($1_BIN)/%.idl.d,$$($1_SRC)/%.idl,$$p),$$p,$$($1_DELETES),$$($1_OLDIMPLBASES),$$($1_IDLJ))))
endef
.SUFFIXES: .java .class .package

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2018, 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
@ -74,24 +74,13 @@ BOOT_MODULES += \
# Modules that directly or indirectly requiring upgradeable modules
# should carefully be considered if it should be upgradeable or not.
UPGRADEABLE_MODULES += \
java.activation \
java.compiler \
java.corba \
java.transaction \
java.xml.bind \
java.xml.ws \
java.xml.ws.annotation \
jdk.internal.vm.compiler \
#
UPGRADEABLE_TOOL_MODULES += \
jdk.xml.bind \
jdk.xml.ws \
#
AGGREGATOR_MODULES += \
java.se \
java.se.ee \
#
PLATFORM_MODULES += \
@ -143,7 +132,7 @@ JRE_TOOL_MODULES += \
# DOCS_MODULES defines the root modules for javadoc generation.
# All of their `require transitive` modules directly and indirectly will be included.
DOCS_MODULES += \
java.se.ee \
java.se \
java.smartcardio \
jdk.accessibility \
jdk.attach \
@ -195,8 +184,6 @@ LANGTOOLS_MODULES := \
jdk.jshell \
#
CORBA_MODULES := java.corba
HOTSPOT_MODULES := \
jdk.aot \
jdk.hotspot.agent \
@ -395,7 +382,7 @@ FindTransitiveIndirectDepsForModules = \
# Upgradeable modules are those that are either defined as upgradeable or that
# require an upradeable module.
FindAllUpgradeableModules = \
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES) $(UPGRADEABLE_TOOL_MODULES)))
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_MODULES)))
################################################################################

View File

@ -829,7 +829,7 @@ var getJibProfilesDependencies = function (input, common) {
jtreg: {
server: "javare",
revision: "4.2",
build_number: "b11",
build_number: "b12",
checksum_file: "MD5_VALUES",
file: "jtreg_bin-4.2.zip",
environment_name: "JT_HOME",

View File

@ -1,34 +0,0 @@
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. 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 idl files to jdk/lib.
$(eval $(call SetupCopyFiles,COPY_IDL, \
SRC := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl, \
DEST := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE), \
FILES := $(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/orb.idl \
$(TOPDIR)/src/java.corba/share/classes/com/sun/tools/corba/se/idl/ir.idl))
TARGETS := $(COPY_IDL)

View File

@ -1,123 +0,0 @@
/*
* Copyright (c) 2003, 2009, 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.
*/
package build.tools.logutil;
import java.io.PrintWriter ;
import java.io.Writer ;
import java.io.OutputStream ;
import java.io.BufferedWriter ;
import java.io.OutputStreamWriter ;
import java.util.StringTokenizer ;
public class IndentingPrintWriter extends PrintWriter {
private int level = 0 ;
private int indentWidth = 4 ;
private String indentString = "" ;
public void printMsg( String msg, Object... data )
{
// System.out.println( "printMsg called with msg=" + msg + " data=" + data ) ;
StringTokenizer st = new StringTokenizer( msg, "@", true ) ;
StringBuffer result = new StringBuffer() ;
String token = null ;
int pos = 0;
while (st.hasMoreTokens()) {
token = st.nextToken() ;
if (token.equals("@")) {
if (pos < data.length) {
result.append( data[pos] );
++pos;
} else {
throw new Error( "List too short for message" ) ;
}
} else {
result.append( token ) ;
}
}
// System.out.println( "Printing result " + result + " to file" ) ;
print( result ) ;
println() ;
}
public IndentingPrintWriter (Writer out) {
super( out, true ) ;
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
}
public IndentingPrintWriter(Writer out, boolean autoFlush) {
super( out, autoFlush ) ;
// System.out.println( "Constructing a new IndentingPrintWriter with Writer " + out ) ;
}
public IndentingPrintWriter(OutputStream out) {
super(out, true);
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
}
public IndentingPrintWriter(OutputStream out, boolean autoFlush) {
super(new BufferedWriter(new OutputStreamWriter(out)), autoFlush);
// System.out.println( "Constructing a new IndentingPrintWriter with OutputStream " + out ) ;
}
public void setIndentWidth( int indentWidth )
{
this.indentWidth = indentWidth ;
updateIndentString() ;
}
public void indent()
{
level++ ;
updateIndentString() ;
}
public void undent()
{
if (level > 0) {
level-- ;
updateIndentString() ;
}
}
private void updateIndentString()
{
int size = level * indentWidth ;
StringBuffer sbuf = new StringBuffer( size ) ;
for (int ctr = 0; ctr<size; ctr++ )
sbuf.append( " " ) ;
indentString = sbuf.toString() ;
}
// overridden from PrintWriter
public void println()
{
super.println() ;
print( indentString ) ;
}
}

View File

@ -1,211 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Queue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Input {
/**
* The name of the package this class will inhabit.
*/
private String packageName;
/**
* The name of the generated class.
*/
private String className;
/**
* The name of the group of exceptions handled by the class.
*/
private String groupName;
/**
* The group of exceptions.
*/
private Queue<InputException> exceptions;
/**
* Represents the current state of parsing the input.
*/
private enum State
{
OUTER,
IN_CLASS,
IN_EXCEPTION_LIST
};
/**
* Regular expression to match each code line.
*/
private static final Pattern EXCEPTION_INFO_REGEX =
Pattern.compile("(\\w+)\\s*(\\d+)\\s*(\\w+)");
/**
* Parses the specified file to create a new {@link Input}
* object.
*
* @param filename the file to parse.
* @throws FileNotFoundException if the file can't be found.
* @throws IOException if an I/O error occurs.
*/
public Input(final String filename)
throws FileNotFoundException, IOException {
BufferedReader r =
new BufferedReader(new InputStreamReader(new FileInputStream(filename)));
State state = State.OUTER;
InputException current = null;
exceptions = new LinkedList<InputException>();
String line;
while ((line = r.readLine()) != null) {
// Skip ; comments
if (line.startsWith(";"))
continue;
int index = line.indexOf("(");
if (index == -1)
continue;
switch (state) {
case OUTER:
state = State.IN_CLASS;
String[] classInfo = line.substring(index).split(" ");
packageName = classInfo[0].substring(2, classInfo[0].length() - 1);
className = classInfo[1].substring(1, classInfo[1].length() - 1);
groupName = classInfo[2];
break;
case IN_CLASS:
state = State.IN_EXCEPTION_LIST;
break;
case IN_EXCEPTION_LIST:
boolean inQuote = false;
boolean inCode = false;
boolean end = false;
int start = index + 1;
Queue<String> lines = new LinkedList<String>();
for (int a = start; a < line.length(); ++a) {
if (line.charAt(a) == '(' && !inCode && !inQuote) {
if (current == null)
current =
new InputException(line.substring(start, a).trim());
start = a + 1;
inCode = true;
}
if (line.charAt(a) == '"')
inQuote = !inQuote;
if (line.charAt(a) == ')' && !inQuote) {
if (inCode) {
lines.offer(line.substring(start, a));
inCode = false;
} else
end = true;
}
if (!end && a == line.length() - 1)
line += r.readLine();
}
for (String l : lines) {
int stringStart = l.indexOf("\"") + 1;
int stringEnd = l.indexOf("\"", stringStart);
Matcher matcher = EXCEPTION_INFO_REGEX.matcher(l.substring(0, stringStart));
if (matcher.find())
current.add(new InputCode(matcher.group(1),
Integer.parseInt(matcher.group(2)),
matcher.group(3),
l.substring(stringStart, stringEnd)));
}
exceptions.offer(current);
current = null;
break;
}
}
}
/**
* Returns the name of this group of exceptions.
*
* @return the name of this group of exceptions.
*/
public String getGroupName()
{
return groupName;
}
/**
* Returns the name of the package this class will go in.
*
* @return the name of the package.
*/
public String getPackageName()
{
return packageName;
}
/**
* Returns the name of the generated class.
*
* @return the name of the class.
*/
public String getClassName()
{
return className;
}
/**
* Returns the exceptions contained in this class.
*
* @return the exceptions.
*/
public Queue<InputException> getExceptions() {
return exceptions;
}
/**
* Returns a textual representation of this input.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName() +
"[packageName=" + packageName +
",className=" + className +
",groupName=" + groupName +
",exceptions=" + exceptions +
"]";
}
}

View File

@ -1,116 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
public class InputCode {
/**
* The name of this code.
*/
private final String name;
/**
* The code.
*/
private final int code;
/**
* The log level for this code.
*/
private final String logLevel;
/**
* The error message for this code.
*/
private final String message;
/**
* Creates a new error code with the specified name, code,
* log level and error message.
*
* @param name the name of the new code.
* @param code the code itself.
* @param logLevel the level of severity of this error.
* @param message the error message for this code.
*/
public InputCode(final String name, final int code,
final String logLevel, final String message) {
this.name = name;
this.code = code;
this.logLevel = logLevel;
this.message = message;
}
/**
* Returns the name of this code.
*
* @return the name of the code.
*/
public String getName() {
return name;
}
/**
* Returns the code.
*
* @return the code.
*/
public int getCode() {
return code;
}
/**
* Returns the severity of this code.
*
* @return the log level severity of the code.
*/
public String getLogLevel() {
return logLevel;
}
/**
* Returns the error message for this code.
*
* @return the error message for this code.
*/
public String getMessage() {
return message;
}
/**
* Returns a textual representation of this code.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName() +
"[name=" + name +
",code=" + code +
",logLevel=" + logLevel +
",message=" + message +
"]";
}
}

View File

@ -1,93 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.util.LinkedList;
import java.util.Queue;
public class InputException {
/**
* The name of this exception.
*/
private final String name;
/**
* The codes associated with this exception.
*/
private final Queue<InputCode> codes;
/**
* Constructs a new {@link InputException} with the
* specified name.
*
* @param name the name of the new exception;
*/
public InputException(final String name) {
this.name = name;
codes = new LinkedList<InputCode>();
}
/**
* Adds a new code to this exception.
*
* @param c the code to add.
*/
public void add(InputCode c)
{
codes.offer(c);
}
/**
* Returns the name of this exception.
*
* @return the exception's name.
*/
public String getName() {
return name;
}
/**
* Returns the codes associated with this exception.
*
* @return the exception's codes.
*/
public Queue<InputCode> getCodes() {
return codes;
}
/**
* Returns a textual representation of this exception.
*
* @return a textual representation.
*/
public String toString() {
return getClass().getName()
+ "[name=" + name
+ ",codes=" + codes
+ "]";
}
}

View File

@ -1,559 +0,0 @@
/*
* Copyright (c) 2008, 2009, 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.
*/
package build.tools.logutil;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.Formatter;
import java.util.List;
import java.util.Queue;
public class MC {
private static final String VERSION = "1.0";
private static final List<String> SUN_EXCEPTION_GROUPS = Arrays.asList(new String[]
{ "SUNBASE", "ORBUTIL", "ACTIVATION", "NAMING", "INTERCEPTORS", "POA", "IOR", "UTIL" });
private static final List<String> EXCEPTIONS = Arrays.asList(new String[]
{ "UNKNOWN", "BAD_PARAM", "NO_MEMORY", "IMP_LIMIT", "COMM_FAILURE", "INV_OBJREF", "NO_PERMISSION",
"INTERNAL", "MARSHAL", "INITIALIZE", "NO_IMPLEMENT", "BAD_TYPECODE", "BAD_OPERATION", "NO_RESOURCES",
"NO_RESPONSE", "PERSIST_STORE", "BAD_INV_ORDER", "TRANSIENT", "FREE_MEM", "INV_IDENT", "INV_FLAG",
"INTF_REPOS", "BAD_CONTEXT", "OBJ_ADAPTER", "DATA_CONVERSION", "OBJECT_NOT_EXIST", "TRANSACTION_REQUIRED",
"TRANSACTION_ROLLEDBACK", "INVALID_TRANSACTION", "INV_POLICY", "CODESET_INCOMPATIBLE", "REBIND",
"TIMEOUT", "TRANSACTION_UNAVAILABLE", "BAD_QOS", "INVALID_ACTIVITY", "ACTIVITY_COMPLETED",
"ACTIVITY_REQUIRED" });
/**
* Read the minor codes from the input file and
* write out a resource file.
*
* @param inFile the file to read the codes from.
* @param outDir the directory to write the resource file to.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
private void makeResource(String inFile, String outDir)
throws FileNotFoundException, IOException {
writeResource(outDir, new Input(inFile));
}
/**
* Create a new Java source file using the specified Scheme input file,
* and writing the result to the given output directory.
*
* @param inFile the file to read the data from.
* @param outDir the directory to write the Java class to.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
private void makeClass(String inFile, String outDir)
throws FileNotFoundException, IOException {
writeClass(inFile, outDir, new Input(inFile));
}
/**
* Writes out a Java source file using the data from the given
* {@link Input} object. The result is written to {@code outDir}.
* The name of the input file is just used in the header of the
* resulting source file.
*
* @param inFile the name of the file the data was read from.
* @param outDir the directory to write the Java class to.
* @param input the parsed input data.
* @throws FileNotFoundException if the output file can't be written.
*/
private void writeClass(String inFile, String outDir, Input input)
throws FileNotFoundException {
String packageName = input.getPackageName();
String className = input.getClassName();
String groupName = input.getGroupName();
Queue<InputException> exceptions = input.getExceptions();
FileOutputStream file = new FileOutputStream(outDir + File.separator + className + ".java");
IndentingPrintWriter pw = new IndentingPrintWriter(file);
writeClassHeader(inFile, groupName, pw);
pw.printMsg("package @ ;", packageName);
pw.println();
pw.println("import java.util.logging.Logger ;");
pw.println("import java.util.logging.Level ;");
pw.println();
pw.println("import org.omg.CORBA.OMGVMCID ;");
pw.println( "import com.sun.corba.se.impl.util.SUNVMCID ;");
pw.println( "import org.omg.CORBA.CompletionStatus ;");
pw.println( "import org.omg.CORBA.SystemException ;");
pw.println();
pw.println( "import com.sun.corba.se.spi.orb.ORB ;");
pw.println();
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperFactory;");
pw.println();
pw.println( "import com.sun.corba.se.spi.logging.LogWrapperBase;");
pw.println();
writeImports(exceptions, pw);
pw.println();
pw.indent();
pw.printMsg("public class @ extends LogWrapperBase {", className);
pw.println();
pw.printMsg("public @( Logger logger )", className);
pw.indent();
pw.println( "{");
pw.undent();
pw.println( "super( logger ) ;");
pw.println( "}");
pw.println();
pw.flush();
writeFactoryMethod(className, groupName, pw);
writeExceptions(groupName, exceptions, className, pw);
pw.undent();
pw.println( );
pw.println( "}");
pw.flush();
pw.close();
}
/**
* Writes out the header of a Java source file.
*
* @param inFile the input file the file was generated from.
* @param groupName the group of exceptions the Java source file is for.
* @param pw the print writer used to write the output.
*/
private void writeClassHeader(String inFile, String groupName,
IndentingPrintWriter pw) {
if (groupName.equals("OMG"))
pw.println("// Log wrapper class for standard exceptions");
else
pw.printMsg("// Log wrapper class for Sun private system exceptions in group @",
groupName);
pw.println("//");
pw.printMsg("// Generated by MC.java version @, DO NOT EDIT BY HAND!", VERSION);
pw.printMsg("// Generated from input file @ on @", inFile, new Date());
pw.println();
}
/**
* Write out the import list for the exceptions.
*
* @param groups the exceptions that were parsed.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeImports(Queue<InputException> exceptions,
IndentingPrintWriter pw) {
if (exceptions == null)
return;
for (InputException e : exceptions)
pw.println("import org.omg.CORBA." + e.getName() + " ;");
}
/**
* Write out the factory method for this group of exceptions.
*
* @param className the name of the generated class.
* @param groupName the name of this group of exceptions.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeFactoryMethod(String className, String groupName,
IndentingPrintWriter pw) {
pw.indent();
pw.println( "private static LogWrapperFactory factory = new LogWrapperFactory() {");
pw.println( "public LogWrapperBase create( Logger logger )" );
pw.indent();
pw.println( "{");
pw.undent();
pw.printMsg("return new @( logger ) ;", className);
pw.undent();
pw.println( "}" );
pw.println( "} ;" );
pw.println();
pw.printMsg("public static @ get( ORB orb, String logDomain )", className);
pw.indent();
pw.println( "{");
pw.indent();
pw.printMsg( "@ wrapper = ", className);
pw.indent();
pw.printMsg( "(@) orb.getLogWrapper( logDomain, ", className);
pw.undent();
pw.undent();
pw.printMsg( "\"@\", factory ) ;", groupName);
pw.undent();
pw.println( "return wrapper ;" );
pw.println( "} " );
pw.println();
pw.printMsg( "public static @ get( String logDomain )", className);
pw.indent();
pw.println( "{");
pw.indent();
pw.printMsg( "@ wrapper = ", className);
pw.indent();
pw.printMsg( "(@) ORB.staticGetLogWrapper( logDomain, ", className);
pw.undent();
pw.undent();
pw.printMsg( "\"@\", factory ) ;", groupName);
pw.undent();
pw.println( "return wrapper ;" );
pw.println( "} " );
pw.println();
}
/**
* Writes out the exceptions themselves.
*
* @param groupName the name of this group of exceptions.
* @param exceptions the exceptions to write out.
* @param className the name of the generated class.
* @param pw the {@link IndentingPrintWriter} for writing to the file.
*/
private void writeExceptions(String groupName, Queue<InputException> exceptions,
String className, IndentingPrintWriter pw) {
for (InputException e : exceptions) {
pw.println("///////////////////////////////////////////////////////////");
pw.printMsg("// @", e.getName());
pw.println("///////////////////////////////////////////////////////////");
pw.println();
for (InputCode c : e.getCodes())
writeMethods(groupName, e.getName(), c.getName(), c.getCode(),
c.getLogLevel(), className, StringUtil.countArgs(c.getMessage()), pw);
pw.flush();
}
}
/**
* Writes out the methods for a particular error.
*
* @param groupName the name of this group of exceptions.
* @param exceptionName the name of this particular exception.
* @param errorName the name of this particular error.
* @param code the minor code for this particular error.
* @param ident the name of the error in mixed-case identifier form.
* @param level the level at which to place log messages.
* @param className the name of the class for this group of exceptions.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethods(String groupName, String exceptionName, String errorName,
int code, String level, String className, int numParams,
IndentingPrintWriter pw) {
String ident = StringUtil.toMixedCase(errorName);
pw.printMsg("public static final int @ = @ ;", errorName, getBase(groupName, code));
pw.println();
pw.flush();
writeMethodStatusCause(groupName, exceptionName, errorName, ident, level,
numParams, className, pw);
pw.println();
pw.flush();
writeMethodStatus(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
writeMethodCause(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
writeMethodNoArgs(exceptionName, ident, numParams, pw);
pw.println();
pw.flush();
}
/**
* Writes out a method for an error that takes a
* {@link org.omg.CORBA.CompletionStatus} and a cause.
*
* @param groupName the name of this group of exceptions.
* @param exceptionName the name of this particular exception.
* @param errorName the name of this particular error.
* @param ident the name of the error in mixed-case identifier form.
* @param logLevel the level at which to place log messages.
* @param numParams the number of parameters the detail message takes.
* @param className the name of the class for this group of exceptions.
* @param pw the print writer for writing to the file.
*/
private void writeMethodStatusCause(String groupName, String exceptionName,
String errorName, String ident,
String logLevel, int numParams,
String className, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg( "public @ @( CompletionStatus cs, Throwable t@) {", exceptionName,
ident, makeDeclArgs(true, numParams));
pw.printMsg( "@ exc = new @( @, cs ) ;", exceptionName, exceptionName, errorName);
pw.indent();
pw.println( "if (t != null)" );
pw.undent();
pw.println( "exc.initCause( t ) ;" );
pw.println();
pw.indent();
pw.printMsg( "if (logger.isLoggable( Level.@ )) {", logLevel);
if (numParams > 0) {
pw.printMsg( "Object[] parameters = new Object[@] ;", numParams);
for (int a = 0; a < numParams; ++a)
pw.printMsg("parameters[@] = arg@ ;", a, a);
} else
pw.println( "Object[] parameters = null ;");
pw.indent();
pw.printMsg( "doLog( Level.@, \"@.@\",", logLevel, groupName, ident);
pw.undent();
pw.undent();
pw.printMsg( "parameters, @.class, exc ) ;", className);
pw.println( "}");
pw.println();
pw.undent();
pw.println( "return exc ;");
pw.println( "}");
}
/**
* Writes out a method for an error that takes a
* {@link org.omg.CORBA.CompletionStatus}.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodStatus(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( CompletionStatus cs@) {", exceptionName,
ident, makeDeclArgs(true, numParams));
pw.undent();
pw.printMsg("return @( cs, null@ ) ;", ident, makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Writes out a method for an error that takes a cause.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodCause(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( Throwable t@) {", exceptionName, ident,
makeDeclArgs(true, numParams));
pw.undent();
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, t@ ) ;", ident,
makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Writes out a method for an error that takes no arguments.
*
* @param exceptionName the name of this particular exception.
* @param ident the name of the error in mixed-case identifier form.
* @param numParams the number of parameters the detail message takes.
* @param pw the print writer for writing to the file.
*/
private void writeMethodNoArgs(String exceptionName, String ident,
int numParams, IndentingPrintWriter pw) {
pw.indent();
pw.printMsg("public @ @( @) {", exceptionName, ident,
makeDeclArgs(false, numParams));
pw.undent();
pw.printMsg("return @( CompletionStatus.COMPLETED_NO, null@ ) ;",
ident, makeCallArgs(true, numParams));
pw.println("}");
}
/**
* Returns a list of comma-separated arguments with type declarations.
*
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeDeclArgs(boolean leadingComma, int numArgs) {
return makeArgString("Object arg", leadingComma, numArgs);
}
/**
* Returns a list of comma-separated arguments without type declarations.
*
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeCallArgs(boolean leadingComma, int numArgs) {
return makeArgString("arg", leadingComma, numArgs);
}
/**
* Returns a list of comma-separated arguments.
*
* @param prefixString the string with which to prefix each argument.
* @param leadingComma true if the list should start with a comma.
* @param numArgs the number of arguments to generate.
* @return the generated string.
*/
private String makeArgString(String prefixString, boolean leadingComma,
int numArgs) {
if (numArgs == 0)
return " ";
if (numArgs == 1) {
if (leadingComma)
return ", " + prefixString + (numArgs - 1);
else
return " " + prefixString + (numArgs - 1);
}
return makeArgString(prefixString, leadingComma, numArgs - 1) +
", " + prefixString + (numArgs - 1);
}
/**
* Returns the {@link String} containing the calculation of the
* error code.
*
* @param groupName the group of exception to which the code belongs.
* @param code the minor code number representing the exception within the group.
* @return the unique error code.
*/
private String getBase(String groupName, int code) {
if (groupName.equals("OMG"))
return "OMGVMCID.value + " + code;
else
return "SUNVMCID.value + " + (code + getSunBaseNumber(groupName));
}
/**
* Returns the base number for Sun-specific exceptions.
*
* @return the base number.
*/
private int getSunBaseNumber(String groupName) {
return 200 * SUN_EXCEPTION_GROUPS.indexOf(groupName);
}
/**
* Writes out a resource file using the data from the given
* {@link Input} object. The result is written to {@code outDir}.
*
* @param outDir the directory to write the Java class to.
* @param input the parsed input data.
* @throws FileNotFoundException if the output file can't be written.
*/
private void writeResource(String outDir, Input input)
throws FileNotFoundException {
FileOutputStream file = new FileOutputStream(outDir + File.separator +
input.getClassName() + ".resource");
IndentingPrintWriter pw = new IndentingPrintWriter(file);
String groupName = input.getGroupName();
for (InputException e : input.getExceptions()) {
String exName = e.getName();
for (InputCode c : e.getCodes()) {
String ident = StringUtil.toMixedCase(c.getName());
pw.printMsg("@.@=\"@: (@) @\"", groupName, ident,
getMessageID(groupName, exName, c.getCode()), exName, c.getMessage());
}
pw.flush();
}
pw.close();
}
/**
* Returns the message ID corresponding to the given group name,
* exception name and error code.
*
* @param groupName the name of the group of exceptions.
* @param exception the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getMessageID(String groupName, String exceptionName, int code) {
if (groupName.equals("OMG"))
return getStandardMessageID(exceptionName, code);
else
return getSunMessageID(groupName, exceptionName, code);
}
/**
* Returns the standard (OMG) message ID corresponding to the given
* exception name and error code.
*
* @param exceptionName the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getStandardMessageID(String exceptionName, int code) {
return new Formatter().format("IOP%s0%04d", getExceptionID(exceptionName),
code).toString();
}
/**
* Returns the Sun message ID corresponding to the given group name,
* exception name and error code.
*
* @param groupName the name of the group of exceptions.
* @param exceptionName the name of the particular exception.
* @param code an error code from the given exception.
* @return the message ID.
*/
private String getSunMessageID(String groupName, String exceptionName, int code) {
return new Formatter().format("IOP%s1%04d", getExceptionID(exceptionName),
getSunBaseNumber(groupName) + code).toString();
}
/**
* Returns the exception ID corresponding to the given exception name.
*
* @param exceptionName the name of the particular exception.
* @return the message ID.
*/
private String getExceptionID(String exceptionName) {
return new Formatter().format("%03d", EXCEPTIONS.indexOf(exceptionName)).toString();
}
/**
* Entry point for running the generator from the command
* line. Users can specify either "make-class" or "make-resource"
* as the first argument to generate the specified type of file.
*
* @param args the command-line arguments.
* @throws FileNotFoundException if the input file can not be found.
* @throws IOException if an I/O error occurs.
*/
public static void main(String[] args)
throws FileNotFoundException, IOException
{
if (args.length < 3)
{
System.err.println("(make-class|make-resource) <input file> <output dir>");
System.exit(-1);
}
if (args[0].equals("make-class"))
new MC().makeClass(args[1], args[2]);
else if (args[0].equals("make-resource"))
new MC().makeResource(args[1], args[2]);
else
System.err.println("Invalid command: " + args[0]);
}
}

View File

@ -1,62 +0,0 @@
/*
* Copyright (c) 2003, 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.
*/
package build.tools.logutil;
public abstract class StringUtil {
/** Take a string containing underscores, and return a string
* with the underscore removed, and all characters exception in lower
* case except the characters after the underscores.
*/
public static String toMixedCase( String str )
{
StringBuffer sbuf = new StringBuffer( str.length() ) ;
boolean uppercaseNext = false ;
for (int ctr=0; ctr<str.length(); ctr++) {
char ch = str.charAt( ctr ) ;
if (ch == '_') {
uppercaseNext = true ;
} else if (uppercaseNext) {
sbuf.append( Character.toUpperCase( ch ) ) ;
uppercaseNext = false ;
} else {
sbuf.append( Character.toLowerCase( ch ) ) ;
}
}
return sbuf.toString() ;
}
public static int countArgs( String str )
{
int result = 0 ;
for( int ctr = 0; ctr<str.length(); ctr++ )
if (str.charAt(ctr) == '{')
result++ ;
return result ;
}
}

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2018, 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
@ -23,7 +23,7 @@
# questions.
#
##########################################################################################
################################################################################
#
# This Makefile, together with Tools.gmk, can be used to compile a set of
# gcc based cross compilation, portable, self contained packages, capable
@ -31,60 +31,55 @@
#
# In addition to the makefiles, access to Oracle Linux installation
# media is required. This has been tested against Oracle Enterprise Linux
# 5.5. Set variables RPM_DIR_x86_64 and RPM_DIR_i686 respectively to point
# to directory containing the RPMs.
# 6.4.
#
# By default this Makefile will build crosstools for:
# * i686-unknown-linux-gnu
# * x86_64-unknown-linux-gnu
# The x86_64 version of the compilers will work in multi arch mode and will
# be able to compile 32bit binaries with the -m32 flag. This makes the
# explicit cross compiler for i686 somewhat redundant and is a known issue.
# By default this Makefile will build a native toolchain for the current
# platform if called with something like this:
#
# To build the full set of crosstools, use a command line looking like this:
# make tars
#
# make tars RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
# To build the full set of crosstools for additional platforms, use a command
# line looking like this:
#
# To create a x86_64 package without the redundant i686 cross compiler, do
# like this:
# make tars platforms="x86_64-unknown-linux-gnu sparc64-unknown-linux-gnu"
#
# make tars platforms=x86_64-unknown-linux-gnu RPM_DIR_x86_64=/tmp/oel64-x86_64/Packages/ RPM_DIR_i686=/tmp/oel64-i686/Packages/
#
# Main makefile which iterates over all host and target platforms.
# This is the makefile which iterates over all host and target platforms.
#
os := $(shell uname -o)
cpu := x86_64
#$(shell uname -p)
#
# This wrapper script can handle exactly these platforms
#
platforms := $(foreach p,x86_64 i686,$(p)-unknown-linux-gnu)
#platforms := $(foreach p,x86_64,$(p)-unknown-linux-gnu)
cpu := $(shell uname -p)
# Figure out what platform this is building on.
me := $(cpu)-$(if $(findstring Linux,$(os)),unknown-linux-gnu)
$(info Building on platform $(me))
#
# By default just build for the current platform, which is assumed to be Linux
#
platforms := $(me)
host_platforms := $(platforms)
target_platforms := $(platforms)
$(info host_platforms $(host_platforms))
$(info target_platforms $(target_platforms))
all compile : $(platforms)
ifeq (,$(SKIP_ME))
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p) : $$(me)))
endif
OUTPUTDIR = $(abspath ../../build/devkit)
RESULT = $(OUTPUTDIR)/result
OUTPUT_ROOT = $(abspath ../../build/devkit)
RESULT = $(OUTPUT_ROOT)/result
submakevars = HOST=$@ BUILD=$(me) \
RESULT=$(RESULT) PREFIX=$(RESULT)/$@ \
OUTPUTDIR=$(OUTPUTDIR)
$(platforms) :
OUTPUT_ROOT=$(OUTPUT_ROOT)
$(host_platforms) :
@echo 'Building compilers for $@'
@echo 'Targets: $(platforms)'
for p in $@ $(filter-out $@,$(platforms)); do \
@echo 'Targets: $(target_platforms)'
for p in $(filter $@, $(target_platforms)) $(filter-out $@, $(target_platforms)); do \
$(MAKE) -f Tools.gmk download-rpms $(submakevars) TARGET=$$p && \
$(MAKE) -f Tools.gmk all $(submakevars) \
TARGET=$$p || exit 1 ; \
done
@ -92,12 +87,8 @@ $(platforms) :
$(MAKE) -f Tools.gmk ccache $(submakevars) TARGET=$@
@echo 'All done"'
$(foreach a,i686 x86_64,$(eval $(a) : $(filter $(a)%,$(platforms))))
ia32 : i686
today := $(shell date +%Y%m%d)
define Mktar
$(1)_tar = $$(RESULT)/sdk-$(1)-$$(today).tar.gz
$$($(1)_tar) : PLATFORM = $(1)
@ -105,7 +96,7 @@ define Mktar
$$($(1)_tar) : $(1) $$(shell find $$(RESULT)/$(1))
endef
$(foreach p,$(platforms),$(eval $(call Mktar,$(p))))
$(foreach p,$(host_platforms),$(eval $(call Mktar,$(p))))
tars : all $(TARFILES)
onlytars : $(TARFILES)
@ -115,7 +106,9 @@ onlytars : $(TARFILES)
touch $@
clean :
rm -rf build result
rm -rf $(addprefix ../../build/devkit/, result $(host_platforms))
dist-clean: clean
rm -rf $(addprefix ../../build/devkit/, src download)
FORCE :
.PHONY : $(configs) $(platforms)
.PHONY : all compile tars $(configs) $(host_platforms) clean dist-clean

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2018, 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
@ -44,24 +44,42 @@ $(info HOST=$(HOST))
$(info BUILD=$(BUILD))
ARCH := $(word 1,$(subst -, ,$(TARGET)))
$(info ARCH=$(ARCH))
##########################################################################################
# Define external dependencies
# Latest that could be made to work.
gcc_ver := gcc-4.9.2
binutils_ver := binutils-2.25
ccache_ver := ccache-3.2.1
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1
GCC_VER := 7.3.0
ifeq ($(GCC_VER), 7.3.0)
gcc_ver := gcc-7.3.0
binutils_ver := binutils-2.30
ccache_ver := ccache-3.3.6
mpfr_ver := mpfr-3.1.5
gmp_ver := gmp-6.1.2
mpc_ver := mpc-1.0.3
gdb_ver := gdb-8.1
else ifeq ($(GCC_VER), 4.9.2)
gcc_ver := gcc-4.9.2
binutils_ver := binutils-2.25
ccache_ver := ccache-3.2.1
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
mpc_ver := mpc-1.0.1
gdb_ver := gdb-7.12.1
else
$(error Unsupported GCC version)
endif
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.bz2
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.bz2
CCACHE := http://samba.org/ftp/ccache/$(ccache_ver).tar.gz
GCC := http://ftp.gnu.org/pub/gnu/gcc/$(gcc_ver)/$(gcc_ver).tar.xz
BINUTILS := http://ftp.gnu.org/pub/gnu/binutils/$(binutils_ver).tar.xz
CCACHE := https://samba.org/ftp/ccache/$(ccache_ver).tar.xz
MPFR := http://www.mpfr.org/${mpfr_ver}/${mpfr_ver}.tar.bz2
GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
MPC := http://ftp.gnu.org/pub/gnu/mpc/${mpc_ver}.tar.gz
GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
OEL_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
# RPMs in OEL6.4
LINUX_VERSION := OEL6.4
@ -85,30 +103,9 @@ RPM_LIST := \
libgcc \
zlib zlib-devel \
libffi libffi-devel \
fontconfig fontconfig-devel
ifeq ($(ARCH),x86_64)
RPM_DIR ?= $(RPM_DIR_x86_64)
RPM_ARCHS := x86_64 noarch
ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode.
RPM_ARCHS += i386 i686
endif
endif
else
RPM_DIR ?= $(RPM_DIR_i686)
RPM_ARCHS := i386 i686
endif
# Sort to remove duplicates
RPM_FILE_LIST := $(sort $(foreach a,$(RPM_ARCHS),$(wildcard $(patsubst %,$(RPM_DIR)/%*$a.rpm,$(RPM_LIST)))))
#$(info RPM_FILE_LIST $(RPM_FILE_LIST))
ifeq ($(RPM_FILE_LIST),)
$(error Found no RPMs, RPM_DIR must point to list of directories to search for RPMs)
endif
fontconfig fontconfig-devel \
systemtap-sdt-devel \
#
##########################################################################################
# Define common directories and files
@ -122,13 +119,14 @@ else
endif
# Define directories
RESULT := $(OUTPUTDIR)/result
BUILDDIR := $(OUTPUTDIR)/$(HOST)/$(TARGET)
RESULT := $(OUTPUT_ROOT)/result
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
PREFIX := $(RESULT)/$(HOST)
TARGETDIR := $(PREFIX)/$(TARGET)
SYSROOT := $(TARGETDIR)/sysroot
DOWNLOAD := $(OUTPUTDIR)/download
SRCDIR := $(OUTPUTDIR)/src
DOWNLOAD := $(OUTPUT_ROOT)/download
DOWNLOAD_RPMS := $(DOWNLOAD)/rpms
SRCDIR := $(OUTPUT_ROOT)/src
# Marker file for unpacking rpms
rpms := $(SYSROOT)/rpms_unpacked
@ -136,6 +134,16 @@ rpms := $(SYSROOT)/rpms_unpacked
# Need to patch libs that are linker scripts to use non-absolute paths
libs := $(SYSROOT)/libs_patched
################################################################################
# Download RPMs
download-rpms:
mkdir -p $(DOWNLOAD_RPMS)
# Only run this if rpm dir is empty.
ifeq ($(wildcard $(DOWNLOAD_RPMS)/*.rpm), )
cd $(DOWNLOAD_RPMS) && \
wget -r -np -nd $(patsubst %, -A "*%*.rpm", $(RPM_LIST)) $(OEL_URL)
endif
##########################################################################################
# Unpack source packages
@ -147,7 +155,7 @@ define Download
$$($(1)_CFG) : $$($(1)_FILE)
mkdir -p $$(SRCDIR)
tar -C $$(SRCDIR) -x$$(if $$(findstring .gz, $$<),z,j)f $$<
tar -C $$(SRCDIR) -xf $$<
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
echo PATCHING $$(p) ; \
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
@ -159,15 +167,32 @@ define Download
endef
# Download and unpack all source packages
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC,$(eval $(call Download,$(p))))
$(foreach p,GCC BINUTILS CCACHE MPFR GMP MPC GDB,$(eval $(call Download,$(p))))
##########################################################################################
# Unpack RPMS
ifeq ($(ARCH),x86_64)
RPM_ARCHS := x86_64 noarch
ifeq ($(BUILD),$(HOST))
ifeq ($(TARGET),$(HOST))
# When building the native compiler for x86_64, enable mixed mode.
RPM_ARCHS += i386 i686
endif
endif
else ifeq ($(ARCH),i686))
RPM_ARCHS := i386 i686
else
RPM_ARCHS := $(ARCH)
endif
RPM_FILE_LIST := $(sort $(foreach a, $(RPM_ARCHS), \
$(wildcard $(patsubst %,$(DOWNLOAD_RPMS)/%*$a.rpm,$(RPM_LIST))) \
))
# Note. For building linux you should install rpm2cpio.
define unrpm
$(SYSROOT)/$(notdir $(1)).unpacked \
: $(1)
$(SYSROOT)/$(notdir $(1)).unpacked : $(1)
$$(rpms) : $(SYSROOT)/$(notdir $(1)).unpacked
endef
@ -210,19 +235,20 @@ $(libs) : $(rpms)
##########################################################################################
# Create links for ffi header files so that they become visible by default when using the
# devkit.
ifeq ($(ARCH), x86_64)
$(SYSROOT)/usr/include/ffi.h: $(rpms)
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffi.h: $(rpms)
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
cd $(@D) && rm -f $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
$(SYSROOT)/usr/include/ffitarget.h: $(rpms)
cd $(@D) && rm $(@F) && ln -s ../lib/libffi-*/include/$(@F) .
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
SYSROOT_LINKS += $(SYSROOT)/usr/include/ffi.h $(SYSROOT)/usr/include/ffitarget.h
endif
##########################################################################################
# Define marker files for each source package to be compiled
$(foreach t,binutils mpfr gmp mpc gcc ccache,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
$(foreach t,binutils mpfr gmp mpc gcc ccache gdb,$(eval $(t) = $(TARGETDIR)/$($(t)_ver).done))
##########################################################################################
@ -234,7 +260,8 @@ CONFIG = --target=$(TARGET) \
PATHEXT = $(RESULT)/$(BUILD)/bin:
PATHPRE = PATH=$(PATHEXT)$(PATH)
BUILDPAR = -j16
NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor)
BUILDPAR = -j$(NUM_CORES)
# Default commands to when making
MAKECMD =
@ -317,6 +344,8 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
--disable-nls \
--program-prefix=$(TARGET)- \
--enable-multilib \
--enable-gold \
--enable-plugins \
) > $(@D)/log.config 2>&1
@echo 'done'
@ -392,7 +421,6 @@ $(BUILDDIR)/$(gcc_ver)/Makefile \
--with-sysroot=$(SYSROOT) \
--enable-languages=c,c++ \
--enable-shared \
--enable-multilib \
--disable-nls \
--with-gnu-as \
--with-gnu-ld \
@ -410,6 +438,23 @@ $(BUILDDIR)/$(gcc_ver)/Makefile : $(gmp) $(mpfr) $(mpc)
$(mpfr) : $(gmp)
$(mpc) : $(gmp) $(mpfr)
################################################################################
# Build gdb but only where host and target match
ifeq ($(HOST), $(TARGET))
$(BUILDDIR)/$(gdb_ver)/Makefile: $(GDB_CFG)
$(info Configuring $@. Log in $(@D)/log.config)
mkdir -p $(@D)
( \
cd $(@D) ; \
$(PATHPRE) $(ENVS) CFLAGS="$(CFLAGS)" $(GDB_CFG) \
$(CONFIG) \
--with-sysroot=$(SYSROOT) \
) > $(@D)/log.config 2>&1
@echo 'done'
$(gdb): $(gcc)
endif
##########################################################################################
# very straightforward. just build a ccache. it is only for host.
$(BUILDDIR)/$(ccache_ver)/Makefile \
@ -434,7 +479,7 @@ ifeq ($(HOST),$(TARGET))
if [ ! -e $(PREFIX)/bin/$(TARGET)-$$f ]; \
then \
cd $(PREFIX)/bin && \
ln -s $$f $(TARGET)-$$f ; \
ln -fs $$f $(TARGET)-$$f ; \
fi \
done
@touch $@
@ -451,7 +496,7 @@ ifeq ($(HOST),$(TARGET))
if [ ! -e $(TARGETDIR)/$(l)/$$f ]; then \
mkdir -p $(TARGETDIR)/$(l) && \
cd $(TARGETDIR)/$(l)/ && \
ln -s $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
ln -fs $(if $(findstring /,$(l)),../,)../../$(l)/$$f $$f; \
fi \
done;)
@echo 'done'
@ -471,6 +516,7 @@ $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
$(PATHPRE) $(ENVS) $(MAKE) $(BUILDPAR) -f $< -C $(<D) $(MAKECMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.build 2>&1
@echo -n 'installing...'
$(PATHPRE) $(MAKE) $(INSTALLPAR) -f $< -C $(<D) $(INSTALLCMD) $(MAKECMD.$(notdir $@)) > $(<D)/log.install 2>&1
@mkdir -p $(@D)
@touch $@
@echo 'done'
@ -486,17 +532,38 @@ $(PREFIX)/devkit.info: FRC
echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
echo 'DEVKIT_EXTRA_PATH="$$DEVKIT_ROOT/bin"' >> $@
##########################################################################################
# Copy these makefiles into the root of the kit
$(PREFIX)/Makefile: ./Makefile
rm -rf $@
cp $< $@
$(PREFIX)/Tools.gmk: ./Tools.gmk
rm -rf $@
cp $< $@
THESE_MAKEFILES := $(PREFIX)/Makefile $(PREFIX)/Tools.gmk
##########################################################################################
ifeq ($(TARGET), $(HOST))
# To build with dtrace support, the build needs access to the dtrace executable from the
# sysroot. Generally we don't want to add binaries in the sysroot to the path, but
# luckily this seems to execute well enough on a different host Linux distro, so symlink
# it into the main bin dir.
$(PREFIX)/bin/dtrace:
@echo 'Creating dtrace soft link'
ln -s ../$(HOST)/sysroot/usr/bin/dtrace $@
$(PREFIX)/bin/%:
@echo 'Creating missing $* soft link'
ln -s $(TARGET)-$* $@
missing-links := $(addprefix $(PREFIX)/bin/, \
addr2line ar as c++ c++filt elfedit g++ gcc gprof ld nm objcopy ranlib readelf \
size strings strip)
size strings strip ld.bfd ld.gold dtrace)
endif
##########################################################################################
@ -507,7 +574,9 @@ rpms : $(rpms)
libs : $(libs)
sysroot : rpms libs
gcc : sysroot $(gcc) $(gccpatch)
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS)
gdb : $(gdb)
all : binutils gcc bfdlib $(PREFIX)/devkit.info $(missing-links) $(SYSROOT_LINKS) \
$(THESE_MAKEFILES) gdb
# this is only built for host. so separate.
ccache : $(ccache)

View File

@ -1,242 +0,0 @@
#
# Copyright (c) 2014, 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 IdlCompilation.gmk
include SetupJavaCompilers.gmk
################################################################################
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_CORBA, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(TOPDIR)/make/corba/src/classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes))
TOOL_LOGUTIL_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/corba_tools_classes \
build.tools.logutil.MC
$(eval $(call SetupJavaCompilation,BUILD_IDLJ, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(TOPDIR)/src/java.corba/share/classes, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/idlj_classes, \
COPY := .prp, \
INCLUDES := com/sun/tools/corba/se/idl, \
EXCLUDE_FILES := ResourceBundleUtil.java module-info.java))
# Force the language to english for predictable source code generation.
TOOL_IDLJ_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/idlj_classes \
-Duser.language=en com.sun.tools.corba.se.idl.toJavaPortable.Compile
################################################################################
EXCEPTION_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/logging
LOGWRAPPER_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba/_logwrappers
# Generate LogWrapper classes
$(EXCEPTION_DIR)/%SystemException.java: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(call LogInfo, Generating class file from $*.mc)
$(call MakeDir, $(@D))
$(RM) -f $(@D)/_the_wrappers.d
$(TOOL_LOGUTIL_CMD) make-class $< $(@D)
# Generate LogWrapper properties file by concatening resource files
$(EXCEPTION_DIR)/LogStrings.properties: \
$(LOGWRAPPER_DIR)/ActivationSystemException.resource \
$(LOGWRAPPER_DIR)/IORSystemException.resource \
$(LOGWRAPPER_DIR)/InterceptorsSystemException.resource \
$(LOGWRAPPER_DIR)/NamingSystemException.resource \
$(LOGWRAPPER_DIR)/OMGSystemException.resource \
$(LOGWRAPPER_DIR)/ORBUtilSystemException.resource \
$(LOGWRAPPER_DIR)/POASystemException.resource \
$(LOGWRAPPER_DIR)/UtilSystemException.resource
$(call LogInfo, Concatenating 8 resource files into $(@F))
$(call MakeDir, $(@D))
$(CAT) $^ > $@
# The resources files are generated from lisp-like .mc files.
$(LOGWRAPPER_DIR)/%SystemException.resource: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/spi/logging/data/%.mc \
$(BUILD_TOOLS_CORBA)
$(call LogInfo, Generating resource file from $*.mc)
$(call MakeDir, $(@D))
$(RM) -f $(@D)/_the_wrappers.d
$(TOOL_LOGUTIL_CMD) make-resource $< $(@D)
LOGWRAPPER_TARGETS := \
$(EXCEPTION_DIR)/ActivationSystemException.java \
$(EXCEPTION_DIR)/IORSystemException.java \
$(EXCEPTION_DIR)/InterceptorsSystemException.java \
$(EXCEPTION_DIR)/NamingSystemException.java \
$(EXCEPTION_DIR)/OMGSystemException.java \
$(EXCEPTION_DIR)/ORBUtilSystemException.java \
$(EXCEPTION_DIR)/POASystemException.java \
$(EXCEPTION_DIR)/UtilSystemException.java \
$(EXCEPTION_DIR)/LogStrings.properties
################################################################################
# Build the IDLs.
IDL_DELETES := \
org/omg/DynamicAny/*POA* \
org/omg/DynamicAny/*Holder* \
org/omg/DynamicAny/DynValueBoxHelper.java \
org/omg/DynamicAny/DynValueCommonHelper.java \
org/omg/DynamicAny/_DynValueCommonStub.java \
org/omg/DynamicAny/_DynValueBoxStub.java \
org/omg/DynamicAny/DynAnyPackage/TypeMismatchHolder.java \
org/omg/DynamicAny/DynAnyPackage/InvalidValueHolder.java \
org/omg/DynamicAny/DynAnyFactoryPackage/InconsistentTypeCodeHolder.java \
org/omg/IOP/BI_DIR_IIOP.java \
org/omg/IOP/ChainBypassCheck.java \
org/omg/IOP/ChainBypassInfo.java \
org/omg/IOP/FORWARDED_IDENTITY.java \
org/omg/IOP/INVOCATION_POLICIES.java \
org/omg/IOP/LogicalThreadId.java \
org/omg/IOP/SendingContextRunTime.java \
org/omg/IOP/UnknownExceptionInfo.java \
org/omg/IOP/TaggedComponentSeqHolder.java \
org/omg/PortableServer/CurrentPackage/NoContextHolder.java \
org/omg/PortableServer/ForwardRequestHolder.java \
org/omg/PortableServer/IdAssignmentPolicyValueHelper.java \
org/omg/PortableServer/IdAssignmentPolicyValueHolder.java \
org/omg/PortableServer/IdUniquenessPolicyValueHelper.java \
org/omg/PortableServer/IdUniquenessPolicyValueHolder.java \
org/omg/PortableServer/ImplicitActivationPolicyValueHelper.java \
org/omg/PortableServer/ImplicitActivationPolicyValueHolder.java \
org/omg/PortableServer/LifespanPolicyValueHelper.java \
org/omg/PortableServer/LifespanPolicyValueHolder.java \
org/omg/PortableServer/ServantRetentionPolicyValueHelper.java \
org/omg/PortableServer/ServantRetentionPolicyValueHolder.java \
org/omg/PortableServer/ObjectIdHelper.java \
org/omg/PortableServer/ObjectIdHolder.java \
org/omg/PortableServer/POAListHelper.java \
org/omg/PortableServer/POAListHolder.java \
org/omg/PortableServer/POAManagerPackage/AdapterInactiveHolder.java \
org/omg/PortableServer/POAManagerPackage/StateHelper.java \
org/omg/PortableServer/POAManagerPackage/StateHolder.java \
org/omg/PortableServer/POAPackage/AdapterAlreadyExistsHolder.java \
org/omg/PortableServer/POAPackage/AdapterNonExistentHolder.java \
org/omg/PortableServer/POAPackage/InvalidPolicyHolder.java \
org/omg/PortableServer/POAPackage/NoServantHolder.java \
org/omg/PortableServer/POAPackage/ObjectAlreadyActiveHolder.java \
org/omg/PortableServer/POAPackage/ObjectNotActiveHolder.java \
org/omg/PortableServer/POAPackage/ServantAlreadyActiveHolder.java \
org/omg/PortableServer/POAPackage/ServantNotActiveHolder.java \
org/omg/PortableServer/POAPackage/WrongAdapterHolder.java \
org/omg/PortableServer/POAPackage/WrongPolicyHolder.java \
org/omg/PortableServer/RequestProcessingPolicyValueHelper.java \
org/omg/PortableServer/RequestProcessingPolicyValueHolder.java \
org/omg/PortableServer/ServantActivatorHolder.java \
org/omg/PortableServer/ServantLocatorHolder.java \
org/omg/PortableServer/ThreadPolicyValueHelper.java \
org/omg/PortableServer/ThreadPolicyValueHolder.java \
org/omg/PortableInterceptor/ClientRequestInfoHelper.java \
org/omg/PortableInterceptor/ClientRequestInterceptorHelper.java \
org/omg/PortableInterceptor/IORInfoHelper.java \
org/omg/PortableInterceptor/IORInterceptorHelper.java \
org/omg/PortableInterceptor/InterceptorHelper.java \
org/omg/PortableInterceptor/ORBInitInfoHelper.java \
org/omg/PortableInterceptor/ORBInitializerHelper.java \
org/omg/PortableInterceptor/PolicyFactoryHelper.java \
org/omg/PortableInterceptor/ReplyStatusHelper.java \
org/omg/PortableInterceptor/RequestInfoHelper.java \
org/omg/PortableInterceptor/ServerRequestInfoHelper.java \
org/omg/PortableInterceptor/ServerRequestInterceptorHelper.java \
org/omg/PortableInterceptor/SlotIdHelper.java \
org/omg/PortableInterceptor/ClientRequestInfoHolder.java \
org/omg/PortableInterceptor/ClientRequestInterceptorHolder.java \
org/omg/PortableInterceptor/CurrentHolder.java \
org/omg/PortableInterceptor/ForwardRequestHolder.java \
org/omg/PortableInterceptor/IORInfoHolder.java \
org/omg/PortableInterceptor/IORInterceptorHolder.java \
org/omg/PortableInterceptor/InterceptorHolder.java \
org/omg/PortableInterceptor/InvalidSlotHolder.java \
org/omg/PortableInterceptor/ORBInitInfoHolder.java \
org/omg/PortableInterceptor/ORBInitializerHolder.java \
org/omg/PortableInterceptor/PolicyFactoryHolder.java \
org/omg/PortableInterceptor/RequestInfoHolder.java \
org/omg/PortableInterceptor/ServerRequestInfoHolder.java \
org/omg/PortableInterceptor/ServerRequestInterceptorHolder.java \
org/omg/PortableInterceptor/TaggedComponentSeqHolder.java \
org/omg/PortableInterceptor/ORBInitInfoPackage/DuplicateNameHolder.java \
org/omg/PortableInterceptor/ORBInitInfoPackage/InvalidNameHolder.java \
org/omg/IOP/CodecPackage/FormatMismatchHolder.java \
org/omg/IOP/CodecPackage/InvalidTypeForEncodingHolder.java \
org/omg/IOP/CodecPackage/TypeMismatchHolder.java \
org/omg/IOP/CodecHelper.java \
org/omg/IOP/EncodingFormatHelper.java \
org/omg/IOP/EncodingHelper.java \
org/omg/IOP/CodecFactoryPackage/UnknownEncodingHolder.java \
org/omg/IOP/CodecFactoryHolder.java \
org/omg/IOP/CodecHolder.java \
org/omg/IOP/EncodingHolder.java \
org/omg/IOP/TaggedComponentSeqHelper.java \
org/omg/Dynamic/ContextListHelper.java \
org/omg/Dynamic/ExceptionListHelper.java \
org/omg/Dynamic/ParameterHolder.java \
org/omg/Dynamic/ParameterListHolder.java \
org/omg/Dynamic/ExceptionListHolder.java \
org/omg/Dynamic/ParameterHelper.java \
org/omg/Dynamic/ParameterListHelper.java \
org/omg/Dynamic/RequestContextHelper.java \
org/omg/CORBA/OctetSeqHelper.java \
org/omg/CORBA/OctetSeqHolder.java \
org/omg/CORBA/PolicyError.java \
org/omg/CORBA/RepositoryIdHelper.java \
#
$(eval $(call SetupIdlCompilation,BUILD_IDLS, \
IDLJ := $(TOOL_IDLJ_CMD), \
SRC := $(TOPDIR)/src/java.corba/share/classes, \
BIN := $(SUPPORT_OUTPUTDIR)/gensrc/java.corba, \
EXCLUDES := com/sun/tools/corba/se/idl/% \
org/omg/CORBA/% \
com/sun/corba/se/GiopIDL/% \
org/omg/PortableServer/corba.idl, \
INCLUDES := %, \
OLDIMPLBASES := com/sun/corba/se/PortableActivationIDL/activation.idl \
com/sun/corba/se/spi/activation/activation.idl, \
DELETES := $(IDL_DELETES)))
$(BUILD_IDLS): $(BUILD_IDLJ)
################################################################################
# zh_HK is just a copy of zh_TW
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties: \
$(TOPDIR)/src/java.corba/share/classes/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_TW.properties
$(install-file)
################################################################################
all: $(BUILD_IDLS) $(LOGWRAPPER_TARGETS) \
$(SUPPORT_OUTPUTDIR)/gensrc/java.corba/com/sun/corba/se/impl/orbutil/resources/sunorb_zh_HK.properties

View File

@ -32,6 +32,8 @@ $(eval $(call IncludeCustomExtension, hotspot/lib/JvmOverrideFiles.gmk))
ifeq ($(TOOLCHAIN_TYPE), gcc)
BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0
BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments
BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized
BUILD_LIBJVM_interp_masm_x86.cpp_CXXFLAGS := -Wno-uninitialized
endif
ifeq ($(OPENJDK_TARGET_OS), linux)

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2018, 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
@ -144,8 +144,6 @@ public class GenGraphs {
ranks.add(Set.of("java.sql"));
ranks.add(Set.of("java.compiler", "java.instrument"));
ranks.add(Set.of("java.desktop", "java.management"));
ranks.add(Set.of("java.corba", "java.xml.ws"));
ranks.add(Set.of("java.xml.bind", "java.xml.ws.annotation"));
this.attrs = attrs;
}

View File

@ -1,11 +1,10 @@
<html>
<head>
<title>JCP Technologies in JDK 9</title>
<title>JCP Technologies in JDK 11</title>
<style type="text/css">
table { border: 1px solid black; border-collapse: collapse; }
tr.se-base { background-color: yellow; }
tr.se-misc { background-color: bisque; }
tr.se-ee { background-color: sandybrown; }
tr.se-ext { background-color: pink; }
tr.non-se { background-color: lightsteelblue; }
td { font-family: monospace; padding: 5px; border: 1px solid; }
@ -13,19 +12,18 @@ td.agg { background-color: lightgray; }
</style>
</head>
<h1>JCP Technologies in JDK 9</h1>
<h1>JCP Technologies in JDK 11</h1>
<p><em>Last updated 2017-06-08</em></p>
<p><em>Last updated 2018-02-07</em></p>
<p><a href="module-summary.html">JDK 9 Module Summary</a> | Technologies in the <a href="https://docs.oracle.com/javase/8/docs/">Java SE 8 Documentation</a></p>
<p><a href="module-summary.html">JDK 11 Module Summary</a> | Technologies in the <a href="https://docs.oracle.com/javase/9/docs/">Java SE 9 Documentation</a></p>
<table>
<tr><th>Legend</th></tr>
<tr class="se-base"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- in java.base</a></td></tr>
<tr class="se-misc"><td><a href="https://jcp.org/en/jsr/platform?listBy=2&listByType=platform">JCP technology in the Java SE Platform only -- not in java.base</a></td></tr>
<tr class="se-ee"><td><a href="https://jcp.org/en/jsr/platform?listBy=3&listByType=platform">JCP technology in the Java SE Platform derived from the Java EE Platform</a></a></td></tr>
<tr class="se-ext"><td><a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">JCP technology in the Java SE Platform derived from non-JCP standards</a></a></td></tr>
<tr class="non-se"><td>JCP technology in neither the Java SE or EE Platforms</td></tr>
<tr class="non-se"><td>JCP technology not included in the Java SE Platform</td></tr>
</table>
<br/>
@ -50,7 +48,7 @@ td.agg { background-color: lightgray; }
<td>boot</td>
<td>No</td>
<td></td>
<td class="agg" rowspan=37><a href="module-summary.html#java.se"/>java.se</a></td>
<td class="agg" rowspan=38><a href="module-summary.html#java.se"/>java.se</a></td>
</tr>
<tr class="se-misc">
@ -403,6 +401,15 @@ td.agg { background-color: lightgray; }
<td>No</td>
<td></td>
</tr>
<tr class="se-misc">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.sql">java.sql</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<tr class="se-ext">
<td>(W3C)</td>
@ -414,102 +421,6 @@ td.agg { background-color: lightgray; }
<td>Formerly an <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">Endorsed Standard</a></td>
</tr>
<tr class="se-ext">
<td>(OMG)</td>
<td>RMI-IIOP, IDL</td>
<td>UJSR for Java SE</td>
<td><a href="module-summary.html#java.corba"/>java.corba</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly an <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#endorsed-standards-apis">Endorsed Standard</a></td>
<td class="agg" rowspan=7><a href="module-summary.html#java.se.ee"/>java.se.ee</a></td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=67">67</a></td>
<td>SAAJ</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (f.k.a. JAXM)</td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=181">181</a></td>
<td>Web Services Metadata</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=222">222</a></td>
<td>JAXB</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.bind">java.xml.bind</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a></td>
</tr>
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=224">224</a></td>
<td>JAXWS</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws">java.xml.ws</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a></td>
</tr>
<!-- The Java SE Platform incorporates a smaller version of the javax.annotation package than the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=250">250</a></td>
<td>Common Annotations</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.xml.ws.annotation">java.xml.ws.annotation</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<!-- The Java SE Platform incorporates a smaller version of the javax.transaction package than the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (non-XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.transaction">java.transaction</a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
</tr>
<!-- The Java SE Platform incorporates the same version of the javax.transaction.xa package as the Java EE Platform. -->
<tr class="se-ee">
<td><a href="https://jcp.org/en/jsr/detail?id=907">907</a></td>
<td>JTA (XA)</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.sql"/>java.sql</a></td>
<td>plat</td>
<td>No</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
<td class="agg"><a href="module-summary.html#java.se"/>java.se</a></td>
</tr>
<tr class="se-misc">
<td><a href="https://jcp.org/en/jsr/detail?id=925">925</a></td>
<td>JAF</td>
<td>Original JSR</td>
<td><a href="module-summary.html#java.activation">java.activation</a></a></td>
<td>plat</td>
<td>Yes</td>
<td>Formerly a <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/standards/#standalone-technologies">Standalone Technology</a> (unlisted)</td>
<td class="agg"><a href="module-summary.html#java.se.ee"/>java.se.ee</a></td>
</tr>
<tr class="non-se">
<td><a href="https://jcp.org/en/jsr/detail?id=56">56</a></td>
<td>JNLP</td>

View File

@ -1,50 +0,0 @@
#
# 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
# 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 LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, idlj, \
MAIN_CLASS := com.sun.tools.corba.se.idl.toJavaPortable.Compile, \
))
$(eval $(call SetupBuildLauncher, orbd, \
MAIN_CLASS := com.sun.corba.se.impl.activation.ORBD, \
JAVA_ARGS := \
-Dcom.sun.CORBA.activation.DbDir=./orb.db \
-Dcom.sun.CORBA.activation.Port=1049 \
-Dcom.sun.CORBA.POA.ORBServerId=1, \
))
$(eval $(call SetupBuildLauncher, servertool, \
MAIN_CLASS := com.sun.corba.se.impl.activation.ServerTool, \
))
$(eval $(call SetupBuildLauncher, tnameserv, \
MAIN_CLASS := com.sun.corba.se.impl.naming.cosnaming.TransientNameServer, \
JAVA_ARGS := \
-Dcom.sun.CORBA.activation.DbDir=./orb.db \
-Djava.util.logging.LoggingPermission=contol \
-Dcom.sun.CORBA.POA.ORBServerId=1, \
))

View File

@ -1,34 +0,0 @@
#
# 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
# 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 LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, schemagen, \
MAIN_CLASS := com.sun.tools.internal.jxc.SchemaGenerator, \
))
$(eval $(call SetupBuildLauncher, xjc, \
MAIN_CLASS := com.sun.tools.internal.xjc.Driver, \
))

View File

@ -1,34 +0,0 @@
#
# 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
# 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 LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, wsgen, \
MAIN_CLASS := com.sun.tools.internal.ws.WsGen, \
))
$(eval $(call SetupBuildLauncher, wsimport, \
MAIN_CLASS := com.sun.tools.internal.ws.WsImport, \
))

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2015, 2018, 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
@ -68,6 +68,7 @@ BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorStackDepthInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetNamedModule \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/IsModifiableModule \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/AddModuleReads \
@ -101,6 +102,7 @@ ifeq ($(TOOLCHAIN_TYPE), solstudio)
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_liboverflow := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libSimpleClassFileLoadHook := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorInfoTest := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetOwnedMonitorStackDepthInfoTest := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libGetNamedModuleTest := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libIsModifiableModuleTest := -lc
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libAddModuleReadsTest := -lc

View File

@ -1,567 +0,0 @@
'\" t
.\" Copyright (c) 2001, 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java IDL and RMI-IIOP Tools
.\" Title: idlj.1
.\"
.if n .pl 99999
.TH idlj 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
idlj \- Generates Java bindings for a specified Interface Definition Language (IDL) file\&.
.SH SYNOPSIS
.sp
.nf
\fBidlj\fR [ \fIoptions\fR ] \fIidlfile\fR
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&. Options can appear in any order, but must precede the \f3idlfile\fR\&.
.TP
\fIidlfile\fR
The name of a file that contains Interface Definition Language (IDL) definitions\&.
.SH DESCRIPTION
The IDL-to-Java Compiler generates the Java bindings for a specified IDL file\&. For binding details, see Java IDL: IDL to Java Language Mapping at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/mapping/jidlMapping\&.html
.PP
Some earlier releases of the IDL-to-Java compiler were named \f3idltojava\fR\&.
.SS EMIT\ CLIENT\ AND\ SERVER\ BINDINGS
The following \f3idlj\fR command generates an IDL file named \f3My\&.idl\fR with client-side bindings\&.
.sp
.nf
\f3idlj My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
The previous syntax is equivalent to the following:
.sp
.nf
\f3idlj \-fclient My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
The next example generates the server-side bindings, and includes the client-side bindings plus the skeleton, all of which are POA (Inheritance Model)\&.
.sp
.nf
\f3idlg \-fserver My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
If you want to generate both client and server-side bindings, then use one of the following (equivalent) commands:
.sp
.nf
\f3idlj \-fclient \-fserver My\&.idl\fP
.fi
.nf
\f3idlj \-fall My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
There are two possible server-side models: the Portal Servant Inheritance Model and the Tie Model\&. See Tie Delegation Model\&.
.PP
\f3Portable Servant Inheritance Model\fR\&. The default server-side model is the Portable Servant Inheritance Model\&. Given an interface \f3My\fR defined in \f3My\&.idl\fR, the file \f3MyPOA\&.java\fR is generated\&. You must provide the implementation for the \f3My\fR interface, and the \f3My\fR interface must inherit from the \f3MyPOA\fR class\&. \f3MyPOA\&.java\fR is a stream-based skeleton that extends the \f3org\&.omg\&.PortableServer\&.Servant\fR class at http://docs\&.oracle\&.com/javase/8/docs/api/org/omg/PortableServer/Servant\&.html The \f3My\fR interface implements the \f3callHandler\fR interface and the operations interface associated with the IDL interface the skeleton implements\&.The \f3PortableServer\fR module for the Portable Object Adapter (POA) defines the native \f3Servant\fR type\&. See Portable Object Adapter (POA) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/POA\&.html In the Java programming language, the \f3Servant\fR type is mapped to the Java \f3org\&.omg\&.PortableServer\&.Servant\fR class\&. It serves as the base class for all POA servant implementations and provides a number of methods that can be called by the application programmer, and methods that are called by the POA and that can be overridden by the user to control aspects of servant behavior\&.Another option for the Inheritance Model is to use the \f3-oldImplBase\fR flag to generate server-side bindings that are compatible with releases of the Java programming language before Java SE 1\&.4\&. The -\f3oldImplBase\fR flag is nonstandard, and these APIs are deprecated\&. You would use this flag only for compatibility with existing servers written in Java SE 1\&.3\&. In that case, you would need to modify an existing make file to add the \f3-oldImplBase\fR flag to the \f3idlj\fR compiler\&. Otherwise POA-based server-side mappings are generated\&. To generate server-side bindings that are backward compatible, do the following:
.sp
.nf
\f3idlj \-fclient \-fserver \-oldImplBase My\&.idl\fP
.fi
.nf
\f3idlj \-fall \-oldImplBase My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
Given an interface \f3My\fR defined in \f3My\&.idl\fR, the file \f3_MyImplBase\&.java\fR is generated\&. You must provide the implementation for the \f3My\fR interface, and the \f3My\fR interface must inherit from the \f3_MyImplBase\fR class\&.
.PP
\f3Tie Delegation Model\fR\&. The other server-side model is called the Tie Model\&. This is a delegation model\&. Because it is not possible to generate ties and skeletons at the same time, they must be generated separately\&. The following commands generate the bindings for the Tie Model:
.sp
.nf
\f3idlj \-fall My\&.idl\fP
.fi
.nf
\f3idlj \-fallTIE My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
For the \f3My\fR interface, the second command generates \f3MyPOATie\&.java\fR\&. The constructor to the \f3MyPOATie\fR class takes a delegate\&. In this example, using the default POA model, the constructor also needs a POA\&. You must provide the implementation for the delegate, but it does not have to inherit from any other class, only the interface \f3MyOperations\fR\&. To use it with the ORB, you must wrap your implementation within the \f3MyPOATie\fR class, for example:
.sp
.nf
\f3ORB orb = ORB\&.init(args, System\&.getProperties());\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// Get reference to rootpoa & activate the POAManager\fP
.fi
.nf
\f3POA rootpoa = (POA)orb\&.resolve_initial_references("RootPOA");\fP
.fi
.nf
\f3rootpoa\&.the_POAManager()\&.activate();\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// create servant and register it with the ORB\fP
.fi
.nf
\f3MyServant myDelegate = new MyServant();\fP
.fi
.nf
\f3myDelegate\&.setORB(orb); \fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// create a tie, with servant being the delegate\&.\fP
.fi
.nf
\f3MyPOATie tie = new MyPOATie(myDelegate, rootpoa);\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// obtain the objectRef for the tie\fP
.fi
.nf
\f3My ref = tie\&._this(orb);\fP
.fi
.nf
\f3\fR
.fi
.sp
You might want to use the Tie model instead of the typical Inheritance model when your implementation must inherit from some other implementation\&. Java allows any number of interface inheritance, but there is only one slot for class inheritance\&. If you use the inheritance model, then that slot is used up\&. With the Tie Model, that slot is freed up for your own use\&. The drawback is that it introduces a level of indirection: one extra method call occurs when a method is called\&.
.PP
For server-side generation, Tie model bindings that are compatible with versions of the IDL to Java language mapping in versions earlier than Java SE 1\&.4\&.
.sp
.nf
\f3idlj \-oldImplBase \-fall My\&.idl\fP
.fi
.nf
\f3idlj \-oldImplBase \-fallTIE My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
For the \f3My\fR interface, the this generates \f3My_Tie\&.java\fR\&. The constructor to the \f3My_Tie\fR class takes an \f3impl\fR object\&. You must provide the implementation for \f3impl\fR, but it does not have to inherit from any other class, only the interface \f3HelloOperations\fR\&. But to use it with the ORB, you must wrap your implementation within \f3My_Tie\fR, for example:
.sp
.nf
\f3ORB orb = ORB\&.init(args, System\&.getProperties());\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// create servant and register it with the ORB\fP
.fi
.nf
\f3MyServant myDelegate = new MyServant();\fP
.fi
.nf
\f3myDelegate\&.setORB(orb); \fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// create a tie, with servant being the delegate\&.\fP
.fi
.nf
\f3MyPOATie tie = new MyPOATie(myDelegate);\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3// obtain the objectRef for the tie\fP
.fi
.nf
\f3My ref = tie\&._this(orb);\fP
.fi
.nf
\f3\fR
.fi
.sp
.SS SPECIFY\ ALTERNATE\ LOCATIONS\ FOR\ EMITTED\ FILES
If you want to direct the emitted files to a directory other than the current directory, then call the compiler this way: \f3i\fR\f3dlj -td /altdir My\&.idl\fR\&.
.PP
For the \f3My\fR interface, the bindings are emitted to \f3/altdir/My\&.java\fR, etc\&., instead of \f3\&./My\&.java\fR\&.
.SS SPECIFY\ ALTERNATE\ LOCATIONS\ FOR\ INCLUDE\ FILES
If the \f3My\&.idl\fR file includes another \f3idl\fR file, \f3MyOther\&.idl\fR, then the compiler assumes that the \f3MyOther\&.idl\fR file resides in the local directory\&. If it resides in \f3/includes\fR, for example, then you call the compiler with the following command:
.sp
.nf
\f3idlj \-i /includes My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
If \f3My\&.idl\fR also included \f3Another\&.idl\fR that resided in \f3/moreIncludes\fR, for example, then you call the compiler with the following command:
.sp
.nf
\f3idlj \-i /includes \-i /moreIncludes My\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
Because this form of \f3include\fR can become long, another way to indicate to the compiler where to search for included files is provided\&. This technique is similar to the idea of an environment variable\&. Create a file named idl\&.config in a directory that is listed in your \f3CLASSPATH\fR variable\&. Inside of \f3idl\&.config\fR, provide a line with the following form:
.sp
.nf
\f3includes=/includes;/moreIncludes\fP
.fi
.nf
\f3\fR
.fi
.sp
The compiler will find this file and read in the includes list\&. Note that in this example the separator character between the two directories is a semicolon (;)\&. This separator character is platform dependent\&. On the Windows platform, use a semicolon, on the Unix platform, use a colon, and so on\&.
.SS EMIT\ BINDINGS\ FOR\ INCLUDE\ FILES
By default, only those interfaces, structures, and so on, that are defined in the \f3idl\fR file on the command line have Java bindings generated for them\&. The types defined in included files are not generated\&. For example, assume the following two \f3idl\fR files:
.sp
.nf
\f3My\&.idl file:\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3#include <MyOther\&.idl>\fP
.fi
.nf
\f3interface My\fP
.fi
.nf
\f3{\fP
.fi
.nf
\f3};\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3MyOther\&.idl file:\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3interface MyOther\fP
.fi
.nf
\f3{\fP
.fi
.nf
\f3};\fP
.fi
.nf
\f3\fR
.fi
.sp
There is a caveat to the default rule\&. Any \f3#include\fR statements that appear at the global scope are treated as described\&. These \f3#include\fR statements can be thought of as import statements\&. The \f3#include\fR statements that appear within an enclosed scope are treated as true \f3#include\fR statements, which means that the code within the included file is treated as though it appeared in the original file and, therefore, Java bindings are emitted for it\&. Here is an example:
.sp
.nf
\f3My\&.idl file:\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3#include <MyOther\&.idl>\fP
.fi
.nf
\f3interface My\fP
.fi
.nf
\f3{\fP
.fi
.nf
\f3 #include <Embedded\&.idl>\fP
.fi
.nf
\f3};\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3MyOther\&.idl file:\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3interface MyOther\fP
.fi
.nf
\f3{\fP
.fi
.nf
\f3};\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3Embedded\&.idl\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3enum E {one, two, three};\fP
.fi
.nf
\f3\fR
.fi
.sp
Run\f3idlj My\&.idl\fRto generate the following list of Java files\&. Notice that \f3MyOther\&.java\fR is not generated because it is defined in an import-like \f3#include\fR\&. But \f3E\&.java\fR was generated because it was defined in a true \f3#include\fR\&. Notice that because the \f3Embedded\&.idl\fR file is included within the scope of the interface \f3My\fR, it appears within the scope of \f3My\fR (in \f3MyPackage\fR)\&. If the \f3-emitAll\fR flag had been used, then all types in all included files would have been emitted\&.
.sp
.nf
\f3\&./MyHolder\&.java\fP
.fi
.nf
\f3\&./MyHelper\&.java\fP
.fi
.nf
\f3\&./_MyStub\&.java\fP
.fi
.nf
\f3\&./MyPackage\fP
.fi
.nf
\f3\&./MyPackage/EHolder\&.java\fP
.fi
.nf
\f3\&./MyPackage/EHelper\&.java\fP
.fi
.nf
\f3\&./MyPackage/E\&.java\fP
.fi
.nf
\f3\&./My\&.java\fP
.fi
.nf
\f3\fR
.fi
.sp
.SS INSERT\ PACKAGE\ PREFIXES
Suppose that you work for a company named ABC that has constructed the following IDL file:
.sp
.nf
\f3Widgets\&.idl file:\fP
.fi
.nf
\f3\fR
.fi
.nf
\f3module Widgets\fP
.fi
.nf
\f3{\fP
.fi
.nf
\f3 interface W1 {\&.\&.\&.};\fP
.fi
.nf
\f3 interface W2 {\&.\&.\&.};\fP
.fi
.nf
\f3};\fP
.fi
.nf
\f3\fR
.fi
.sp
If you run this file through the IDL-to-Java compiler, then the Java bindings for W1 and W2 are placed within the \f3Widgets\fR package\&. There is an industry convention that states that a company\&'s packages should reside within a package named \f3com\&.<company name>\fR\&. To follow this convention, the package name should be \f3com\&.abc\&.Widgets\fR\&. To place this package prefix onto the Widgets module, execute the following:
.sp
.nf
\f3idlj \-pkgPrefix Widgets com\&.abc Widgets\&.idl\fP
.fi
.nf
\f3\fR
.fi
.sp
If you have an IDL file that includes Widgets\&.idl, then the \f3-pkgPrefix\fR flag must appear in that command also\&. If it does not, then your IDL file will be looking for a \f3Widgets\fR package rather than a \f3com\&.abc\&.Widgets\fR package\&.
.PP
If you have a number of these packages that require prefixes, then it might be easier to place them into the idl\&.config file described previously\&. Each package prefix line should be of the form: \f3PkgPrefix\&.<type>=<prefix>\fR\&. The line for the previous example would be \f3PkgPrefix\&.Widgets=com\&.abc\fR\&. This option does not affect the Repository ID\&.
.SS DEFINE\ SYMBOLS\ BEFORE\ COMPILATION
You might need to define a symbol for compilation that is not defined within the IDL file, perhaps to include debugging code in the bindings\&. The command \f3idlj -d MYDEF My\&.idl\fRis equivalent to putting the line \f3#define MYDEF\fR inside My\&.idl\&.
.SS PRESERVE\ PREEXISTING\ BINDINGS
If the Java binding files already exist, then the \f3-keep\fR flag keeps the compiler from overwriting them\&. The default is to generate all files without considering that they already exist\&. If you have customized those files (which you should not do unless you are very comfortable with their contents), then the \f3-keep\fR option is very useful\&. The command \f3idlj -keep My\&.idl\fR emits all client-side bindings that do not already exist\&.
.SS VIEW\ COMPILATION\ PROGRESS
The IDL-to-Java compiler generates status messages as it progresses through its phases of execution\&. Use the \f3-v\fR option to activate the verbose mode: \f3idlj -v My\&.idl\fR\&.
.PP
By default the compiler does not operate in verbose mode
.SS DISPLAY\ VERSION\ INFORMATION
To display the build version of the IDL-to-Java compiler, specify the \f3-version\fR option on the command-line: \f3idlj -version\fR\&.
.PP
Version information also appears within the bindings generated by the compiler\&. Any additional options appearing on the command-line are ignored\&.
.SH OPTIONS
.TP
-d \fIsymbol\fR
.br
This is equivalent to the following line in an IDL file:
.sp
.nf
\f3#define \fIsymbol\fR\fP
.fi
.nf
\f3\fR
.fi
.sp
.TP
-demitAll
.br
Emit all types, including those found in \f3#include\fR files\&.
.TP
-fside
.br
Defines what bindings to emit\&. The \f3side\fR parameter can be \f3client\fR, \f3server\fR, \f3serverTIE\fR, \f3all\fR, or \f3allTIE\fR\&. The \f3-fserverTIE\fR and \f3-fallTIE\fR options cause delegate model skeletons to be emitted\&. Defaults to \f3-fclient\fR when the flag is not specified\&.
.TP
-i \fIinclude-path\fR
.br
By default, the current directory is scanned for included files\&. This option adds another directory\&.
.TP
-i \fIkeep\fR
.br
If a file to be generated already exists, then do not overwrite it\&. By default it is overwritten\&.
.TP
-noWarn
.br
Suppress warning messages\&.
.TP
-oldImplBase
.br
Generates skeletons compatible with pre-1\&.4 JDK ORBs\&. By default, the POA Inheritance Model server-side bindings are generated\&. This option provides backward-compatibility with earlier releases of the Java programming language by generating server-side bindings that are \f3ImplBase\fR Inheritance Model classes\&.
.TP
-pkgPrefix \fItype\fR\fIprefix\fR
.br
Wherever \f3type\fR is encountered at file scope, prefix the generated Java package name with \f3prefix\fR for all files generated for that type\&. The type is the simple name of either a top-level module, or an IDL type defined outside of any module\&.
.TP
-pkgTranslate \fItype\fR\fIpackage\fR
.br
Whenever the module name type is encountered in an identifier, replace it in the identifier with package for all files in the generated Java package\&. Note that \f3pkgPrefix\fR changes are made first\&. The type value is the simple name of either a top-level module, or an IDL type defined outside of any module and must match the full package name exactly\&.
If more than one translation matches an identifier, then the longest match is chosen as shown in the following example:
\fICommand\fR:
.sp
.nf
\f3pkgTranslate type pkg \-pkgTranslate type2\&.baz pkg2\&.fizz\fP
.fi
.nf
\f3\fR
.fi
.sp
\fIResulting Translation\fR:
.sp
.nf
\f3type => pkg\fP
.fi
.nf
\f3type\&.ext => pkg\&.ext\fP
.fi
.nf
\f3type\&.baz => pkg2\&.fizz\fP
.fi
.nf
\f3type2\&.baz\&.pkg => pkg2\&.fizz\&.pkg\fP
.fi
.nf
\f3\fR
.fi
.sp
The following package names \f3org\fR, \f3org\fR\&.o\f3mg\fR, or any subpackages of \f3org\&.omg\fR cannot be translated\&. Any attempt to translate these packages results in uncompilable code, and the use of these packages as the first argument after \f3-pkgTranslate\fR is treated as an error\&.
.TP
-skeletonName \fIxxx%yyy\fR
.br
Use \f3xxx%yyy\fR as the pattern for naming the skeleton\&. The defaults are: \f3%POA\fR for the \f3POA\fR base class (\f3-fserver\fR or \f3-fall\fR), and \f3_%ImplBase\fR for the \f3oldImplBase\fR class (-\f3oldImplBase\fR) and (\f3-fserver\fR or \f3-fall\fR))\&.
.TP
-td \fIdir\fR
.br
Use \fIdir\fR for the output directory instead of the current directory\&.
.TP
-tieName \fIxxx%yyy\fR
.br
Use \f3xxx%yyy\fR according to the pattern\&. The defaults are: \f3%POA\fR for the \f3POA\fR base class (\f3-fserverTie or -fallTie\fR), and \f3_%Tie\fR for the \f3oldImplBase\fR tie class (-\f3oldImplBase\fR) and (\f3-fserverTie\fR or \f3-fallTie\fR))
.TP
-nowarn, -verbose
.br
Displays release information and terminates\&.
.TP
-version
.br
Displays release information and terminates\&.
.SH RESTRICTIONS
Escaped identifiers in the global scope cannot have the same spelling as IDL primitive types, \f3Object\fR, or \f3ValueBase\fR\&. This is because the symbol table is preloaded with these identifiers\&. Allowing them to be redefined would overwrite their original definitions\&. Possible permanent restriction\&.
.PP
The \f3fixed\fR IDL type is not supported\&.
.SH KNOWN\ PROBLEMS
No import is generated for global identifiers\&. If you call an unexported local \f3impl\fR object, then you do get an exception, but it seems to be due to a \f3NullPointerException\fR in the \f3ServerDelegate\fR DSI code\&.
.RE
.br
'pl 8.5i
'bp

View File

@ -1,24 +0,0 @@
." Copyright (c) 2001, 2012, 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.
."
.TH idlj 1 "07 May 2011"
.LP

View File

@ -1,24 +0,0 @@
." Copyright (c) 2001, 2012, 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.
."
.TH orbd 1 "07 May 2011"
.LP

View File

@ -1,24 +0,0 @@
." Copyright (c) 2005, 2012, 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.
."
.TH schemagen 1 "07 May 2011"
.LP

View File

@ -1,24 +0,0 @@
." Copyright (c) 2001, 2012, 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.
."
.TH servertool 1 "07 May 2011"
.LP

View File

@ -1,24 +0,0 @@
." Copyright (c) 1999, 2012, 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.
."
.TH tnameserv 1 "07 May 2011"
.LP

View File

@ -1,22 +0,0 @@
." Copyright (c) 2005, 2012, 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.
."
.TH wsgen 1 "07 May 2011"

View File

@ -1,22 +0,0 @@
." Copyright (c) 2005, 2012, 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.
."
.TH wsimport 1 "07 May 2011"

View File

@ -1,25 +0,0 @@
." Copyright (c) 2005, 2012, 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.
."
.TH xjc 1 "07 May 2011"
.LP
.ad c

View File

@ -1,213 +0,0 @@
'\" t
.\" Copyright (c) 2001, 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java IDL and RMI-IIOP Tools
.\" Title: orbd.1
.\"
.if n .pl 99999
.TH orbd 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
orbd \- Enables clients to locate and call persistent objects on servers in the CORBA environment\&.
.SH SYNOPSIS
.sp
.nf
\fBorbd\fR [ \fIoptions\fR ]
.fi
.sp
.TP
\fIoptions\fR
Command-line options\&. See Options\&.
.SH DESCRIPTION
The \f3orbd\fR command enables clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The Server Manager included with the orbd tool is used to enable clients to transparently locate and call persistent objects on servers in the CORBA environment\&. The persistent servers, while publishing the persistent object references in the naming service, include the port number of the ORBD in the object reference instead of the port number of the server\&. The inclusion of an ORBD port number in the object reference for persistent object references has the following advantages:
.TP 0.2i
\(bu
The object reference in the naming service remains independent of the server life cycle\&. For example, the object reference could be published by the server in the Naming Service when it is first installed, and then, independent of how many times the server is started or shut down, the ORBD returns the correct object reference to the calling client\&.
.TP 0.2i
\(bu
The client needs to look up the object reference in the naming service only once, and can keep reusing this reference independent of the changes introduced due to server life cycle\&.
.PP
To access the ORBD Server Manager, the server must be started using \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. For more information on the Server Manager, see Server Manager\&.
.PP
When \f3orbd\fR starts, it also starts a naming service\&. For more information about the naming service\&. See Start and Stop the Naming Service\&.
.SH OPTIONS
.TP
-ORBInitialPort \fInameserverport\fR
.br
Required\&. Specifies the port on which the name server should be started\&. After it is started, \f3orbd\fR listens for incoming requests on this port\&. On Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, Oracle recommends that you use a port number above or equal to 1024\&.
.SS NONREQUIRED\ OPTIONS
.TP
-port \fIport\fR
.br
Specifies the activation port where ORBD should be started, and where ORBD will be accepting requests for persistent objects\&. The default value for this port is 1049\&. This port number is added to the port field of the persistent Interoperable Object References (IOR)\&.
.TP
-defaultdb \fIdirectory\fR
.br
Specifies the base where the ORBD persistent storage directory, \f3orb\&.db\fR, is created\&. If this option is not specified, then the default value is \f3\&./orb\&.db\fR\&.
.TP
-serverPollingTime \fImilliseconds\fR
.br
Specifies how often ORBD checks for the health of persistent servers registered through \f3servertool\fR\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
.TP
-serverStartupDelay milliseconds
.br
Specifies how long ORBD waits before sending a location forward exception after a persistent server that is registered through \f3servertool\fR is restarted\&. The default value is 1000 ms\&. The value specified for \f3milliseconds\fR must be a valid positive integer\&.
.TP
-J\fIoption\fR
.br
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
.SS START\ AND\ STOP\ THE\ NAMING\ SERVICE
A naming service is a CORBA service that allows CORBA objects to be named by means of binding a name to an object reference\&. The name binding can be stored in the naming service, and a client can supply the name to obtain the desired object reference\&.
.PP
Before running a client or a server, you will start ORBD\&. ORBD includes a persistent naming service and a transient naming service, both of which are an implementation of the COS Naming Service\&.
.PP
The Persistent Naming Service provides persistence for naming contexts\&. This means that this information is persistent across service shutdowns and startups, and is recoverable in the event of a service failure\&. If ORBD is restarted, then the Persistent Naming Service restores the naming context graph, so that the binding of all clients\&' and servers\&' names remains intact (persistent)\&.
.PP
For backward compatibility, \f3tnameserv\fR, a Transient Naming Service that shipped with earlier releases of the JDK, is also included in this release of Java SE\&. A transient naming service retains naming contexts as long as it is running\&. If there is a service interruption, then the naming context graph is lost\&.
.PP
The \f3-ORBInitialPort\fR argument is a required command-line argument for \f3orbd\fR, and is used to set the port number on which the naming service runs\&. The following instructions assume you can use port 1050 for the Java IDL Object Request Broker Daemon\&. When using Oracle Solaris software, you must become a root user to start a process on a port lower than 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&. You can substitute a different port when necessary\&.
.PP
To start \f3orbd\fR from a UNIX command shell, enter:
.sp
.nf
\f3orbd \-ORBInitialPort 1050&\fP
.fi
.nf
\f3\fP
.fi
.sp
From an MS-DOS system prompt (Windows), enter:
.sp
.nf
\f3start orbd \-ORBInitialPort 1050\fP
.fi
.nf
\f3\fP
.fi
.sp
Now that ORBD is running, you can run your server and client applications\&. When running the client and server applications, they must be made aware of the port number (and machine name, when applicable) where the Naming Service is running\&. One way to do this is to add the following code to your application:
.sp
.nf
\f3Properties props = new Properties();\fP
.fi
.nf
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
.fi
.nf
\f3props\&.put("org\&.omg\&.CORBA\&.ORBInitialHost", "MyHost");\fP
.fi
.nf
\f3ORB orb = ORB\&.init(args, props);\fP
.fi
.nf
\f3\fP
.fi
.sp
In this example, the naming service is running on port 1050 on host \f3MyHost\fR\&. Another way is to specify the port number and/or machine name when running the server or client application from the command line\&. For example, you would start your \f3HelloApplication\fR with the following command line:
.sp
.nf
\f3java HelloApplication \-ORBInitialPort 1050 \-ORBInitialHost MyHost\fP
.fi
.nf
\f3\fP
.fi
.sp
To stop the naming service, use the relevant operating system command, such as \f3pkill\fR\f3orbd\fR on Oracle Solaris, or \fICtrl+C\fR in the DOS window in which \f3orbd\fR is running\&. Note that names registered with the naming service can disappear when the service is terminated because of a transient naming service\&. The Java IDL naming service will run until it is explicitly stopped\&.
.PP
For more information about the naming service included with ORBD, see Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
.SH SERVER\ MANAGER
To access the ORBD Server Manager and run a persistent server, the server must be started with \f3servertool\fR, which is a command-line interface for application programmers to register, unregister, start up, and shut down a persistent server\&. When a server is started using \f3servertool\fR, it must be started on the same host and port on which \f3orbd\fR is executing\&. If the server is run on a different port, then the information stored in the database for local contexts will be invalid and the service will not work properly\&.
.PP
See Java IDL: The "Hello World" Example at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlExample\&.html
.PP
In this example, you run the \f3idlj\fR compiler and \f3javac\fR compiler as shown in the tutorial\&. To run the ORBD Server Manager, follow these steps for running the application:
.PP
Start \f3orbd\fR\&.
.PP
UNIX command shell, enter: \f3orbd -ORBInitialPort 1050\fR\&.
.PP
MS-DOS system prompt (Windows), enter: \f3s\fR\f3tart orbd -ORBInitialPort 105\fR\f30\fR\&.
.PP
Port 1050 is the port on which you want the name server to run\&. The \f3-ORBInitialPort\fR option is a required command-line argument\&. When using Oracle Solaris software, you must become a root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number above or equal to 1024\&.
.PP
Start the \f3servertool\fR: \f3servertool -ORBInitialPort 1050\fR\&.
.PP
Make sure the name server (\f3orbd\fR) port is the same as in the previous step, for example, \f3-ORBInitialPort 1050\&.\fR The \f3servertool\fR must be started on the same port as the name server\&.
.PP
In the \f3servertool\fR command line interface, start the \f3Hello\fR server from the \f3servertool\fR prompt:
.sp
.nf
\f3servertool > register \-server HelloServer \-classpath \&. \-applicationName\fP
.fi
.nf
\f3 HelloServerApName\fP
.fi
.nf
\f3\fP
.fi
.sp
The \f3servertool\fR registers the server, assigns it the name \f3HelloServerApName\fR, and displays its server ID with a listing of all registered servers\&.Run the client application from another terminal window or prompt:
.sp
.nf
\f3java HelloClient \-ORBInitialPort 1050 \-ORBInitialHost localhost\fP
.fi
.nf
\f3\fP
.fi
.sp
For this example, you can omit \f3-ORBInitialHost localhost\fR because the name server is running on the same host as the \f3Hello\fR client\&. If the name server is running on a different host, then use the -\f3ORBInitialHost nameserverhost\fR option to specify the host on which the IDL name server is running\&.Specify the name server (\f3orbd\fR) port as done in the previous step, for example, \f3-ORBInitialPort 1050\fR\&. When you finish experimenting with the ORBD Server Manager, be sure to shut down or terminate the name server (\f3orbd\fR) and \f3servertool\fR\&. To shut down \f3orbd\fR from am MS-DOS prompt, select the window that is running the server and enter \fICtrl+C\fR to shut it down\&.
.PP
To shut down \f3orbd\fR from an Oracle Solaris shell, find the process, and terminate with the \f3kill\fR command\&. The server continues to wait for invocations until it is explicitly stopped\&. To shut down the \f3servertool\fR, type \fIquit\fR and press the \fIEnter\fR key\&.
.SH SEE\ ALSO
.TP 0.2i
\(bu
servertool(1)
.TP 0.2i
\(bu
Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
.RE
.br
'pl 8.5i
'bp

View File

@ -1,121 +0,0 @@
'\" t
.\" 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java Web Services Tools
.\" Title: schemagen.1
.\"
.if n .pl 99999
.TH schemagen 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
schemagen \- Generates a schema for every name space that is referenced in your Java classes\&.
.SH SYNOPSIS
.sp
.nf
\fBschemagen\fR [ \fIoptions\fR ] \fIjava\-files\fR
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
\fIjava-files\fR
The Java class files to be processed\&.
.SH DESCRIPTION
The schema generator creates a schema file for each name space referenced in your Java classes\&. Currently, you cannot control the name of the generated schema files\&. To control the schema file names, see Using SchemaGen with Ant at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/schemagenTask\&.html
.PP
Start the schema generator with the appropriate \f3schemagen\fR shell script in the bin directory for your platform\&. The current schema generator can process either Java source files or class files\&.
.sp
.nf
\f3schemagen\&.sh Foo\&.java Bar\&.java \&.\&.\&.\fP
.fi
.nf
\f3Note: Writing schema1\&.xsd\fP
.fi
.nf
\f3\fP
.fi
.sp
If your java files reference other classes, then those classes must be accessible on your system \f3CLASSPATH\fR environment variable, or they need to be specified in the \f3schemagen\fR command line with the class path options\&. See Options\&. If the referenced files are not accessible or specified, then you get errors when you generate the schema\&.
.SH OPTIONS
.TP
-d \fIpath\fR
.br
The location where the \f3schemagen\fR command places processor-generated and \f3javac\fR-generated class files\&.
.TP
-cp \fIpath\fR
.br
The location where the \f3schemagen\fR command places user-specified files\&.
.TP
-classpath \fIpath\fR
.br
The location where the \f3schemagen\fR command places user-specified files\&.
.TP
-encoding \fIencoding\fR
.br
Specifies the encoding to use for \f3apt\fR or \f3javac\fR command invocations\&.
.TP
-episode \fIfile\fR
.br
Generates an episode file for separate compilation\&.
.TP
-version
.br
Displays release information\&.
.TP
-help
.br
Displays a help message\&.
.SH SEE\ ALSO
.TP 0.2i
\(bu
Using SchemaGen with Ant at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/schemagenTask\&.html
.TP 0.2i
\(bu
Java Architecture for XML Binding (JAXB) at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/xml/jaxb/index\&.html
.RE
.br
'pl 8.5i
'bp

View File

@ -1,137 +0,0 @@
'\" t
.\" Copyright (c) 2001, 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java IDL and RMI-IIOP Tools
.\" Title: servertool.1
.\"
.if n .pl 99999
.TH servertool 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
servertool \- Provides an easy-to-use interface for developers to register, unregister, start up, and shut down a persistent server\&.
.SH SYNOPSIS
.sp
.nf
\fBservertool\fR \-ORBInitialPort \fInameserverport\fR [ \fIoptions\fR ] [ \fIcommands \fR]
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
commands
The command-line commands\&. See Commands\&.
.SH DESCRIPTION
The \f3servertool\fR command provides the command-line interface for developers to register, unregister, start up, and shut down a persistent server\&. Command-line commands let you obtain various statistical information about the server\&. See Commands\&.
.SH OPTIONS
.TP
-ORBInitialHost \fInameserverhost\fR
.br
This options is required\&. It specifies the host machine on which the name server runs and listens for incoming requests\&. The \f3nameserverhost\fR value must specify the port on which the \f3orb\fR is running and listening for requests\&. The value defaults to \f3localhost\fR when this option is not specified\&. If \f3orbd\fR and \f3servertool\fR are running on different machines, then you must specify the name or IP address of the host on which \f3orbd\fR is running\&.
\fINote:\fR On Oracle Solaris, you must become a root user to start a process on a port below 1024\&. Oracle recommends that you use a port number above or equal to 1024 for the \f3nameserverport\fR value\&.
.TP
-J\fIoption\fR
.br
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
.SH COMMANDS
You can start the \f3servertool\fR command with or without a command-line command\&.
.TP 0.2i
\(bu
If you did not specify a command when you started \f3servertool\fR, then the command-line tool displays the \f3servertool\fR prompt where you can enter commands: \f3servertool >\fR\&.
.TP 0.2i
\(bu
If you specify a command when you start \f3servertool\fR, then the Java IDL Server Tool starts, executes the command, and exits\&.
.TP
.ll 180
register -server \fIserver-class-name\fR -classpath \fIclasspath-to-server\fR [ -applicationName \fIapplication-name\fR -args \fIargs-to-server\fR -vmargs \fIflags-for-JVM\fR ]
Registers a new persistent server with the Object Request Broker Daemon (ORBD)\&. If the server is not already registered, then it is registered and activated\&. This command causes an installation method to be called in the \f3main\fR class of the server identified by the \f3-server\fR option\&. The installation method must be \f3public static void install(org\&.omg\&.CORBA\&.ORB)\fR\&. The install method is optional and lets developers provide their own server installation behavior, such as creating a database schema\&.
.TP
.ll 180
unregister -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR
Unregisters a server from the ORBD with either its server ID or its application name\&. This command causes an uninstallation method to be called in the \f3main\fR class of the server identified by the \f3-server\fR option\&. The \f3uninstall\fR method must be \f3public static void uninstall(org\&.omg\&.CORBA\&.ORB)\fR\&. The \f3uninstall\fR method is optional and lets developers provide their own server uninstallation behavior, such as undoing the behavior of the \f3install\fR method\&.
.TP
getserverid -applicationName \fIapplication-name\fR
Returns the server ID that corresponds to the \f3application-name\fR value\&.
.TP
list
Lists information about all persistent servers registered with the ORBD\&.
.TP
listappnames
Lists the application names for all servers currently registered with the ORBD\&.
.TP
listactive
Lists information about all persistent servers that were started by the ORBD and are currently running\&.
.TP
.ll 180
locate -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR [ -endpointType \fIendpointType\fR ]
Locates the endpoints (ports) of a specific type for all ORBs created by a registered server\&. If a server is not already running, then it is activated\&. If an \f3endpointType\fR value is not specified, then the plain/non-protected endpoint associated with each ORB in a server is returned\&.
.TP
.ll 180
locateperorb -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR [ -orbid \fIORB-name\fR ]
Locates all the endpoints (ports) registered by a specific Object Request Broker (ORB) of registered server\&. If a server is not already running, then it is activated\&. If an \f3orbid\fR is not specified, then the default value of \f3""\fR is assigned to the \f3orbid\fR\&. If any ORBs are created with an \f3orbid\fR of empty string, then all ports registered by it are returned\&.
.TP
orblist -serverid \fIserver-id\fR | -applicationName \fIapplication-name\fR
Lists the \f3ORBId\fR of the ORBs defined on a server\&. An \f3ORBId\fR is the string name for the ORB created by the server\&. If the server is not already running, then it is activated\&.
.TP
shutdown -serverid \fIserver-id\fR | -applicationName application-name
Shut down an active server that is registered with ORBD\&. During execution of this command, the \f3shutdown\fR method defined in the class specified by either the \f3-serverid\fR or \f3-applicationName\fR parameter is also called to shut down the server process\&.
.TP
startup -serverid \fIserver-id\fR | -applicationName application-name
Starts up or activate a server that is registered with ORBD\&. If the server is not running, then this command starts the server\&. If the server is already running, then an error message is displayed\&.
.TP
help
Lists all the commands available to the server through the \f3servertool\fR command\&.
.TP
quit
Exits the \f3servertool\fR command\&.
.SH SEE\ ALSO
.TP 0.2i
\(bu
orbd(1)
.RE
.br
'pl 8.5i
'bp

View File

@ -1,488 +0,0 @@
'\" t
.\" Copyright (c) 1999, 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java IDL and RMI-IIOP Tools
.\" Title: tnameserv.1
.\"
.if n .pl 99999
.TH tnameserv 1 "21 November 2013" "JDK 8" "Java IDL and RMI-IIOP Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
tnameserv \- Interface Definition Language (IDL)\&.
.SH SYNOPSIS
.sp
.nf
\fBtnameserve\fR \fB\-ORBInitialPort\fR [ \fInameserverport\fR ]
.fi
.sp
.TP
-ORBInitialPort \fInameserverport\fR
.br
The initial port where the naming service listens for the bootstrap protocol used to implement the ORB \f3resolve_initial_references\fR and \f3list_initial_references\fR methods\&.
.SH DESCRIPTION
Java IDL includes the Object Request Broker Daemon (ORBD)\&. ORBD is a daemon process that contains a Bootstrap Service, a Transient Naming Service, a Persistent Naming Service, and a Server Manager\&. The Java IDL tutorials all use ORBD, but you can substitute the \f3tnameserv\fR command for the \f3orbd\fR command in any of the examples that use a Transient Naming Service\&.
.PP
See orbd(1) or Naming Service at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/jidlNaming\&.html
.PP
The CORBA Common Object Services (COS) Naming Service provides a tree-structure directory for object references similar to a file system that provides a directory structure for files\&. The Transient Naming Service provided with Java IDL, \f3tnameserv\fR, is a simple implementation of the COS Naming Service specification\&.
.PP
Object references are stored in the name space by name and each object reference-name pair is called a name binding\&. Name bindings can be organized under naming contexts\&. Naming contexts are name bindings and serve the same organizational function as a file system subdirectory\&. All bindings are stored under the initial naming context\&. The initial naming context is the only persistent binding in the name space\&. The rest of the name space is lost when the Java IDL naming service process stops and restarts\&.
.PP
For an applet or application to use COS naming, its ORB must know the port of a host running a naming service or have access to an initial naming context string for that naming service\&. The naming service can either be the Java IDL naming service or another COS-compliant naming service\&.
.SS START\ THE\ NAMING\ SERVICE
You must start the Java IDL naming service before an application or applet that uses its naming service\&. Installation of the Java IDL product creates a script (Oracle Solaris: \f3tnameserv\fR) or executable file (Windows: \f3tnameserv\&.exe\fR) that starts the Java IDL naming service\&. Start the naming service so it runs in the background\&.
.PP
If you do not specify otherwise, then the Java IDL naming service listens on port 900 for the bootstrap protocol used to implement the ORB \f3resolve_initial_references\fR and \f3list_initial_references methods\fR, as follows:
.sp
.nf
\f3tnameserv \-ORBInitialPort nameserverport&\fP
.fi
.nf
\f3\fP
.fi
.sp
If you do not specify the name server port, then port 900 is used by default\&. When running Oracle Solaris software, you must become the root user to start a process on a port below 1024\&. For this reason, it is recommended that you use a port number greater than or equal to 1024\&. To specify a different port, for example, 1050, and to run the naming service in the background, from a UNIX command shell, enter:
.sp
.nf
\f3tnameserv \-ORBInitialPort 1050&\fP
.fi
.nf
\f3\fP
.fi
.sp
From an MS-DOS system prompt (Windows), enter:
.sp
.nf
\f3start tnameserv \-ORBInitialPort 1050\fP
.fi
.nf
\f3\fP
.fi
.sp
Clients of the name server must be made aware of the new port number\&. Do this by setting the \f3org\&.omg\&.CORBA\&.ORBInitialPort\fR property to the new port number when you create the ORB object\&.
.SS RUN\ THE\ SERVER\ AND\ CLIENT\ ON\ DIFFERENT\ HOSTS
In most of the Java IDL and RMI-IIOP tutorials, the naming service, server, and client are all running on the development machine\&. In real-world deployment, the client and server probably run on different host machines from the Naming Service\&.
.PP
For the client and server to find the Naming Service, they must be made aware of the port number and host on which the naming service is running\&. Do this by setting the \f3org\&.omg\&.CORBA\&.ORBInitialPort\fR and \f3org\&.omg\&.CORBA\&.ORBInitialHost\fR properties in the client and server files to the machine name and port number on which the Naming Service is running\&. An example of this is shown in Getting Started Using RMI-IIOP at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/rmi-iiop/rmiiiopexample\&.html
.PP
You could also use the command-line options \f3-ORBInitialPort nameserverport#\fR and \f3-ORBInitialHost nameserverhostname\fR to tell the client and server where to find the naming service\&. For one example of doing this using the command-line option, see Java IDL: The Hello World Example on Two Machines at http://docs\&.oracle\&.com/javase/8/docs/technotes/guides/idl/tutorial/jidl2machines\&.html
.PP
For example, suppose the Transient Naming Service, \f3tnameserv\fR is running on port 1050 on host \f3nameserverhost\fR\&. The client is running on host \f3clienthost,\fR and the server is running on host \f3serverhost\fR\&.
.PP
Start \f3tnameserv\fR on the host \f3nameserverhost\fR:
.sp
.nf
\f3tnameserv \-ORBInitialPort 1050\fP
.fi
.nf
\f3\fP
.fi
.sp
Start the server on the \f3serverhost\fR:
.sp
.nf
\f3java Server \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fP
.fi
.nf
\f3\fP
.fi
.sp
Start the client on the \f3clienthost\fR:
.sp
.nf
\f3java Client \-ORBInitialPort 1050 \-ORBInitialHost nameserverhost\fP
.fi
.nf
\f3\fP
.fi
.sp
.SS STOP\ THE\ NAMING\ SERVICE
To stop the Java IDL naming service, use the relevant operating system command, such as \f3kill\fR for a Unix process or \f3Ctrl+C\fR for a Windows process\&. The naming service continues to wait for invocations until it is explicitly shut down\&. Note that names registered with the Java IDL naming service disappear when the service is terminated\&.
.SH OPTIONS
.TP
-J\fIoption\fR
.br
Passes \f3option\fR to the Java Virtual Machine, where \f3option\fR is one of the options described on the reference page for the Java application launcher\&. For example, \f3-J-Xms48m\fR sets the startup memory to 48 MB\&. See java(1)\&.
.SH EXAMPLES
.SS ADD\ OBJECTS\ TO\ THE\ NAME\ SPACE
The following example shows how to add names to the name space\&. It is a self-contained Transient Naming Service client that creates the following simple tree\&.
.sp
.nf
\f3Initial Naming Context\fP
.fi
.nf
\f3 plans\fP
.fi
.nf
\f3 Personal\fP
.fi
.nf
\f3 calendar\fP
.fi
.nf
\f3 schedule\fP
.fi
.nf
\f3\fP
.fi
.sp
In this example, \f3plans\fR is an object reference and \f3Personal\fR is a naming context that contains two object references: \f3calendar\fR and \f3schedule\fR\&.
.sp
.nf
\f3import java\&.util\&.Properties;\fP
.fi
.nf
\f3import org\&.omg\&.CORBA\&.*;\fP
.fi
.nf
\f3import org\&.omg\&.CosNaming\&.*;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3public class NameClient {\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public static void main(String args[]) {\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 try {\fP
.fi
.nf
\f3\fP
.fi
.sp
In Start the Naming Service, the \f3nameserver\fR was started on port 1050\&. The following code ensures that the client program is aware of this port number\&.
.sp
.nf
\f3 Properties props = new Properties();\fP
.fi
.nf
\f3 props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
.fi
.nf
\f3 ORB orb = ORB\&.init(args, props);\fP
.fi
.nf
\f3\fP
.fi
.sp
This code obtains the initial naming context and assigns it to \f3ctx\fR\&. The second line copies \f3ctx\fR into a dummy object reference \f3objref\fR that is attached to various names and added into the name space\&.
.sp
.nf
\f3 NamingContext ctx =\fP
.fi
.nf
\f3 NamingContextHelper\&.narrow(\fP
.fi
.nf
\f3 orb\&.resolve_initial_references("NameService"));\fP
.fi
.nf
\f3 NamingContext objref = ctx;\fP
.fi
.nf
\f3\fP
.fi
.sp
This code creates a name \f3plans\fR of type \f3text\fR and binds it to the dummy object reference\&. \f3plans\fR is then added under the initial naming context using the \f3rebind\fR method\&. The \f3rebind\fR method enables you to run this program over and over again without getting the exceptions from using the \f3bind\fR method\&.
.sp
.nf
\f3 NameComponent nc1 = new NameComponent("plans", "text");\fP
.fi
.nf
\f3 NameComponent[] name1 = {nc1};\fP
.fi
.nf
\f3 ctx\&.rebind(name1, objref);\fP
.fi
.nf
\f3 System\&.out\&.println("plans rebind successful!");\fP
.fi
.nf
\f3\fP
.fi
.sp
This code creates a naming context called \f3Personal\fR of type \f3directory\fR\&. The resulting object reference, \f3ctx2\fR, is bound to the \f3name\fR and added under the initial naming context\&.
.sp
.nf
\f3 NameComponent nc2 = new NameComponent("Personal", "directory");\fP
.fi
.nf
\f3 NameComponent[] name2 = {nc2};\fP
.fi
.nf
\f3 NamingContext ctx2 = ctx\&.bind_new_context(name2);\fP
.fi
.nf
\f3 System\&.out\&.println("new naming context added\&.\&.");\fP
.fi
.nf
\f3\fP
.fi
.sp
The remainder of the code binds the dummy object reference using the names \f3schedule\fR and \f3calendar\fR under the \f3Personal\fR naming context (\f3ctx2\fR)\&.
.sp
.nf
\f3 NameComponent nc3 = new NameComponent("schedule", "text");\fP
.fi
.nf
\f3 NameComponent[] name3 = {nc3};\fP
.fi
.nf
\f3 ctx2\&.rebind(name3, objref);\fP
.fi
.nf
\f3 System\&.out\&.println("schedule rebind successful!");\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 NameComponent nc4 = new NameComponent("calender", "text");\fP
.fi
.nf
\f3 NameComponent[] name4 = {nc4};\fP
.fi
.nf
\f3 ctx2\&.rebind(name4, objref);\fP
.fi
.nf
\f3 System\&.out\&.println("calender rebind successful!");\fP
.fi
.nf
\f3 } catch (Exception e) {\fP
.fi
.nf
\f3 e\&.printStackTrace(System\&.err);\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.sp
.SS BROWSING\ THE\ NAME\ SPACE
The following sample program shoes how to browse the name space\&.
.sp
.nf
\f3import java\&.util\&.Properties;\fP
.fi
.nf
\f3import org\&.omg\&.CORBA\&.*;\fP
.fi
.nf
\f3import org\&.omg\&.CosNaming\&.*;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3public class NameClientList {\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 public static void main(String args[]) {\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 try {\fP
.fi
.nf
\f3\fP
.fi
.sp
In Start the Naming Service, the \f3nameserver\fR was started on port 1050\&. The following code ensures that the client program is aware of this port number\&.
.sp
.nf
\f3 Properties props = new Properties();\fP
.fi
.nf
\f3 props\&.put("org\&.omg\&.CORBA\&.ORBInitialPort", "1050");\fP
.fi
.nf
\f3 ORB orb = ORB\&.init(args, props);\fP
.fi
.nf
\f3\fP
.fi
.sp
The following code obtains the initial naming context\&.
.sp
.nf
\f3 NamingContext nc =\fP
.fi
.nf
\f3 NamingContextHelper\&.narrow(\fP
.fi
.nf
\f3 orb\&.resolve_initial_references("NameService"));\fP
.fi
.nf
\f3\fP
.fi
.sp
The \f3list\fR method lists the bindings in the naming context\&. In this case, up to 1000 bindings from the initial naming context will be returned in the \f3BindingListHolder\fR; any remaining bindings are returned in the \f3BindingIteratorHolder\fR\&.
.sp
.nf
\f3 BindingListHolder bl = new BindingListHolder();\fP
.fi
.nf
\f3 BindingIteratorHolder blIt= new BindingIteratorHolder();\fP
.fi
.nf
\f3 nc\&.list(1000, bl, blIt);\fP
.fi
.nf
\f3\fP
.fi
.sp
This code gets the array of bindings out of the returned \f3BindingListHolder\fR\&. If there are no bindings, then the program ends\&.
.sp
.nf
\f3 Binding bindings[] = bl\&.value;\fP
.fi
.nf
\f3 if (bindings\&.length == 0) return;\fP
.fi
.nf
\f3\fP
.fi
.sp
The remainder of the code loops through the bindings and prints outs the names\&.
.sp
.nf
\f3 for (int i=0; i < bindings\&.length; i++) {\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 // get the object reference for each binding\fP
.fi
.nf
\f3 org\&.omg\&.CORBA\&.Object obj = nc\&.resolve(bindings[i]\&.binding_name);\fP
.fi
.nf
\f3 String objStr = orb\&.object_to_string(obj);\fP
.fi
.nf
\f3 int lastIx = bindings[i]\&.binding_name\&.length\-1;\fP
.fi
.nf
\f3\fP
.fi
.nf
\f3 // check to see if this is a naming context\fP
.fi
.nf
\f3 if (bindings[i]\&.binding_type == BindingType\&.ncontext) {\fP
.fi
.nf
\f3 System\&.out\&.println("Context: " +\fP
.fi
.nf
\f3 bindings[i]\&.binding_name[lastIx]\&.id);\fP
.fi
.nf
\f3 } else {\fP
.fi
.nf
\f3 System\&.out\&.println("Object: " +\fP
.fi
.nf
\f3 bindings[i]\&.binding_name[lastIx]\&.id);\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3 } catch (Exception e) {\fP
.fi
.nf
\f3 e\&.printStackTrace(System\&.err)\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3 }\fP
.fi
.nf
\f3}\fP
.fi
.nf
\f3\fP
.fi
.sp
.SH SEE\ ALSO
.TP 0.2i
\(bu
orbd(1)
.RE
.br
'pl 8.5i
'bp

View File

@ -1,175 +0,0 @@
'\" t
.\" 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java Web Services Tools
.\" Title: wsgen.1
.\"
.if n .pl 99999
.TH wsgen 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
wsgen \- Reads a web service endpoint implementation (SEI) class and generates all of the required artifacts for web service deployment, and invocation\&.
.SH SYNOPSIS
.sp
.nf
\fBwsgen\fR [ \fIoptions\fR ] \fISEI\fR
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
\fISEI\fR
The web service endpoint implementation class (SEI) to be read\&.
.SH DESCRIPTION
The \f3wsgen\fR command generates JAX-WS portable artifacts used in JAX-WS web services\&. The tool reads a web service endpoint class and generates all the required artifacts for web service deployment and invocation\&. JAXWS 2\&.1\&.1 RI also provides a \f3wsgen\fR Ant task, see the \fITools\fR tab of the JAX-WS (wsgen) page at http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsgenant\&.html
.PP
To start the \f3wsgen\fR command, do the following:
.sp
.nf
\f3export JAXWS_HOME=/pathto/jaxws\-ri\fP
.fi
.nf
\f3$JAXWS_HOME/bin/wsgen\&.sh \-help\fP
.fi
.nf
\f3\fP
.fi
.sp
.SH OPTIONS
.TP
-classpath \fIpath\fR
.br
The location of the input class files\&.
.TP
-cp \fIpath\fR
.br
The location of the input class files\&.
.TP
-d \fIdirectory\fR
.br
The location for where to place generated output files\&.
.TP
-extension
.br
Allow vendor extensions\&. Use of extensions can result in applications that are not portable or that do not work with other implementations\&.
.TP
-help
.br
Displays a help message about the \f3wsgen\fR command\&.
.TP
-keep
.br
Keeps the generated files\&.
.TP
-r \fIdirectory\fR
.br
Uses this option with the \f3-wsdl\fR option to specify where to place generated resource files such as WSDLs\&.
.TP
-s \fIdirectory\fR
.br
The location for where to place generated source files\&.
.TP
-verbose
.br
Displays compiler messages\&.
.TP
-version
.br
Prints release information\&.
.TP
-wsdl [ :protocol ] \fI\fR
.br
An optional command that generates a WSDL file to review before endpoint deployment\&. The WSDL files contains a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns\&.
By default the \f3wsgen\fR command does not generate a WSDL file\&. The \f3protocol\fR value is optional and is used to specify what protocol should be used for the WSDL binding (\f3wsdl:binding\fR)\&. Valid protocols are \f3soap1\&.1\fR and \f3Xsoap1\&.2\fR\&. The default is \f3soap1\&.1\fR\&. The \f3Xsoap1\&.2\fR protocol is not standard and can only be used with the \f3-extension\fR option\&.
.TP
-servicename \fIname\fR
.br
Used only with the \f3-wsdl\fR option to specify a particular WSDL service (\f3wsdl:service\fR) name to be generated in the WSDL, for example: \f3-servicename "{http://mynamespace/}MyService"\fR\&.
.TP
-portname \fIname\fR
.br
Used only with the \f3-wsdl\fR option to specify a particular WSDL port (\f3wsdl:port\fR) name to be generated in the WSDL, for example: \f3-portname "{http://mynamespace/}MyPort"\fR\&.
.SH EXAMPLES
The following example generates the wrapper classes for \f3StockService\fR with \f3@WebService\fR annotations inside stock directory\&.
.sp
.nf
\f3wsgen \-d stock \-cp myclasspath stock\&.StockService\fP
.fi
.nf
\f3\fP
.fi
.sp
The following example generates a SOAP 1\&.1 WSDL and schema for the \f3stock\&.StockService\fR class with \f3@WebService\fR annotations\&.
.sp
.nf
\f3wsgen \-wsdl \-d stock \-cp myclasspath stock\&.StockService\fP
.fi
.nf
\f3\fP
.fi
.sp
The following example generates a SOAP 1\&.2 WSDL\&.
.sp
.nf
\f3wsgen \-wsdl:Xsoap1\&.2 \-d stock \-cp myclasspath stock\&.StockService \fP
.fi
.nf
\f3\fP
.fi
.sp
\fINote:\fR You do not have to generate WSDL at development time because the JAXWS run time environment generates a WSDL for you when you deploy your service\&.
.SH SEE\ ALSO
.TP 0.2i
\(bu
wsimport(1)
.TP 0.2i
\(bu
\fIThe Tools\fR tab of the JAX-WS (wsgen) page http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsgenant\&.html
.RE
.br
'pl 8.5i
'bp

View File

@ -1,216 +0,0 @@
'\" t
.\" 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java Web Services Tools
.\" Title: wsimport.1
.\"
.if n .pl 99999
.TH wsimport 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
wsimport \- Generates JAX-WS portable artifacts that can be packaged in a web application archive (WAR) file and provides an Ant task\&.
.SH SYNOPSIS
.sp
.nf
\fBwsimport\fR [ \fIoptions\fR ] \fIwsdl\fR
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
\fIwsdl\fR
The file that contains the machine-readable description of how the web service can be called, what parameters it expects, and what data structures it returns\&.
.SH DESCRIPTION
The \f3wsimport\fR command generates the following JAX-WS portable artifacts\&. These artifacts can be packaged in a WAR file with the WSDL and schema documents and the endpoint implementation to be deployed\&. The \f3wsimport\fR command also provides a \f3wsimport\fR Ant task, see the Tools tab of the Wsimport Ant Task page at http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsimportant\&.html
.TP 0.2i
\(bu
Service Endpoint Interface (SEI)
.TP 0.2i
\(bu
Service
.TP 0.2i
\(bu
Exception class is mapped from \f3wsdl:fault\fR (if any)
.TP 0.2i
\(bu
Async Response Bean is derived from response \f3wsdl:message\fR (if any)
.TP 0.2i
\(bu
JAXB generated value types (mapped java classes from schema types)
.PP
To start the \f3wsgen\fR command, do the following:
.PP
\fIOracle Solaris/Linux\fR:
.sp
.nf
\f3/bin/wsimport\&.sh \-help\fP
.fi
.nf
\f3\fP
.fi
.sp
\fIWindows\fR:
.sp
.nf
\f3\ebin\ewsimport\&.bat \-help\fP
.fi
.nf
\f3\fP
.fi
.sp
.SH OPTIONS
.TP
-d \fIdirectory\fR
.br
Specifies where to place generated output files\&.
.TP
-b \fIpath\fR
.br
Specifies external JAX-WS or JAXB binding files\&. Multiple JAX-WS and JAXB binding files can be specified with the \f3-b\fR option\&. You can use these files to customize package names, bean names, and so on\&. For more information about JAX-WS and JAXB binding files, see the \fIUsers Guide\fR tab of WSDL Customization at http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsimportant\&.html
.TP
-B \fIjaxbOption\fR
.br
Passes the \f3jaxbOption\fR option to the JAXB schema compiler\&.
.TP
-catalog
.br
Specifies a catalog file to resolve external entity references\&. The \f3-catalog\fR option supports the TR9401, XCatalog, and OASIS XML Catalog formats\&. See the \fIUsers Guide\fR tab of the Catalog Support page at http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/catalog-support\&.html
.TP
-extension
.br
Allows vendor extensions\&. Use of extensions can result in applications that are not portable or that do not work with other implementations\&.
.TP
-help
.br
Displays a help message for the \f3wsimport\fR command\&.
.TP
-httpproxy: \fIhost\fR:\fIport\fR
.br
Specifies an HTTP proxy server\&. The default is 8080\&.
.TP
-keep
.br
Keeps generated files\&.
.TP
-p \fIname\fR
.br
Specifies a target package \fIname\fR to override the WSDL and schema binding customizations, and the default algorithm defined in the specification\&.
.TP
-s \fIdirectory\fR
.br
Specifies where to place generated source files\&.
.TP
-verbose
.br
Displays compiler messages\&.
.TP
-version
.br
Prints release information\&.
.TP
-wsdllocation \fIlocation\fR
.br
Specifies the \f3@WebServiceClient\&.wsdlLocation\fR value\&.
.TP
-target
.br
Generates code according to the specified JAX-WS specification version\&. Version 2\&.0 generates compliant code for the JAX-WS 2\&.0 specification\&.
.TP
-quiet
.br
Suppresses the \f3wsimport\fR command output\&.
.PP
Multiple \f3JAX-WS\fR and \f3JAXB\fR binding files can be specified using the \f3-b\fR option, and they can be used to customize various things such as package names and bean names\&. More information about \f3JAX-WS\fR and \f3JAXB\fR binding files can be found in the customization documentation at https://jax-ws\&.dev\&.java\&.net/nonav/2\&.1\&.1/docs/customizations\&.html
.SH NONSTANDARD\ OPTIONS
.TP
-XadditionalHeaders
.br
Maps headers not bound to a request or response message to Java method parameters\&.
.TP
-Xauthfile \fIfile\fR
.br
The WSDL URI that specifies the file that contains authorization information\&. This URI is in the following format:
http://\fIuser-name\fR:\f3password\fR@\fIhost-name\fR/\fIweb-service-name\fR>?wsdl\&.
.TP
-Xdebug
.br
Prints debugging information\&.
.TP
-Xno-addressing-databinding
.br
Enables binding of W3C EndpointReferenceType to Java\&.
.TP
-Xnocompile
.br
Does not compile the generated Java files\&.
.SH EXAMPLE
The following example generates the Java artifacts and compiles the artifacts by importing \f3http://stockquote\&.example\&.com/quote?wsdl\fR
.sp
.nf
\f3wsimport \-p stockquote http://stockquote\&.example\&.com/quote?wsdl\fP
.fi
.nf
\f3\fP
.fi
.sp
.SH SEE\ ALSO
.TP 0.2i
\(bu
wsgen(1)
.TP 0.2i
\(bu
The Tools tab of Wsimport Ant Task page http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsimportant\&.html
.TP 0.2i
\(bu
The \fIUsers Guide\fR tab of Catalog Support page http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/catalog-support\&.html
.TP 0.2i
\(bu
The \fIUsers Guide\fR tab of WSDL Customization page http://jax-ws\&.java\&.net/nonav/2\&.1\&.1/docs/wsimportant\&.html
.RE
.br
'pl 8.5i
'bp

View File

@ -1,232 +0,0 @@
'\" t
.\" 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.
.\"
.\" Arch: generic
.\" Software: JDK 8
.\" Date: 21 November 2013
.\" SectDesc: Java Web Services Tools
.\" Title: xjc.1
.\"
.if n .pl 99999
.TH xjc 1 "21 November 2013" "JDK 8" "Java Web Services Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH NAME
xjc \- Compiles an XML schema file into fully annotated Java classes\&.
.SH SYNOPSIS
.sp
.nf
\fBxjc\fR [ \fIoptions\fR ] \fBschema\fR \fIfile/URL/dir/jar\fR \&.\&.\&. [\fB\-b\fR \fIbindinfo\fR ] \&.\&.\&.
.fi
.sp
.TP
\fIoptions\fR
The command-line options\&. See Options\&.
.TP
schema \fIfile/URL/dir/jar \&.\&.\&.\fR
The location of the XML schema file\&. If \f3dir\fR is specified, then all schema files in it are compiled\&. If \f3jar\fR is specified, then the \f3/META-INF/sun-jaxb\&.episode\fR binding file is compiled\&.
.TP
-b \fIbindinfo\fR
.br
The location of the bindings files\&.
.SH DESCRIPTION
Start the binding compiler with the appropriate \f3xjc\fR shell script in the bin directory for your platform\&. There is also an Ant task to run the binding complier\&. See Using the XJC with Ant at http://jaxb\&.java\&.net/nonav/2\&.1\&.3/docs/xjcTask\&.html
.SH OPTIONS
.TP 0.2i
\(bu
See also Nonstandard Options
.TP 0.2i
\(bu
See also Deprecated and Removed Options
.TP
-nv
.br
By default, the XJC binding compiler performs strict validation of the source schema before processing it\&. Use this option to disable strict schema validation\&. This does not mean that the binding compiler will not perform any validation, but means that it will perform a less-strict validation\&.
.TP
-extension
.br
By default, the XJC binding compiler strictly enforces the rules outlined in the Compatibility chapter of the JAXB Specification\&. Appendix E\&.2 defines a set of W3C XML Schema features that are not completely supported by JAXB v1\&.0\&. In some cases, you may be allowed to use them in the \f3-extension\fR mode enabled by this switch\&. In the default (strict) mode, you are also limited to using only the binding customization defined in the specification\&. By using the \f3-extension\fR switch, you will be allowed to use the JAXB Vendor Extensions\&.
.TP
-b \fIfile\fR
.br
Specifies one or more external binding files to process\&. Each binding file must have its own \f3-b\fR switch\&. The syntax of the external binding files is flexible\&. You can have a single binding file that contains customization for multiple schemas or you can break the customization into multiple bindings files: \f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings123\&.xjb\fR\f3xjc schema1\&.xsd schema2\&.xsd schema3\&.xsd -b bindings1\&.xjb -b bindings2\&.xjb -b bindings3\&.xjb\fR\&. In addition, the ordering of the schema files and binding files on the command line does not matter\&.
.TP
-d \fIdir\fR
.br
By default, the XJC binding compiler generates the Java content classes in the current directory\&. Use this option to specify an alternate output directory\&. The output directory must already exist\&. The XJC binding compiler does not create it for you\&.
.TP
-p \fIpkg\fR
.br
When you specify a target package with this command-line option, it overrides any binding customization for the package name and the default package name algorithm defined in the specification\&.
.TP
-httpproxy \fIproxy\fR
.br
Specifies the HTTP or HTTPS proxy in the format \fI[user[:password]@]proxyHost[:proxyPort]\fR\&. The old \f3-host\fR and \f3-port\fR options are still supported by the RI for backward compatibility, but they were deprecated\&. The password specified with this option is an argument that is visible to other users who use the top command\&. For greater security, use the \f3-httpproxyfile\fR option\&.
.TP
-httpproxyfile file
.br
Specifies the HTTP or HTTPS proxy with a file\&. The same format as the \f3-httpproxy\fR option, but the password specified in the file is not visible to other users\&.
.TP
-classpath arg
.br
Specifies where to find client application class files used by the \fIjxb:javaType\fR and xjc:\fIsuperClass\fR customization\&.
.TP
-catalog file
.br
Specifies catalog files to resolve external entity references\&. Supports the TR9401, XCatalog, and OASIS XML Catalog formats\&. See XML Entity and URI Resolvers at http://xerces\&.apache\&.org/xml-commons/components/resolver/resolver-article\&.html
.TP
-readOnly
.br
By default, the XJC binding compiler does not write-protect the Java source files it generates\&. Use this option to force the XJC binding compiler to mark the generated Java sources as read-only\&.
.TP
-npa
.br
Suppresses the generation of package level annotations into \f3**/package-info\&.java\fR\&. Using this switch causes the generated code to internalize those annotations into the other generated classes\&.
.TP
-no-header
.br
Suppresses the generation of a file header comment that includes some note and time stamp\&. Using this makes the generated code more compatible with the \f3diff\fR command\&.
.TP
-target 2\&.0
.br
Avoids generating code that relies on any JAXB 2\&.1 features\&. This will allow the generated code to run with JAXB 2\&.0 runtime environment (such as Java SE 6)\&.
.TP
-xmlschema
.br
Treats input schemas as W3C XML Schema (default)\&. If you do not specify this switch, then your input schemas are treated as though they are W3C XML Schemas\&.
.TP
-relaxing
.br
Treats input schemas as RELAX NG (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
.TP
-relaxing-compact
.br
Treat input schemas as RELAX NG compact syntax (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
.TP
-dtd
.br
Treats input schemas as XML DTD (experimental and unsupported)\&. Support for RELAX NG schemas is provided as a JAXB Vendor Extension\&.
.TP
-wsdl
.br
Treats input as WSDL and compiles schemas inside it (experimental and unsupported)\&.
.TP
-quiet
.br
Suppress compiler output, such as progress information and warnings\&.
.TP
-verbose
.br
Be extra verbose, such as printing informational messages or displaying stack traces upon some errors\&.
.TP
-help
.br
Displays a brief summary of the compiler switches\&.
.TP
-version
.br
Displays the compiler version information\&.
.TP
\fIschema file/URL/dir\fR
Specifies one or more schema files to compile\&. If you specify a directory, then the \f3xjc\fR command scans it for all schema files and compiles them\&.
.SS NONSTANDARD\ OPTIONS
.TP
-XLocator
.br
Causes the generated code to expose SAX Locator information about the source XML in the Java bean instances after unmarshalling\&.
.TP
-Xsync-methods
.br
Causes all of the generated method signatures to include the \f3synchronized\fR keyword\&.
.TP
-mark-generated
.br
Marks the generated code with the annotation \f3@javax\&.annotation\&.Generated\fR\&.
.TP
-episode file
.br
Generates the specified episode file for separate compilation\&.
.SS DEPRECATED\ AND\ REMOVED\ OPTIONS
.TP
-host & -port
.br
These options are replaced with the \f3-httpproxy\fR option\&. For backward compatibility, these options are supported, but will not be documented and might be removed from future releases\&.
.TP
-use-runtime
.br
Because the JAXB 2\&.0 specification has defined a portable runtime environment, it is no longer necessary for the JAXB RI to generate \f3**/impl/runtime\fRpackages\&. Therefore, this switch is obsolete and was removed\&.
.TP
-source
.br
The \f3-source\fR compatibility switch was introduced in the first JAXB 2\&.0 Early Access release\&. This switch is removed from future releases of JAXB 2\&.0\&. If you need to generate 1\&.0\&.x code, then use an installation of the 1\&.0\&.x code base\&.
.SH COMPILER\ RESTRICTIONS
In general, it is safest to compile all related schemas as a single unit with the same binding compiler switches\&. Keep the following list of restrictions in mind when running the \f3xjc\fR command\&. Most of these issues only apply when you compile multiple schemas with multiple invocations of the \f3xjc\fR command\&.
.PP
To compile multiple schemas at the same time, keep the following precedence rules for the target Java package name in mind:
.TP 0.4i
1\&.
The \f3-p\fR option has the highest precedence\&.
.TP 0.4i
2\&.
\fIjaxb:package\fR customization\&.
.TP 0.4i
3\&.
If \f3targetNamespace\fR is declared, then apply the \f3t\fR\f3argetNamespace\fR to the Java package name algorithm defined in the specification\&.
.TP 0.4i
4\&.
If no \f3targetNamespace\fR is declared, then use a hard coded package named \f3generated\fR\&.
.PP
You cannot have more than one \fIjaxb:schemaBindings\fR per name space, so it is impossible to have two schemas in the same target name space compiled into different Java packages\&.
.PP
All schemas being compiled into the same Java package must be submitted to the XJC binding compiler at the same time\&. They cannot be compiled independently and work as expected\&.
.PP
Element substitution groups that are spread across multiple schema files must be compiled at the same time\&.
.SH SEE\ ALSO
.TP 0.2i
\(bu
Binding Compiler (xjc) at http://jaxb\&.java\&.net/nonav/2\&.2\&.3u1/docs/xjc\&.html
.TP 0.2i
\(bu
Java Architecture for XML Binding (JAXB) at http://www\&.oracle\&.com/technetwork/articles/javase/index-140168\&.html
.RE
.br
'pl 8.5i
'bp

View File

@ -17725,7 +17725,7 @@ instruct vsll8B_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "shl $dst, $src, $shift\t# vector (8B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) {
__ eor(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
@ -17744,7 +17744,7 @@ instruct vsll16B_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "shl $dst, $src, $shift\t# vector (16B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) {
__ eor(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
@ -17764,9 +17764,8 @@ instruct vsra8B_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "sshr $dst, $src, $shift\t# vector (8B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) sh = 7;
sh = -sh & 7;
__ sshr(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg), sh);
%}
@ -17779,9 +17778,8 @@ instruct vsra16B_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "sshr $dst, $src, $shift\t# vector (16B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) sh = 7;
sh = -sh & 7;
__ sshr(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg), sh);
%}
@ -17795,14 +17793,14 @@ instruct vsrl8B_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "ushr $dst, $src, $shift\t# vector (8B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) {
__ eor(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
} else {
__ ushr(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg), -sh & 7);
as_FloatRegister($src$$reg), sh);
}
%}
ins_pipe(vshift64_imm);
@ -17814,14 +17812,14 @@ instruct vsrl16B_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "ushr $dst, $src, $shift\t# vector (16B)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 8) {
__ eor(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
} else {
__ ushr(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg), -sh & 7);
as_FloatRegister($src$$reg), sh);
}
%}
ins_pipe(vshift128_imm);
@ -17890,7 +17888,7 @@ instruct vsll4S_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "shl $dst, $src, $shift\t# vector (4H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) {
__ eor(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
@ -17909,7 +17907,7 @@ instruct vsll8S_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "shl $dst, $src, $shift\t# vector (8H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) {
__ eor(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
@ -17929,9 +17927,8 @@ instruct vsra4S_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "sshr $dst, $src, $shift\t# vector (4H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) sh = 15;
sh = -sh & 15;
__ sshr(as_FloatRegister($dst$$reg), __ T4H,
as_FloatRegister($src$$reg), sh);
%}
@ -17944,9 +17941,8 @@ instruct vsra8S_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "sshr $dst, $src, $shift\t# vector (8H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) sh = 15;
sh = -sh & 15;
__ sshr(as_FloatRegister($dst$$reg), __ T8H,
as_FloatRegister($src$$reg), sh);
%}
@ -17960,14 +17956,14 @@ instruct vsrl4S_imm(vecD dst, vecD src, immI shift) %{
ins_cost(INSN_COST);
format %{ "ushr $dst, $src, $shift\t# vector (4H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) {
__ eor(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
} else {
__ ushr(as_FloatRegister($dst$$reg), __ T4H,
as_FloatRegister($src$$reg), -sh & 15);
as_FloatRegister($src$$reg), sh);
}
%}
ins_pipe(vshift64_imm);
@ -17979,14 +17975,14 @@ instruct vsrl8S_imm(vecX dst, vecX src, immI shift) %{
ins_cost(INSN_COST);
format %{ "ushr $dst, $src, $shift\t# vector (8H)" %}
ins_encode %{
int sh = (int)$shift$$constant & 31;
int sh = (int)$shift$$constant;
if (sh >= 16) {
__ eor(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
as_FloatRegister($src$$reg));
} else {
__ ushr(as_FloatRegister($dst$$reg), __ T8H,
as_FloatRegister($src$$reg), -sh & 15);
as_FloatRegister($src$$reg), sh);
}
%}
ins_pipe(vshift128_imm);
@ -18054,7 +18050,7 @@ instruct vsll2I_imm(vecD dst, vecD src, immI shift) %{
ins_encode %{
__ shl(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift64_imm);
%}
@ -18067,7 +18063,7 @@ instruct vsll4I_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ shl(as_FloatRegister($dst$$reg), __ T4S,
as_FloatRegister($src$$reg),
(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}
@ -18080,7 +18076,7 @@ instruct vsra2I_imm(vecD dst, vecD src, immI shift) %{
ins_encode %{
__ sshr(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift64_imm);
%}
@ -18093,7 +18089,7 @@ instruct vsra4I_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ sshr(as_FloatRegister($dst$$reg), __ T4S,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}
@ -18106,7 +18102,7 @@ instruct vsrl2I_imm(vecD dst, vecD src, immI shift) %{
ins_encode %{
__ ushr(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift64_imm);
%}
@ -18119,7 +18115,7 @@ instruct vsrl4I_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ ushr(as_FloatRegister($dst$$reg), __ T4S,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 31);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}
@ -18159,7 +18155,7 @@ instruct vsll2L_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ shl(as_FloatRegister($dst$$reg), __ T2D,
as_FloatRegister($src$$reg),
(int)$shift$$constant & 63);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}
@ -18172,7 +18168,7 @@ instruct vsra2L_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ sshr(as_FloatRegister($dst$$reg), __ T2D,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 63);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}
@ -18185,7 +18181,7 @@ instruct vsrl2L_imm(vecX dst, vecX src, immI shift) %{
ins_encode %{
__ ushr(as_FloatRegister($dst$$reg), __ T2D,
as_FloatRegister($src$$reg),
-(int)$shift$$constant & 63);
(int)$shift$$constant);
%}
ins_pipe(vshift128_imm);
%}

View File

@ -518,6 +518,7 @@ class Assembler : public AbstractAssembler {
XXMRGHW_OPCODE = (60u << OPCODE_SHIFT | 18u << 3),
XXMRGLW_OPCODE = (60u << OPCODE_SHIFT | 50u << 3),
XXSPLTW_OPCODE = (60u << OPCODE_SHIFT | 164u << 2),
XXLOR_OPCODE = (60u << OPCODE_SHIFT | 146u << 3),
XXLXOR_OPCODE = (60u << OPCODE_SHIFT | 154u << 3),
XXLEQV_OPCODE = (60u << OPCODE_SHIFT | 186u << 3),
@ -2162,6 +2163,7 @@ class Assembler : public AbstractAssembler {
inline void mtvsrd( VectorSRegister d, Register a);
inline void mtvsrwz( VectorSRegister d, Register a);
inline void xxspltw( VectorSRegister d, VectorSRegister b, int ui2);
inline void xxlor( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xxlxor( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xxleqv( VectorSRegister d, VectorSRegister a, VectorSRegister b);

View File

@ -766,6 +766,7 @@ inline void Assembler::stxvd2x( VectorSRegister d, Register s1, Register s2) { e
inline void Assembler::mtvsrd( VectorSRegister d, Register a) { emit_int32( MTVSRD_OPCODE | vsrt(d) | ra(a)); }
inline void Assembler::mtvsrwz( VectorSRegister d, Register a) { emit_int32( MTVSRWZ_OPCODE | vsrt(d) | ra(a)); }
inline void Assembler::xxspltw( VectorSRegister d, VectorSRegister b, int ui2) { emit_int32( XXSPLTW_OPCODE | vsrt(d) | vsrb(b) | xxsplt_uim(uimm(ui2,2))); }
inline void Assembler::xxlor( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XXLOR_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xxlxor( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XXLXOR_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xxleqv( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XXLEQV_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::mtvrd( VectorRegister d, Register a) { emit_int32( MTVSRD_OPCODE | vsrt(d->to_vsr()) | ra(a)); }

View File

@ -1656,9 +1656,9 @@ const RegMask &MachLoadPollAddrLateNode::out_RegMask() const {
// =============================================================================
// Figure out which register class each belongs in: rc_int, rc_float or
// Figure out which register class each belongs in: rc_int, rc_float, rc_vs or
// rc_stack.
enum RC { rc_bad, rc_int, rc_float, rc_stack };
enum RC { rc_bad, rc_int, rc_float, rc_vs, rc_stack };
static enum RC rc_class(OptoReg::Name reg) {
// Return the register class for the given register. The given register
@ -1673,6 +1673,9 @@ static enum RC rc_class(OptoReg::Name reg) {
// We have 64 floating-point register halves, starting at index 64.
if (reg < 64+64) return rc_float;
// We have 64 vector-scalar registers, starting at index 128.
if (reg < 64+64+64) return rc_vs;
// Between float regs & stack are the flags regs.
assert(OptoReg::is_stack(reg) || reg < 64+64+64, "blow up if spilling flags");
@ -1735,6 +1738,58 @@ uint MachSpillCopyNode::implementation(CodeBuffer *cbuf, PhaseRegAlloc *ra_, boo
if (src_lo == dst_lo && src_hi == dst_hi)
return size; // Self copy, no move.
if (bottom_type()->isa_vect() != NULL && ideal_reg() == Op_VecX) {
// Memory->Memory Spill.
if (src_lo_rc == rc_stack && dst_lo_rc == rc_stack) {
int src_offset = ra_->reg2offset(src_lo);
int dst_offset = ra_->reg2offset(dst_lo);
if (cbuf) {
MacroAssembler _masm(cbuf);
__ ld(R0, src_offset, R1_SP);
__ std(R0, dst_offset, R1_SP);
__ ld(R0, src_offset+8, R1_SP);
__ std(R0, dst_offset+8, R1_SP);
}
size += 16;
}
// VectorSRegister->Memory Spill.
else if (src_lo_rc == rc_vs && dst_lo_rc == rc_stack) {
VectorSRegister Rsrc = as_VectorSRegister(Matcher::_regEncode[src_lo]);
int dst_offset = ra_->reg2offset(dst_lo);
if (cbuf) {
MacroAssembler _masm(cbuf);
__ addi(R0, R1_SP, dst_offset);
__ stxvd2x(Rsrc, R0);
}
size += 8;
}
// Memory->VectorSRegister Spill.
else if (src_lo_rc == rc_stack && dst_lo_rc == rc_vs) {
VectorSRegister Rdst = as_VectorSRegister(Matcher::_regEncode[dst_lo]);
int src_offset = ra_->reg2offset(src_lo);
if (cbuf) {
MacroAssembler _masm(cbuf);
__ addi(R0, R1_SP, src_offset);
__ lxvd2x(Rdst, R0);
}
size += 8;
}
// VectorSRegister->VectorSRegister.
else if (src_lo_rc == rc_vs && dst_lo_rc == rc_vs) {
VectorSRegister Rsrc = as_VectorSRegister(Matcher::_regEncode[src_lo]);
VectorSRegister Rdst = as_VectorSRegister(Matcher::_regEncode[dst_lo]);
if (cbuf) {
MacroAssembler _masm(cbuf);
__ xxlor(Rdst, Rsrc, Rsrc);
}
size += 4;
}
else {
ShouldNotReachHere(); // No VSR spill.
}
return size;
}
// --------------------------------------
// Memory->Memory Spill. Use R0 to hold the value.
if (src_lo_rc == rc_stack && dst_lo_rc == rc_stack) {
@ -3524,7 +3579,7 @@ encode %{
assert(loadConLNodes._last->bottom_type()->isa_long(), "must be long");
%}
enc_class postalloc_expand_load_replF_constant_vsx(vecX dst, immF src, iRegLdst toc) %{
enc_class postalloc_expand_load_replF_constant_vsx(vecX dst, immF src, iRegLdst toc, iRegLdst tmp) %{
// Create new nodes.
// Make an operand with the bit pattern to load as float.
@ -3533,8 +3588,8 @@ encode %{
loadConLReplicatedNodesTuple loadConLNodes =
loadConLReplicatedNodesTuple_create(C, ra_, n_toc, op_repl, op_dst, op_zero,
OptoReg::Name(R20_H_num), OptoReg::Name(R20_num),
OptoReg::Name(VSR11_num), OptoReg::Name(VSR10_num));
ra_->get_reg_second(n_tmp), ra_->get_reg_first(n_tmp),
ra_->get_reg_second(this), ra_->get_reg_first(this));
// Push new nodes.
if (loadConLNodes._large_hi) { nodes->push(loadConLNodes._large_hi); }
@ -14013,12 +14068,13 @@ instruct repl4F_reg_Ex(vecX dst, regF src) %{
%}
%}
instruct repl4F_immF_Ex(vecX dst, immF src) %{
instruct repl4F_immF_Ex(vecX dst, immF src, iRegLdst tmp) %{
match(Set dst (ReplicateF src));
predicate(n->as_Vector()->length() == 4);
effect(TEMP tmp);
ins_cost(10 * DEFAULT_COST);
postalloc_expand( postalloc_expand_load_replF_constant_vsx(dst, src, constanttablebase) );
postalloc_expand( postalloc_expand_load_replF_constant_vsx(dst, src, constanttablebase, tmp) );
%}
instruct repl4F_immF0(vecX dst, immF_0 zero) %{

View File

@ -109,8 +109,7 @@ void VM_Version::initialize() {
if (PowerArchitecturePPC64 >= 8) {
if (FLAG_IS_DEFAULT(SuperwordUseVSX)) {
// TODO: Switch on when it works stable. Currently, MachSpillCopyNode::implementation code is missing.
//FLAG_SET_ERGO(bool, SuperwordUseVSX, true);
FLAG_SET_ERGO(bool, SuperwordUseVSX, true);
}
} else {
if (SuperwordUseVSX) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -991,8 +991,8 @@ void LIR_Assembler::const2mem(LIR_Opr src, LIR_Opr dest, BasicType type, CodeEmi
int offset = -1;
switch (c->type()) {
case T_FLOAT: type = T_INT; // Float constants are stored by int store instructions.
case T_INT:
case T_FLOAT:
case T_ADDRESS: {
LIR_Opr tmp = FrameMap::O7_opr;
int value = c->as_jint_bits();
@ -1202,6 +1202,7 @@ void LIR_Assembler::stack2stack(LIR_Opr src, LIR_Opr dest, BasicType type) {
__ stw(tmp, to.base(), to.disp());
break;
}
case T_ADDRESS:
case T_OBJECT: {
Register tmp = O7;
Address from = frame_map()->address_for_slot(src->single_stack_ix());
@ -1355,7 +1356,6 @@ void LIR_Assembler::reg2reg(LIR_Opr from_reg, LIR_Opr to_reg) {
}
}
void LIR_Assembler::reg2mem(LIR_Opr from_reg, LIR_Opr dest, BasicType type,
LIR_PatchCode patch_code, CodeEmitInfo* info, bool pop_fpu_stack,
bool wide, bool unaligned) {
@ -2265,10 +2265,10 @@ void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj* op) {
op->obj()->as_register() == O0 &&
op->klass()->as_register() == G5, "must be");
if (op->init_check()) {
add_debug_info_for_null_check_here(op->stub()->info());
__ ldub(op->klass()->as_register(),
in_bytes(InstanceKlass::init_state_offset()),
op->tmp1()->as_register());
add_debug_info_for_null_check_here(op->stub()->info());
__ cmp(op->tmp1()->as_register(), InstanceKlass::fully_initialized);
__ br(Assembler::notEqual, false, Assembler::pn, *op->stub()->entry());
__ delayed()->nop();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -32,32 +32,32 @@
// (see c1_globals.hpp)
#ifndef TIERED
define_pd_global(bool, BackgroundCompilation, true );
define_pd_global(bool, CICompileOSR, true );
define_pd_global(bool, InlineIntrinsics, true );
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true );
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 1000 ); // Design center runs on 1.3.1
define_pd_global(bool, BackgroundCompilation, true );
define_pd_global(bool, CICompileOSR, true );
define_pd_global(bool, InlineIntrinsics, true );
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps, false);
define_pd_global(bool, UseOnStackReplacement, true );
define_pd_global(bool, TieredCompilation, false);
define_pd_global(intx, CompileThreshold, 1000 ); // Design center runs on 1.3.1
define_pd_global(intx, OnStackReplacePercentage, 1400 );
define_pd_global(bool, UseTLAB, true );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(bool, ResizeTLAB, true );
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, MetaspaceSize, 12*M );
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(size_t, NewSizeThreadIncrease, 16*K );
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, OnStackReplacePercentage, 1400 );
define_pd_global(bool, UseTLAB, true );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(bool, ResizeTLAB, true );
define_pd_global(uintx, ReservedCodeCacheSize, 32*M );
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M );
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, MetaspaceSize, 12*M );
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(size_t, NewSizeThreadIncrease, 16*K );
define_pd_global(uint64_t, MaxRAM, 1ULL*G);
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
#endif // !TIERED
define_pd_global(bool, UseTypeProfile, false);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -71,12 +71,12 @@ define_pd_global(bool, IdealizeClearArrayNode, true);
// sequence of instructions to load a 64 bit pointer.
//
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(uintx, InitialCodeCacheSize, 2048*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, ReservedCodeCacheSize, 48*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 22*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM, 128ULL*G);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, 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
@ -107,8 +107,8 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
#ifdef ASSERT
// read the value once
intptr_t data = method_holder->data();
address destination = jump->jump_destination();
volatile intptr_t data = method_holder->data();
volatile address destination = jump->jump_destination();
assert(data == 0 || data == (intptr_t)callee(),
"a) MT-unsafe modification of inline cache");
assert(destination == (address)-1 || destination == entry,

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, 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
@ -837,6 +837,20 @@ class StubGenerator: public StubCodeGenerator {
case BarrierSet::G1SATBCTLogging:
// With G1, don't generate the call if we statically know that the target in uninitialized
if (!dest_uninitialized) {
Register tmp = O5;
assert_different_registers(addr, count, tmp);
Label filtered;
// Is marking active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ ld(G2, in_bytes(JavaThread::satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_active()), tmp);
} else {
guarantee(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1,
"Assumption");
__ ldsb(G2, in_bytes(JavaThread::satb_mark_queue_offset() + SATBMarkQueue::byte_offset_of_active()), tmp);
}
// Is marking active?
__ cmp_and_br_short(tmp, G0, Assembler::equal, Assembler::pt, filtered);
__ save_frame(0);
// Save the necessary global regs... will be used after.
if (addr->is_global()) {
@ -856,6 +870,9 @@ class StubGenerator: public StubCodeGenerator {
__ mov(L1, count);
}
__ restore();
__ bind(filtered);
DEBUG_ONLY(__ set(0xDEADC0DE, tmp);) // we have killed tmp
}
break;
case BarrierSet::CardTableForRS:

View File

@ -1510,11 +1510,11 @@ void Assembler::call(Address adr) {
}
void Assembler::call_literal(address entry, RelocationHolder const& rspec) {
assert(entry != NULL, "call most probably wrong");
InstructionMark im(this);
emit_int8((unsigned char)0xE8);
intptr_t disp = entry - (pc() + sizeof(int32_t));
assert(is_simm32(disp), "must be 32bit offset (call2)");
// Entry is NULL in case of a scratch emit.
assert(entry == NULL || is_simm32(disp), "disp=" INTPTR_FORMAT " must be 32bit offset (call2)", disp);
// Technically, should use call32_operand, but this format is
// implied by the fact that we're emitting a call instruction.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -1543,10 +1543,10 @@ void LIR_Assembler::emit_opConvert(LIR_OpConvert* op) {
void LIR_Assembler::emit_alloc_obj(LIR_OpAllocObj* op) {
if (op->init_check()) {
add_debug_info_for_null_check_here(op->stub()->info());
__ cmpb(Address(op->klass()->as_register(),
InstanceKlass::init_state_offset()),
InstanceKlass::fully_initialized);
add_debug_info_for_null_check_here(op->stub()->info());
__ jcc(Assembler::notEqual, *op->stub()->entry());
}
__ allocate_object(op->obj()->as_register(),
@ -2580,7 +2580,9 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
move_regs(lreg, rax);
int idivl_offset = __ corrected_idivl(rreg);
add_debug_info_for_div0(idivl_offset, info);
if (ImplicitDiv0Checks) {
add_debug_info_for_div0(idivl_offset, info);
}
if (code == lir_irem) {
move_regs(rdx, dreg); // result is in rdx
} else {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2018, 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
@ -572,6 +572,8 @@ void LIRGenerator::do_ArithmeticOp_Int(ArithmeticOp* x) {
if (!ImplicitDiv0Checks) {
__ cmp(lir_cond_equal, right.result(), LIR_OprFact::intConst(0));
__ branch(lir_cond_equal, T_INT, new DivByZeroStub(info));
// Idiv/irem cannot trap (passing info would generate an assertion).
info = NULL;
}
LIR_Opr tmp = FrameMap::rdx_opr; // idiv and irem use rdx in their implementation
if (x->op() == Bytecodes::_irem) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -45,15 +45,15 @@ define_pd_global(intx, CompileThreshold, 1500 );
define_pd_global(intx, OnStackReplacePercentage, 933 );
define_pd_global(intx, FreqInlineSize, 325 );
define_pd_global(size_t, NewSizeThreadIncrease, 4*K );
define_pd_global(intx, InitialCodeCacheSize, 160*K);
define_pd_global(intx, ReservedCodeCacheSize, 32*M );
define_pd_global(intx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(intx, ProfiledCodeHeapSize, 14*M );
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, InitialCodeCacheSize, 160*K);
define_pd_global(uintx, ReservedCodeCacheSize, 32*M );
define_pd_global(uintx, NonProfiledCodeHeapSize, 13*M );
define_pd_global(uintx, ProfiledCodeHeapSize, 14*M );
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(bool, ProfileInterpreter, false);
define_pd_global(intx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1 );
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(uintx, CodeCacheExpansionSize, 32*K );
define_pd_global(uintx, CodeCacheMinBlockLength, 1 );
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);
define_pd_global(size_t, MetaspaceSize, 12*M );
define_pd_global(bool, NeverActAsServerClassMachine, true );
define_pd_global(uint64_t, MaxRAM, 1ULL*G);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2018, 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
@ -48,26 +48,26 @@ define_pd_global(intx, FreqInlineSize, 325);
define_pd_global(intx, MinJumpTableSize, 10);
define_pd_global(intx, LoopPercentProfileLimit, 30);
#ifdef AMD64
define_pd_global(intx, INTPRESSURE, 13);
define_pd_global(intx, FLOATPRESSURE, 14);
define_pd_global(intx, InteriorEntryAlignment, 16);
define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, INTPRESSURE, 13);
define_pd_global(intx, FLOATPRESSURE, 14);
define_pd_global(intx, InteriorEntryAlignment, 16);
define_pd_global(size_t, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 64*K);
define_pd_global(uintx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, CodeCacheExpansionSize, 64*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 128ULL*G);
#else
define_pd_global(intx, INTPRESSURE, 6);
define_pd_global(intx, FLOATPRESSURE, 6);
define_pd_global(intx, InteriorEntryAlignment, 4);
define_pd_global(intx, INTPRESSURE, 6);
define_pd_global(intx, FLOATPRESSURE, 6);
define_pd_global(intx, InteriorEntryAlignment, 4);
define_pd_global(size_t, NewSizeThreadIncrease, 4*K);
define_pd_global(intx, LoopUnrollLimit, 50); // Design center runs on 1.3.1
define_pd_global(intx, LoopUnrollLimit, 50); // Design center runs on 1.3.1
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 32*K);
define_pd_global(uintx, InitialCodeCacheSize, 2304*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(uintx, CodeCacheExpansionSize, 32*K);
// Ergonomics related flags
define_pd_global(uint64_t, MaxRAM, 4ULL*G);
@ -84,10 +84,10 @@ define_pd_global(bool, OptoRegScheduling, true);
define_pd_global(bool, SuperWordLoopUnrollAnalysis, true);
define_pd_global(bool, IdealizeClearArrayNode, true);
define_pd_global(intx, ReservedCodeCacheSize, 48*M);
define_pd_global(intx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(intx, ProfiledCodeHeapSize, 22*M);
define_pd_global(intx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, ReservedCodeCacheSize, 48*M);
define_pd_global(uintx, NonProfiledCodeHeapSize, 21*M);
define_pd_global(uintx, ProfiledCodeHeapSize, 22*M);
define_pd_global(uintx, NonNMethodCodeHeapSize, 5*M );
define_pd_global(uintx, CodeCacheMinBlockLength, 4);
define_pd_global(uintx, CodeCacheMinimumUseSpace, 400*K);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, 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
@ -160,8 +160,8 @@ void CompiledDirectStaticCall::set_to_interpreted(const methodHandle& callee, ad
#ifdef ASSERT
// read the value once
intptr_t data = method_holder->data();
address destination = jump->jump_destination();
volatile intptr_t data = method_holder->data();
volatile address destination = jump->jump_destination();
assert(data == 0 || data == (intptr_t)callee(),
"a) MT-unsafe modification of inline cache");
assert(destination == (address)-1 || destination == entry,

View File

@ -516,6 +516,8 @@ void InterpreterMacroAssembler::load_resolved_reference_at_index(
// Add in the index
addptr(result, tmp);
load_heap_oop(result, Address(result, arrayOopDesc::base_offset_in_bytes(T_OBJECT)));
// The resulting oop is null if the reference is not yet resolved.
// It is Universe::the_null_sentinel() if the reference resolved to NULL via condy.
}
// load cpool->resolved_klass_at(index)

View File

@ -836,7 +836,8 @@ void MacroAssembler::warn(const char* msg) {
andq(rsp, -16); // align stack as required by push_CPU_state and call
push_CPU_state(); // keeps alignment at 16 bytes
lea(c_rarg0, ExternalAddress((address) msg));
call_VM_leaf(CAST_FROM_FN_PTR(address, warning), c_rarg0);
lea(rax, ExternalAddress(CAST_FROM_FN_PTR(address, warning)));
call(rax);
pop_CPU_state();
mov(rsp, rbp);
pop(rbp);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2018, 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
@ -589,7 +589,7 @@ void trace_method_handle_stub_wrapper(MethodHandleStubArguments* args) {
void MethodHandles::trace_method_handle(MacroAssembler* _masm, const char* adaptername) {
if (!TraceMethodHandles) return;
BLOCK_COMMENT("trace_method_handle {");
BLOCK_COMMENT(err_msg("trace_method_handle %s {", adaptername));
__ enter();
__ andptr(rsp, -16); // align stack if needed for FPU state
__ pusha();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -145,7 +145,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
// We assume caller has already has return address slot on the stack
// We push epb twice in this sequence because we want the real rbp,
// to be under the return like a normal enter and we want to use pusha
// We push by hand instead of pusing push
// We push by hand instead of using push.
__ enter();
__ pusha();
__ pushf();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2018, 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
@ -679,10 +679,28 @@ class StubGenerator: public StubCodeGenerator {
case BarrierSet::G1SATBCTLogging:
// With G1, don't generate the call if we statically know that the target in uninitialized
if (!uninitialized_target) {
Register thread = rax;
Label filtered;
__ push(thread);
__ get_thread(thread);
Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
SATBMarkQueue::byte_offset_of_active()));
// Is marking active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ cmpl(in_progress, 0);
} else {
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ cmpb(in_progress, 0);
}
__ pop(thread);
__ jcc(Assembler::equal, filtered);
__ pusha(); // push registers
__ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre),
start, count);
__ popa();
__ bind(filtered);
}
break;
case BarrierSet::CardTableForRS:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -1201,6 +1201,18 @@ class StubGenerator: public StubCodeGenerator {
case BarrierSet::G1SATBCTLogging:
// With G1, don't generate the call if we statically know that the target in uninitialized
if (!dest_uninitialized) {
Label filtered;
Address in_progress(r15_thread, in_bytes(JavaThread::satb_mark_queue_offset() +
SATBMarkQueue::byte_offset_of_active()));
// Is marking active?
if (in_bytes(SATBMarkQueue::byte_width_of_active()) == 4) {
__ cmpl(in_progress, 0);
} else {
assert(in_bytes(SATBMarkQueue::byte_width_of_active()) == 1, "Assumption");
__ cmpb(in_progress, 0);
}
__ jcc(Assembler::equal, filtered);
__ pusha(); // push registers
if (count == c_rarg0) {
if (addr == c_rarg1) {
@ -1216,6 +1228,8 @@ class StubGenerator: public StubCodeGenerator {
}
__ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), 2);
__ popa();
__ bind(filtered);
}
break;
case BarrierSet::CardTableForRS:

View File

@ -419,7 +419,7 @@ void TemplateTable::sipush() {
void TemplateTable::ldc(bool wide) {
transition(vtos, vtos);
Register rarg = NOT_LP64(rcx) LP64_ONLY(c_rarg1);
Label call_ldc, notFloat, notClass, Done;
Label call_ldc, notFloat, notClass, notInt, Done;
if (wide) {
__ get_unsigned_2_byte_index_at_bcp(rbx, 1);
@ -465,19 +465,18 @@ void TemplateTable::ldc(bool wide) {
__ jmp(Done);
__ bind(notFloat);
#ifdef ASSERT
{
Label L;
__ cmpl(rdx, JVM_CONSTANT_Integer);
__ jcc(Assembler::equal, L);
// String and Object are rewritten to fast_aldc
__ stop("unexpected tag type in ldc");
__ bind(L);
}
#endif
// itos JVM_CONSTANT_Integer only
__ cmpl(rdx, JVM_CONSTANT_Integer);
__ jccb(Assembler::notEqual, notInt);
// itos
__ movl(rax, Address(rcx, rbx, Address::times_ptr, base_offset));
__ push(itos);
__ jmp(Done);
// assume the tag is for condy; if not, the VM runtime will tell us
__ bind(notInt);
condy_helper(Done);
__ bind(Done);
}
@ -487,6 +486,7 @@ void TemplateTable::fast_aldc(bool wide) {
Register result = rax;
Register tmp = rdx;
Register rarg = NOT_LP64(rcx) LP64_ONLY(c_rarg1);
int index_size = wide ? sizeof(u2) : sizeof(u1);
Label resolved;
@ -496,17 +496,28 @@ void TemplateTable::fast_aldc(bool wide) {
assert_different_registers(result, tmp);
__ get_cache_index_at_bcp(tmp, 1, index_size);
__ load_resolved_reference_at_index(result, tmp);
__ testl(result, result);
__ testptr(result, result);
__ jcc(Assembler::notZero, resolved);
address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);
// first time invocation - must resolve first
__ movl(tmp, (int)bytecode());
__ call_VM(result, entry, tmp);
__ movl(rarg, (int)bytecode());
__ call_VM(result, entry, rarg);
__ bind(resolved);
{ // Check for the null sentinel.
// If we just called the VM, that already did the mapping for us,
// but it's harmless to retry.
Label notNull;
ExternalAddress null_sentinel((address)Universe::the_null_sentinel_addr());
__ movptr(tmp, null_sentinel);
__ cmpptr(tmp, result);
__ jccb(Assembler::notEqual, notNull);
__ xorptr(result, result); // NULL object reference
__ bind(notNull);
}
if (VerifyOops) {
__ verify_oop(result);
}
@ -514,7 +525,7 @@ void TemplateTable::fast_aldc(bool wide) {
void TemplateTable::ldc2_w() {
transition(vtos, vtos);
Label Long, Done;
Label notDouble, notLong, Done;
__ get_unsigned_2_byte_index_at_bcp(rbx, 1);
__ get_cpool_and_tags(rcx, rax);
@ -522,25 +533,143 @@ void TemplateTable::ldc2_w() {
const int tags_offset = Array<u1>::base_offset_in_bytes();
// get type
__ cmpb(Address(rax, rbx, Address::times_1, tags_offset),
JVM_CONSTANT_Double);
__ jccb(Assembler::notEqual, Long);
__ movzbl(rdx, Address(rax, rbx, Address::times_1, tags_offset));
__ cmpl(rdx, JVM_CONSTANT_Double);
__ jccb(Assembler::notEqual, notDouble);
// dtos
__ load_double(Address(rcx, rbx, Address::times_ptr, base_offset));
__ push(dtos);
__ jmpb(Done);
__ bind(Long);
__ jmp(Done);
__ bind(notDouble);
__ cmpl(rdx, JVM_CONSTANT_Long);
__ jccb(Assembler::notEqual, notLong);
// ltos
__ movptr(rax, Address(rcx, rbx, Address::times_ptr, base_offset + 0 * wordSize));
NOT_LP64(__ movptr(rdx, Address(rcx, rbx, Address::times_ptr, base_offset + 1 * wordSize)));
__ push(ltos);
__ jmp(Done);
__ bind(notLong);
condy_helper(Done);
__ bind(Done);
}
void TemplateTable::condy_helper(Label& Done) {
const Register obj = rax;
const Register off = rbx;
const Register flags = rcx;
const Register rarg = NOT_LP64(rcx) LP64_ONLY(c_rarg1);
__ movl(rarg, (int)bytecode());
call_VM(obj, CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc), rarg);
#ifndef _LP64
// borrow rdi from locals
__ get_thread(rdi);
__ get_vm_result_2(flags, rdi);
__ restore_locals();
#else
__ get_vm_result_2(flags, r15_thread);
#endif
// VMr = obj = base address to find primitive value to push
// VMr2 = flags = (tos, off) using format of CPCE::_flags
__ movl(off, flags);
__ andl(off, ConstantPoolCacheEntry::field_index_mask);
const Address field(obj, off, Address::times_1, 0*wordSize);
// What sort of thing are we loading?
__ shrl(flags, ConstantPoolCacheEntry::tos_state_shift);
__ andl(flags, ConstantPoolCacheEntry::tos_state_mask);
switch (bytecode()) {
case Bytecodes::_ldc:
case Bytecodes::_ldc_w:
{
// tos in (itos, ftos, stos, btos, ctos, ztos)
Label notInt, notFloat, notShort, notByte, notChar, notBool;
__ cmpl(flags, itos);
__ jcc(Assembler::notEqual, notInt);
// itos
__ movl(rax, field);
__ push(itos);
__ jmp(Done);
__ bind(notInt);
__ cmpl(flags, ftos);
__ jcc(Assembler::notEqual, notFloat);
// ftos
__ load_float(field);
__ push(ftos);
__ jmp(Done);
__ bind(notFloat);
__ cmpl(flags, stos);
__ jcc(Assembler::notEqual, notShort);
// stos
__ load_signed_short(rax, field);
__ push(stos);
__ jmp(Done);
__ bind(notShort);
__ cmpl(flags, btos);
__ jcc(Assembler::notEqual, notByte);
// btos
__ load_signed_byte(rax, field);
__ push(btos);
__ jmp(Done);
__ bind(notByte);
__ cmpl(flags, ctos);
__ jcc(Assembler::notEqual, notChar);
// ctos
__ load_unsigned_short(rax, field);
__ push(ctos);
__ jmp(Done);
__ bind(notChar);
__ cmpl(flags, ztos);
__ jcc(Assembler::notEqual, notBool);
// ztos
__ load_signed_byte(rax, field);
__ push(ztos);
__ jmp(Done);
__ bind(notBool);
break;
}
case Bytecodes::_ldc2_w:
{
Label notLong, notDouble;
__ cmpl(flags, ltos);
__ jcc(Assembler::notEqual, notLong);
// ltos
__ movptr(rax, field);
NOT_LP64(__ movptr(rdx, field.plus_disp(4)));
__ push(ltos);
__ jmp(Done);
__ bind(notLong);
__ cmpl(flags, dtos);
__ jcc(Assembler::notEqual, notDouble);
// dtos
__ load_double(field);
__ push(dtos);
__ jmp(Done);
__ bind(notDouble);
break;
}
default:
ShouldNotReachHere();
}
__ stop("bad ldc/condy");
}
void TemplateTable::locals_index(Register reg, int offset) {
__ load_unsigned_byte(reg, at_bcp(offset));
__ negptr(reg);

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
// Copyright (c) 1997, 2018, 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
@ -27,7 +27,7 @@
//----------REGISTER DEFINITION BLOCK------------------------------------------
// This information is used by the matcher and the register allocator to
// describe individual registers and classes of registers within the target
// archtecture.
// architecture.
register %{
//----------Architecture Description Register Definitions----------------------

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,6 @@
#include "misc_aix.hpp"
#include <dlfcn.h>
#include <sys/systemcfg.h>
// Handle to the libperfstat.
static void* g_libhandle = NULL;
@ -158,17 +157,6 @@ cid_t libperfstat::wpar_getcid() {
//////////////////// convenience functions, release-independent /////////////////////////////
// Excerpts from systemcfg.h definitions newer than AIX 5.3 (our oldest build platform)
#define PV_6 0x100000 /* Power PC 6 */
#define PV_6_1 0x100001 /* Power PC 6 DD1.x */
#define PV_7 0x200000 /* Power PC 7 */
#define PV_5_Compat 0x0F8000 /* Power PC 5 */
#define PV_6_Compat 0x108000 /* Power PC 6 */
#define PV_7_Compat 0x208000 /* Power PC 7 */
#define PV_8 0x300000 /* Power PC 8 */
#define PV_8_Compat 0x308000 /* Power PC 8 */
// Retrieve global cpu information.
bool libperfstat::get_cpuinfo(cpuinfo_t* pci) {
@ -191,7 +179,7 @@ bool libperfstat::get_cpuinfo(cpuinfo_t* pci) {
}
// Global cpu information.
strcpy (pci->description, psct.description);
strcpy(pci->description, psct.description);
pci->processorHZ = psct.processorHZ;
pci->ncpus = psct.ncpus;
for (int i = 0; i < 3; i++) {
@ -203,45 +191,6 @@ bool libperfstat::get_cpuinfo(cpuinfo_t* pci) {
pci->idle_clock_ticks = psct.idle;
pci->wait_clock_ticks = psct.wait;
// Get the processor version from _system_configuration.
switch (_system_configuration.version) {
case PV_8:
strcpy(pci->version, "Power PC 8");
break;
case PV_7:
strcpy(pci->version, "Power PC 7");
break;
case PV_6_1:
strcpy(pci->version, "Power PC 6 DD1.x");
break;
case PV_6:
strcpy(pci->version, "Power PC 6");
break;
case PV_5:
strcpy(pci->version, "Power PC 5");
break;
case PV_5_2:
strcpy(pci->version, "Power PC 5_2");
break;
case PV_5_3:
strcpy(pci->version, "Power PC 5_3");
break;
case PV_5_Compat:
strcpy(pci->version, "PV_5_Compat");
break;
case PV_6_Compat:
strcpy(pci->version, "PV_6_Compat");
break;
case PV_7_Compat:
strcpy(pci->version, "PV_7_Compat");
break;
case PV_8_Compat:
strcpy(pci->version, "PV_8_Compat");
break;
default:
strcpy(pci->version, "unknown");
}
return true;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -942,7 +942,6 @@ public:
int ncpus; // number of active logical processors
double loadavg[3]; // (1<<SBITS) times the average number of runnables processes during the last 1, 5 and 15 minutes.
// To calculate the load average, divide the numbers by (1<<SBITS). SBITS is defined in <sys/proc.h>.
char version[20]; // processor version from _system_configuration (sys/systemcfg.h)
unsigned long long user_clock_ticks; // raw total number of clock ticks spent in user mode
unsigned long long sys_clock_ticks; // raw total number of clock ticks spent in system mode
unsigned long long idle_clock_ticks; // raw total number of clock ticks spent idle
@ -965,7 +964,6 @@ public:
static bool get_partitioninfo(partitioninfo_t* ppi);
static bool get_cpuinfo(cpuinfo_t* pci);
static bool get_wparinfo(wparinfo_t* pwi);
};
#endif // OS_AIX_VM_LIBPERFSTAT_AIX_HPP

View File

@ -117,7 +117,7 @@ int mread_real_time(timebasestruct_t *t, size_t size_of_timebasestruct_t);
#if !defined(_AIXVERSION_610)
extern "C" int getthrds64(pid_t, struct thrdentry64*, int, tid64_t*, int);
extern "C" int getprocs64(procentry64*, int, fdsinfo*, int, pid_t*, int);
extern "C" int getargs (procsinfo*, int, char*, int);
extern "C" int getargs(procsinfo*, int, char*, int);
#endif
#define MAX_PATH (2 * K)
@ -130,6 +130,32 @@ extern "C" int getargs (procsinfo*, int, char*, int);
#define ERROR_MP_VMGETINFO_FAILED 102
#define ERROR_MP_VMGETINFO_CLAIMS_NO_SUPPORT_FOR_64K 103
// excerpts from systemcfg.h that might be missing on older os levels
#ifndef PV_5_Compat
#define PV_5_Compat 0x0F8000 /* Power PC 5 */
#endif
#ifndef PV_6
#define PV_6 0x100000 /* Power PC 6 */
#endif
#ifndef PV_6_1
#define PV_6_1 0x100001 /* Power PC 6 DD1.x */
#endif
#ifndef PV_6_Compat
#define PV_6_Compat 0x108000 /* Power PC 6 */
#endif
#ifndef PV_7
#define PV_7 0x200000 /* Power PC 7 */
#endif
#ifndef PV_7_Compat
#define PV_7_Compat 0x208000 /* Power PC 7 */
#endif
#ifndef PV_8
#define PV_8 0x300000 /* Power PC 8 */
#endif
#ifndef PV_8_Compat
#define PV_8_Compat 0x308000 /* Power PC 8 */
#endif
static address resolve_function_descriptor_to_code_pointer(address p);
static void vmembk_print_on(outputStream* os);
@ -1443,17 +1469,48 @@ void os::print_memory_info(outputStream* st) {
// Get a string for the cpuinfo that is a summary of the cpu type
void os::get_summary_cpu_info(char* buf, size_t buflen) {
// This looks good
libperfstat::cpuinfo_t ci;
if (libperfstat::get_cpuinfo(&ci)) {
strncpy(buf, ci.version, buflen);
} else {
strncpy(buf, "AIX", buflen);
// read _system_configuration.version
switch (_system_configuration.version) {
case PV_8:
strncpy(buf, "Power PC 8", buflen);
break;
case PV_7:
strncpy(buf, "Power PC 7", buflen);
break;
case PV_6_1:
strncpy(buf, "Power PC 6 DD1.x", buflen);
break;
case PV_6:
strncpy(buf, "Power PC 6", buflen);
break;
case PV_5:
strncpy(buf, "Power PC 5", buflen);
break;
case PV_5_2:
strncpy(buf, "Power PC 5_2", buflen);
break;
case PV_5_3:
strncpy(buf, "Power PC 5_3", buflen);
break;
case PV_5_Compat:
strncpy(buf, "PV_5_Compat", buflen);
break;
case PV_6_Compat:
strncpy(buf, "PV_6_Compat", buflen);
break;
case PV_7_Compat:
strncpy(buf, "PV_7_Compat", buflen);
break;
case PV_8_Compat:
strncpy(buf, "PV_8_Compat", buflen);
break;
default:
strncpy(buf, "unknown", buflen);
}
}
void os::pd_print_cpu_info(outputStream* st, char* buf, size_t buflen) {
// Nothing to do beyond what os::print_cpu_info() does.
// Nothing to do beyond of what os::print_cpu_info() does.
}
static void print_signal_handler(outputStream* st, int sig,
@ -4242,48 +4299,6 @@ int os::fork_and_exec(char* cmd) {
return -1;
}
// is_headless_jre()
//
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
// in order to report if we are running in a headless jre.
//
// Since JDK8 xawt/libmawt.so is moved into the same directory
// as libawt.so, and renamed libawt_xawt.so
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt.so";
const char *new_xawtstr = "/libawt_xawt.so";
char *p;
// Get path to libjvm.so
os::jvm_path(buf, sizeof(buf));
// Get rid of libjvm.so
p = strrchr(buf, '/');
if (p == NULL) return false;
else *p = '\0';
// Get rid of client or server
p = strrchr(buf, '/');
if (p == NULL) return false;
else *p = '\0';
// check xawt/libmawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
// check libawt_xawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
}
// Get the default path to the core file
// Returns the length of the string
int os::get_core_path(char* buffer, size_t bufferSize) {

View File

@ -3894,59 +3894,6 @@ int os::fork_and_exec(char* cmd) {
}
}
// is_headless_jre()
//
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
// in order to report if we are running in a headless jre
//
// Since JDK8 xawt/libmawt.so was moved into the same directory
// as libawt.so, and renamed libawt_xawt.so
//
bool os::is_headless_jre() {
#ifdef __APPLE__
// We no longer build headless-only on Mac OS X
return false;
#else
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt" JNI_LIB_SUFFIX;
const char *new_xawtstr = "/libawt_xawt" JNI_LIB_SUFFIX;
char *p;
// Get path to libjvm.so
os::jvm_path(buf, sizeof(buf));
// Get rid of libjvm.so
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// Get rid of client or server
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// check xawt/libmawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
// check libawt_xawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
#endif
}
// Get the default path to the core file
// Returns the length of the string
int os::get_core_path(char* buffer, size_t bufferSize) {

View File

@ -5690,54 +5690,6 @@ int os::fork_and_exec(char* cmd) {
}
}
// is_headless_jre()
//
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
// in order to report if we are running in a headless jre
//
// Since JDK8 xawt/libmawt.so was moved into the same directory
// as libawt.so, and renamed libawt_xawt.so
//
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt.so";
const char *new_xawtstr = "/libawt_xawt.so";
char *p;
// Get path to libjvm.so
os::jvm_path(buf, sizeof(buf));
// Get rid of libjvm.so
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// Get rid of client or server
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// check xawt/libmawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
// check libawt_xawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
}
// Get the default path to the core file
// Returns the length of the string
int os::get_core_path(char* buffer, size_t bufferSize) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2018, 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
@ -147,13 +147,26 @@ static void save_memory_to_file(char* addr, size_t size) {
// which is always a local file system and is sometimes a RAM based file
// system.
// return the user specific temporary directory name.
//
// If containerized process, get dirname of
// /proc/{vmid}/root/tmp/{PERFDATA_NAME_user}
// otherwise /tmp/{PERFDATA_NAME_user}
//
// the caller is expected to free the allocated memory.
//
static char* get_user_tmp_dir(const char* user) {
#define TMP_BUFFER_LEN (4+22)
static char* get_user_tmp_dir(const char* user, int vmid, int nspid) {
char buffer[TMP_BUFFER_LEN];
char* tmpdir = (char *)os::get_temp_directory();
assert(strlen(tmpdir) == 4, "No longer using /tmp - update buffer size");
if (nspid != -1) {
jio_snprintf(buffer, TMP_BUFFER_LEN, "/proc/%d/root%s", vmid, tmpdir);
tmpdir = buffer;
}
const char* tmpdir = os::get_temp_directory();
const char* perfdir = PERFDATA_NAME;
size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 3;
char* dirname = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
@ -502,7 +515,10 @@ static char* get_user_name(uid_t uid) {
//
// the caller is expected to free the allocated memory.
//
static char* get_user_name_slow(int vmid, TRAPS) {
// If nspid != -1, look in /proc/{vmid}/root/tmp for directories
// containing nspid, otherwise just look for vmid in /tmp
//
static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
// short circuit the directory search if the process doesn't even exist.
if (kill(vmid, 0) == OS_ERR) {
@ -518,8 +534,19 @@ static char* get_user_name_slow(int vmid, TRAPS) {
// directory search
char* oldest_user = NULL;
time_t oldest_ctime = 0;
char buffer[TMP_BUFFER_LEN];
int searchpid;
char* tmpdirname = (char *)os::get_temp_directory();
assert(strlen(tmpdirname) == 4, "No longer using /tmp - update buffer size");
const char* tmpdirname = os::get_temp_directory();
if (nspid == -1) {
searchpid = vmid;
}
else {
jio_snprintf(buffer, MAXPATHLEN, "/proc/%d/root%s", vmid, tmpdirname);
tmpdirname = buffer;
searchpid = nspid;
}
// open the temp directory
DIR* tmpdirp = os::opendir(tmpdirname);
@ -530,7 +557,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
}
// for each entry in the directory that matches the pattern hsperfdata_*,
// open the directory and check if the file for the given vmid exists.
// open the directory and check if the file for the given vmid or nspid exists.
// The file with the expected name and the latest creation date is used
// to determine the user name for the process id.
//
@ -575,7 +602,7 @@ static char* get_user_name_slow(int vmid, TRAPS) {
errno = 0;
while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) {
if (filename_to_pid(udentry->d_name) == vmid) {
if (filename_to_pid(udentry->d_name) == searchpid) {
struct stat statbuf;
int result;
@ -626,10 +653,51 @@ static char* get_user_name_slow(int vmid, TRAPS) {
return(oldest_user);
}
// Determine if the vmid is the parent pid
// for a child in a PID namespace.
// return the namespace pid if so, otherwise -1
static int get_namespace_pid(int vmid) {
char fname[24];
int retpid = -1;
snprintf(fname, sizeof(fname), "/proc/%d/status", vmid);
FILE *fp = fopen(fname, "r");
if (fp) {
int pid, nspid;
int ret;
while (!feof(fp)) {
ret = fscanf(fp, "NSpid: %d %d", &pid, &nspid);
if (ret == 1) {
break;
}
if (ret == 2) {
retpid = nspid;
break;
}
for (;;) {
int ch = fgetc(fp);
if (ch == EOF || ch == (int)'\n') break;
}
}
fclose(fp);
}
return retpid;
}
// return the name of the user that owns the JVM indicated by the given vmid.
//
static char* get_user_name(int vmid, TRAPS) {
return get_user_name_slow(vmid, THREAD);
static char* get_user_name(int vmid, int *nspid, TRAPS) {
char *result = get_user_name_slow(vmid, *nspid, THREAD);
// If we are examining a container process without PID namespaces enabled
// we need to use /proc/{pid}/root/tmp to find hsperfdata files.
if (result == NULL) {
result = get_user_name_slow(vmid, vmid, THREAD);
// Enable nspid logic going forward
if (result != NULL) *nspid = vmid;
}
return result;
}
// return the file name of the backing store file for the named
@ -637,13 +705,15 @@ static char* get_user_name(int vmid, TRAPS) {
//
// the caller is expected to free the allocated memory.
//
static char* get_sharedmem_filename(const char* dirname, int vmid) {
static char* get_sharedmem_filename(const char* dirname, int vmid, int nspid) {
int pid = (nspid == -1) ? vmid : nspid;
// add 2 for the file separator and a null terminator.
size_t nbytes = strlen(dirname) + UINT_CHARS + 2;
char* name = NEW_C_HEAP_ARRAY(char, nbytes, mtInternal);
snprintf(name, nbytes, "%s/%d", dirname, vmid);
snprintf(name, nbytes, "%s/%d", dirname, pid);
return name;
}
@ -940,8 +1010,8 @@ static char* mmap_create_shared(size_t size) {
if (user_name == NULL)
return NULL;
char* dirname = get_user_tmp_dir(user_name);
char* filename = get_sharedmem_filename(dirname, vmid);
char* dirname = get_user_tmp_dir(user_name, vmid, -1);
char* filename = get_sharedmem_filename(dirname, vmid, -1);
// get the short filename
char* short_filename = strrchr(filename, '/');
@ -1088,8 +1158,11 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
"Illegal access mode");
}
// determine if vmid is for a containerized process
int nspid = get_namespace_pid(vmid);
if (user == NULL || strlen(user) == 0) {
luser = get_user_name(vmid, CHECK);
luser = get_user_name(vmid, &nspid, CHECK);
}
else {
luser = user;
@ -1100,7 +1173,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
"Could not map vmid to user Name");
}
char* dirname = get_user_tmp_dir(luser);
char* dirname = get_user_tmp_dir(luser, vmid, nspid);
// since we don't follow symbolic links when creating the backing
// store file, we don't follow them when attaching either.
@ -1114,7 +1187,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
"Process not found");
}
char* filename = get_sharedmem_filename(dirname, vmid);
char* filename = get_sharedmem_filename(dirname, vmid, nspid);
// copy heap memory to resource memory. the open_sharedmem_file
// method below need to use the filename, but could throw an

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "memory/filemap.hpp"
#include "memory/metaspaceShared.hpp"
#include "runtime/arguments.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"
@ -153,8 +153,7 @@ void VMError::check_failing_cds_access(outputStream* st, const void* siginfo) {
if (si->si_signo == SIGBUS || si->si_signo == SIGSEGV) {
const void* const fault_addr = si->si_addr;
if (fault_addr != NULL) {
FileMapInfo* const mapinfo = FileMapInfo::current_info();
if (mapinfo->is_in_shared_space(fault_addr)) {
if (MetaspaceShared::is_in_shared_metaspace(fault_addr)) {
st->print("Error accessing class data sharing archive. "
"Mapped file inaccessible during execution, possible disk/network problem.");
}

View File

@ -5366,54 +5366,6 @@ int os::fork_and_exec(char* cmd) {
}
}
// is_headless_jre()
//
// Test for the existence of xawt/libmawt.so or libawt_xawt.so
// in order to report if we are running in a headless jre
//
// Since JDK8 xawt/libmawt.so was moved into the same directory
// as libawt.so, and renamed libawt_xawt.so
//
bool os::is_headless_jre() {
struct stat statbuf;
char buf[MAXPATHLEN];
char libmawtpath[MAXPATHLEN];
const char *xawtstr = "/xawt/libmawt.so";
const char *new_xawtstr = "/libawt_xawt.so";
char *p;
// Get path to libjvm.so
os::jvm_path(buf, sizeof(buf));
// Get rid of libjvm.so
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// Get rid of client or server
p = strrchr(buf, '/');
if (p == NULL) {
return false;
} else {
*p = '\0';
}
// check xawt/libmawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
// check libawt_xawt.so
strcpy(libmawtpath, buf);
strcat(libmawtpath, new_xawtstr);
if (::stat(libmawtpath, &statbuf) == 0) return false;
return true;
}
size_t os::write(int fd, const void *buf, unsigned int nBytes) {
size_t res;
RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res);

View File

@ -5262,9 +5262,6 @@ LONG WINAPI os::win32::serialize_fault_filter(struct _EXCEPTION_POINTERS* e) {
return EXCEPTION_CONTINUE_SEARCH;
}
// We don't build a headless jre for Windows
bool os::is_headless_jre() { return false; }
static jint initSock() {
WSADATA wsadata;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -23,7 +23,7 @@
*/
#include "precompiled.hpp"
#include "memory/filemap.hpp"
#include "memory/metaspaceShared.hpp"
#include "runtime/arguments.hpp"
#include "runtime/os.hpp"
#include "runtime/thread.hpp"
@ -58,8 +58,7 @@ void VMError::check_failing_cds_access(outputStream* st, const void* siginfo) {
er->NumberParameters >= 2) {
const void* const fault_addr = (const void*) er->ExceptionInformation[1];
if (fault_addr != NULL) {
FileMapInfo* const mapinfo = FileMapInfo::current_info();
if (mapinfo->is_in_shared_space(fault_addr)) {
if (MetaspaceShared::is_in_shared_metaspace(fault_addr)) {
st->print("Error accessing class data sharing archive. "
"Mapped file inaccessible during execution, possible disk/network problem.");
}

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -111,6 +111,10 @@ void os::Aix::ucontext_set_pc(ucontext_t* uc, address new_pc) {
uc->uc_mcontext.jmp_context.iar = (uint64_t) new_pc;
}
static address ucontext_get_lr(const ucontext_t * uc) {
return (address)uc->uc_mcontext.jmp_context.lr;
}
ExtendedPC os::fetch_frame_from_context(const void* ucVoid,
intptr_t** ret_sp, intptr_t** ret_fp) {
@ -167,7 +171,8 @@ bool os::Aix::get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t* u
return false;
} else {
intptr_t* sp = os::Aix::ucontext_get_sp(uc);
*fr = frame(sp, (address)*sp);
address lr = ucontext_get_lr(uc);
*fr = frame(sp, lr);
if (!fr->is_java_frame()) {
assert(fr->safe_for_sender(thread), "Safety check");
assert(!fr->is_first_frame(), "Safety check");

View File

@ -279,11 +279,11 @@
address os::current_stack_pointer() {
#if defined(__clang__) || defined(__llvm__)
register void *esp;
__asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
return (address) esp;
#elif defined(SPARC_WORKS)
register void *esp;
__asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp));
__asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp));
return (address) ((char*)esp + sizeof(long)*2);
#else
register void *esp __asm__ (SPELL_REG_SP);
@ -415,7 +415,7 @@ frame os::get_sender_for_C_frame(frame* fr) {
intptr_t* _get_previous_fp() {
#if defined(SPARC_WORKS) || defined(__clang__) || defined(__llvm__)
register intptr_t **ebp;
__asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp));
__asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp));
#else
register intptr_t **ebp __asm__ (SPELL_REG_FP);
#endif

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -121,6 +121,10 @@ void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
uc->uc_mcontext.regs->nip = (unsigned long)pc;
}
static address ucontext_get_lr(const ucontext_t * uc) {
return (address)uc->uc_mcontext.regs->link;
}
intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) {
return (intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/];
}
@ -178,9 +182,9 @@ bool os::Linux::get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t*
// the frame is complete.
return false;
} else {
intptr_t* fp = os::Linux::ucontext_get_fp(uc);
intptr_t* sp = os::Linux::ucontext_get_sp(uc);
*fr = frame(sp, (address)*sp);
address lr = ucontext_get_lr(uc);
*fr = frame(sp, lr);
if (!fr->is_java_frame()) {
assert(fr->safe_for_sender(thread), "Safety check");
assert(!fr->is_first_frame(), "Safety check");

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2017 SAP SE. All rights reserved.
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -108,6 +108,10 @@ void os::Linux::ucontext_set_pc(ucontext_t * uc, address pc) {
uc->uc_mcontext.psw.addr = (unsigned long)pc;
}
static address ucontext_get_lr(const ucontext_t * uc) {
return (address)uc->uc_mcontext.gregs[14/*LINK*/];
}
intptr_t* os::Linux::ucontext_get_sp(const ucontext_t * uc) {
return (intptr_t*)uc->uc_mcontext.gregs[15/*REG_SP*/];
}
@ -165,9 +169,9 @@ bool os::Linux::get_frame_at_stack_banging_point(JavaThread* thread, ucontext_t*
// the frame is complete.
return false;
} else {
intptr_t* fp = os::Linux::ucontext_get_fp(uc);
intptr_t* sp = os::Linux::ucontext_get_sp(uc);
*fr = frame(sp, (address)*sp);
address lr = ucontext_get_lr(uc);
*fr = frame(sp, lr);
if (!fr->is_java_frame()) {
assert(fr->safe_for_sender(thread), "Safety check");
assert(!fr->is_first_frame(), "Safety check");

View File

@ -874,6 +874,8 @@ void GraphBuilder::ScopeData::incr_num_returns() {
void GraphBuilder::load_constant() {
ciConstant con = stream()->get_constant();
if (con.basic_type() == T_ILLEGAL) {
// FIXME: an unresolved Dynamic constant can get here,
// and that should not terminate the whole compilation.
BAILOUT("could not resolve a constant");
} else {
ValueType* t = illegalType;
@ -893,11 +895,19 @@ void GraphBuilder::load_constant() {
ciObject* obj = con.as_object();
if (!obj->is_loaded()
|| (PatchALot && obj->klass() != ciEnv::current()->String_klass())) {
// A Class, MethodType, MethodHandle, or String.
// Unloaded condy nodes show up as T_ILLEGAL, above.
patch_state = copy_state_before();
t = new ObjectConstant(obj);
} else {
assert(obj->is_instance(), "must be java_mirror of klass");
t = new InstanceConstant(obj->as_instance());
// Might be a Class, MethodType, MethodHandle, or Dynamic constant
// result, which might turn out to be an array.
if (obj->is_null_object())
t = objectNull;
else if (obj->is_array())
t = new ArrayConstant(obj->as_array());
else
t = new InstanceConstant(obj->as_instance());
}
break;
}

View File

@ -584,8 +584,34 @@ ciConstant ciEnv::get_constant_by_index_impl(const constantPoolHandle& cpool,
int index = pool_index;
if (cache_index >= 0) {
assert(index < 0, "only one kind of index at a time");
index = cpool->object_to_cp_index(cache_index);
oop obj = cpool->resolved_references()->obj_at(cache_index);
if (obj != NULL) {
if (obj == Universe::the_null_sentinel()) {
return ciConstant(T_OBJECT, get_object(NULL));
}
BasicType bt = T_OBJECT;
if (cpool->tag_at(index).is_dynamic_constant())
bt = FieldType::basic_type(cpool->uncached_signature_ref_at(index));
if (is_reference_type(bt)) {
} else {
// we have to unbox the primitive value
if (!is_java_primitive(bt)) return ciConstant();
jvalue value;
BasicType bt2 = java_lang_boxing_object::get_value(obj, &value);
assert(bt2 == bt, "");
switch (bt2) {
case T_DOUBLE: return ciConstant(value.d);
case T_FLOAT: return ciConstant(value.f);
case T_LONG: return ciConstant(value.j);
case T_INT: return ciConstant(bt2, value.i);
case T_SHORT: return ciConstant(bt2, value.s);
case T_BYTE: return ciConstant(bt2, value.b);
case T_CHAR: return ciConstant(bt2, value.c);
case T_BOOLEAN: return ciConstant(bt2, value.z);
default: return ciConstant();
}
}
ciObject* ciobj = get_object(obj);
if (ciobj->is_array()) {
return ciConstant(T_ARRAY, ciobj);
@ -594,7 +620,6 @@ ciConstant ciEnv::get_constant_by_index_impl(const constantPoolHandle& cpool,
return ciConstant(T_OBJECT, ciobj);
}
}
index = cpool->object_to_cp_index(cache_index);
}
constantTag tag = cpool->tag_at(index);
if (tag.is_int()) {
@ -650,6 +675,8 @@ ciConstant ciEnv::get_constant_by_index_impl(const constantPoolHandle& cpool,
ciSymbol* signature = get_symbol(cpool->method_handle_signature_ref_at(index));
ciObject* ciobj = get_unloaded_method_handle_constant(callee, name, signature, ref_kind);
return ciConstant(T_OBJECT, ciobj);
} else if (tag.is_dynamic_constant()) {
return ciConstant();
} else {
ShouldNotReachHere();
return ciConstant();

View File

@ -721,6 +721,7 @@ class CompileReplay : public StackObj {
case JVM_CONSTANT_Float:
case JVM_CONSTANT_MethodHandle:
case JVM_CONSTANT_MethodType:
case JVM_CONSTANT_Dynamic:
case JVM_CONSTANT_InvokeDynamic:
if (tag != cp->tag_at(i).value()) {
report_error("tag mismatch: wrong class files?");

View File

@ -254,7 +254,8 @@ ciConstant ciBytecodeStream::get_constant() {
// constant.
constantTag ciBytecodeStream::get_constant_pool_tag(int index) const {
VM_ENTRY_MARK;
return _method->get_Method()->constants()->tag_at(index);
BasicType bt = _method->get_Method()->constants()->basic_type_for_constant_at(index);
return constantTag::ofBasicType(bt);
}
// ------------------------------------------------------------------

View File

@ -204,6 +204,21 @@ void ClassFileParser::parse_constant_pool_entries(const ClassFileStream* const s
}
break;
}
case JVM_CONSTANT_Dynamic : {
if (_major_version < Verifier::DYNAMICCONSTANT_MAJOR_VERSION) {
classfile_parse_error(
"Class file version does not support constant tag %u in class file %s",
tag, CHECK);
}
cfs->guarantee_more(5, CHECK); // bsm_index, nt, tag/access_flags
const u2 bootstrap_specifier_index = cfs->get_u2_fast();
const u2 name_and_type_index = cfs->get_u2_fast();
if (_max_bootstrap_specifier_index < (int) bootstrap_specifier_index) {
_max_bootstrap_specifier_index = (int) bootstrap_specifier_index; // collect for later
}
cp->dynamic_constant_at_put(index, bootstrap_specifier_index, name_and_type_index);
break;
}
case JVM_CONSTANT_InvokeDynamic : {
if (_major_version < Verifier::INVOKEDYNAMIC_MAJOR_VERSION) {
classfile_parse_error(
@ -536,6 +551,21 @@ void ClassFileParser::parse_constant_pool(const ClassFileStream* const stream,
ref_index, CHECK);
break;
}
case JVM_CONSTANT_Dynamic: {
const int name_and_type_ref_index =
cp->invoke_dynamic_name_and_type_ref_index_at(index);
check_property(valid_cp_range(name_and_type_ref_index, length) &&
cp->tag_at(name_and_type_ref_index).is_name_and_type(),
"Invalid constant pool index %u in class file %s",
name_and_type_ref_index, CHECK);
// bootstrap specifier index must be checked later,
// when BootstrapMethods attr is available
// Mark the constant pool as having a CONSTANT_Dynamic_info structure
cp->set_has_dynamic_constant();
break;
}
case JVM_CONSTANT_InvokeDynamic: {
const int name_and_type_ref_index =
cp->invoke_dynamic_name_and_type_ref_index_at(index);
@ -628,6 +658,27 @@ void ClassFileParser::parse_constant_pool(const ClassFileStream* const stream,
}
break;
}
case JVM_CONSTANT_Dynamic: {
const int name_and_type_ref_index =
cp->name_and_type_ref_index_at(index);
// already verified to be utf8
const int name_ref_index =
cp->name_ref_index_at(name_and_type_ref_index);
// already verified to be utf8
const int signature_ref_index =
cp->signature_ref_index_at(name_and_type_ref_index);
const Symbol* const name = cp->symbol_at(name_ref_index);
const Symbol* const signature = cp->symbol_at(signature_ref_index);
if (_need_verify) {
// CONSTANT_Dynamic's name and signature are verified above, when iterating NameAndType_info.
// Need only to be sure signature is non-zero length and the right type.
if (signature->utf8_length() == 0 ||
signature->byte_at(0) == JVM_SIGNATURE_FUNC) {
throwIllegalSignature("CONSTANT_Dynamic", name, signature, CHECK);
}
}
break;
}
case JVM_CONSTANT_InvokeDynamic:
case JVM_CONSTANT_Fieldref:
case JVM_CONSTANT_Methodref:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018, 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
@ -1292,7 +1292,7 @@ bool ClassLoaderDataGraph::do_unloading(BoolObjectClosure* is_alive_closure,
// Remove entries in the dictionary of live class loader that have
// initiated loading classes in a dead class loader.
if (data->dictionary() != NULL) {
data->dictionary()->do_unloading();
data->dictionary()->do_unloading(is_alive_closure);
}
// Walk a ModuleEntry's reads, and a PackageEntry's exports
// lists to determine if there are modules on those lists that are now

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -167,7 +167,7 @@ bool DictionaryEntry::contains_protection_domain(oop protection_domain) const {
for (ProtectionDomainEntry* current = pd_set_acquire();
current != NULL;
current = current->next()) {
if (current->protection_domain() == protection_domain) {
if (current->object_no_keepalive() == protection_domain) {
in_pd_set = true;
break;
}
@ -187,7 +187,7 @@ bool DictionaryEntry::contains_protection_domain(oop protection_domain) const {
for (ProtectionDomainEntry* current = pd_set_acquire();
current != NULL;
current = current->next()) {
if (current->protection_domain() == protection_domain) return true;
if (current->object_no_keepalive() == protection_domain) return true;
}
return false;
}
@ -212,8 +212,44 @@ void DictionaryEntry::add_protection_domain(Dictionary* dict, Handle protection_
}
}
// During class loading we may have cached a protection domain that has
// since been unreferenced, so this entry should be cleared.
void Dictionary::clean_cached_protection_domains(BoolObjectClosure* is_alive, DictionaryEntry* probe) {
assert_locked_or_safepoint(SystemDictionary_lock);
void Dictionary::do_unloading() {
ProtectionDomainEntry* current = probe->pd_set();
ProtectionDomainEntry* prev = NULL;
while (current != NULL) {
if (!is_alive->do_object_b(current->object_no_keepalive())) {
LogTarget(Debug, protectiondomain) lt;
if (lt.is_enabled()) {
ResourceMark rm;
// Print out trace information
LogStream ls(lt);
ls.print_cr("PD in set is not alive:");
ls.print("class loader: "); loader_data()->class_loader()->print_value_on(&ls);
ls.print(" protection domain: "); current->object_no_keepalive()->print_value_on(&ls);
ls.print(" loading: "); probe->instance_klass()->print_value_on(&ls);
ls.cr();
}
if (probe->pd_set() == current) {
probe->set_pd_set(current->next());
} else {
assert(prev != NULL, "should be set by alive entry");
prev->set_next(current->next());
}
ProtectionDomainEntry* to_delete = current;
current = current->next();
delete to_delete;
} else {
prev = current;
current = current->next();
}
}
}
void Dictionary::do_unloading(BoolObjectClosure* is_alive) {
assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
// The NULL class loader doesn't initiate loading classes from other class loaders
@ -239,6 +275,8 @@ void Dictionary::do_unloading() {
free_entry(probe);
continue;
}
// Clean pd_set
clean_cached_protection_domains(is_alive, probe);
p = probe->next_addr();
}
}
@ -412,6 +450,10 @@ void Dictionary::add_protection_domain(int index, unsigned int hash,
entry->add_protection_domain(this, protection_domain);
#ifdef ASSERT
assert(loader_data() != ClassLoaderData::the_null_class_loader_data(), "doesn't make sense");
#endif
assert(entry->contains_protection_domain(protection_domain()),
"now protection domain should be present");
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2018, 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
@ -53,6 +53,8 @@ class Dictionary : public Hashtable<InstanceKlass*, mtClass> {
DictionaryEntry* get_entry(int index, unsigned int hash, Symbol* name);
void clean_cached_protection_domains(BoolObjectClosure* is_alive, DictionaryEntry* probe);
protected:
static size_t entry_size();
public:
@ -84,7 +86,7 @@ public:
void remove_classes_in_error_state();
// Unload classes whose defining loaders are unloaded
void do_unloading();
void do_unloading(BoolObjectClosure* is_alive);
// Protection domains
InstanceKlass* find(unsigned int hash, Symbol* name, Handle protection_domain);
@ -189,7 +191,7 @@ class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
current != NULL;
current = current->_next) {
current->_pd_cache->protection_domain()->verify();
current->_pd_cache->object_no_keepalive()->verify();
}
}

View File

@ -1702,7 +1702,7 @@ class BacktraceBuilder: public StackObj {
method = mhandle();
}
_methods->short_at_put(_index, method->orig_method_idnum());
_methods->ushort_at_put(_index, method->orig_method_idnum());
_bcis->int_at_put(_index, Backtrace::merge_bci_and_version(bci, method->constants()->version()));
// Note:this doesn't leak symbols because the mirror in the backtrace keeps the
@ -1756,7 +1756,7 @@ class BacktraceIterator : public StackObj {
BacktraceElement next(Thread* thread) {
BacktraceElement e (Handle(thread, _mirrors->obj_at(_index)),
_methods->short_at(_index),
_methods->ushort_at(_index),
Backtrace::version_at(_bcis->int_at(_index)),
Backtrace::bci_at(_bcis->int_at(_index)),
_names->symbol_at(_index));
@ -1968,7 +1968,7 @@ void java_lang_Throwable::fill_in_stack_trace(Handle throwable, const methodHand
bool skip_throwableInit_check = false;
bool skip_hidden = !ShowHiddenFrames;
for (frame fr = thread->last_frame(); max_depth != total_count;) {
for (frame fr = thread->last_frame(); max_depth == 0 || max_depth != total_count;) {
Method* method = NULL;
int bci = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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
@ -52,14 +52,14 @@ void ProtectionDomainCacheTable::unlink(BoolObjectClosure* is_alive) {
ProtectionDomainCacheEntry** p = bucket_addr(i);
ProtectionDomainCacheEntry* entry = bucket(i);
while (entry != NULL) {
if (is_alive->do_object_b(entry->literal())) {
if (is_alive->do_object_b(entry->object_no_keepalive())) {
p = entry->next_addr();
} else {
LogTarget(Debug, protectiondomain) lt;
if (lt.is_enabled()) {
LogStream ls(lt);
ls.print("protection domain unlinked: ");
entry->literal()->print_value_on(&ls);
entry->object_no_keepalive()->print_value_on(&ls);
ls.cr();
}
*p = entry->next();
@ -87,7 +87,7 @@ void ProtectionDomainCacheTable::print_on(outputStream* st) const {
for (ProtectionDomainCacheEntry* probe = bucket(index);
probe != NULL;
probe = probe->next()) {
st->print_cr("%4d: protection_domain: " PTR_FORMAT, index, p2i(probe->literal()));
st->print_cr("%4d: protection_domain: " PTR_FORMAT, index, p2i(probe->object_no_keepalive()));
}
}
}
@ -96,8 +96,27 @@ void ProtectionDomainCacheTable::verify() {
verify_table<ProtectionDomainCacheEntry>("Protection Domain Table");
}
oop ProtectionDomainCacheEntry::object() {
return RootAccess<ON_PHANTOM_OOP_REF>::oop_load(literal_addr());
}
oop ProtectionDomainEntry::object() {
return _pd_cache->object();
}
// The object_no_keepalive() call peeks at the phantomly reachable oop without
// keeping it alive. This is okay to do in the VM thread state if it is not
// leaked out to become strongly reachable.
oop ProtectionDomainCacheEntry::object_no_keepalive() {
return RootAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(literal_addr());
}
oop ProtectionDomainEntry::object_no_keepalive() {
return _pd_cache->object_no_keepalive();
}
void ProtectionDomainCacheEntry::verify() {
guarantee(oopDesc::is_oop(literal()), "must be an oop");
guarantee(oopDesc::is_oop(object_no_keepalive()), "must be an oop");
}
ProtectionDomainCacheEntry* ProtectionDomainCacheTable::get(Handle protection_domain) {
@ -113,7 +132,7 @@ ProtectionDomainCacheEntry* ProtectionDomainCacheTable::get(Handle protection_do
ProtectionDomainCacheEntry* ProtectionDomainCacheTable::find_entry(int index, Handle protection_domain) {
for (ProtectionDomainCacheEntry* e = bucket(index); e != NULL; e = e->next()) {
if (e->protection_domain() == protection_domain()) {
if (e->object_no_keepalive() == protection_domain()) {
return e;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2018, 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
@ -37,7 +37,8 @@
class ProtectionDomainCacheEntry : public HashtableEntry<oop, mtClass> {
friend class VMStructs;
public:
oop protection_domain() { return literal(); }
oop object();
oop object_no_keepalive();
ProtectionDomainCacheEntry* next() {
return (ProtectionDomainCacheEntry*)HashtableEntry<oop, mtClass>::next();
@ -112,6 +113,8 @@ class ProtectionDomainEntry :public CHeapObj<mtClass> {
}
ProtectionDomainEntry* next() { return _next; }
oop protection_domain() { return _pd_cache->protection_domain(); }
void set_next(ProtectionDomainEntry* entry) { _next = entry; }
oop object();
oop object_no_keepalive();
};
#endif // SHARE_VM_CLASSFILE_PROTECTIONDOMAINCACHE_HPP

View File

@ -2641,6 +2641,81 @@ static bool is_always_visible_class(oop mirror) {
InstanceKlass::cast(klass)->is_same_class_package(SystemDictionary::MethodHandle_klass())); // java.lang.invoke
}
// Return the Java mirror (java.lang.Class instance) for a single-character
// descriptor. This result, when available, is the same as produced by the
// heavier API point of the same name that takes a Symbol.
oop SystemDictionary::find_java_mirror_for_type(char signature_char) {
return java_lang_Class::primitive_mirror(char2type(signature_char));
}
// Find or construct the Java mirror (java.lang.Class instance) for a
// for the given field type signature, as interpreted relative to the
// given class loader. Handles primitives, void, references, arrays,
// and all other reflectable types, except method types.
// N.B. Code in reflection should use this entry point.
Handle SystemDictionary::find_java_mirror_for_type(Symbol* signature,
Klass* accessing_klass,
Handle class_loader,
Handle protection_domain,
SignatureStream::FailureMode failure_mode,
TRAPS) {
Handle empty;
assert(accessing_klass == NULL || (class_loader.is_null() && protection_domain.is_null()),
"one or the other, or perhaps neither");
Symbol* type = signature;
// What we have here must be a valid field descriptor,
// and all valid field descriptors are supported.
// Produce the same java.lang.Class that reflection reports.
if (type->utf8_length() == 1) {
// It's a primitive. (Void has a primitive mirror too.)
char ch = (char) type->byte_at(0);
assert(is_java_primitive(char2type(ch)) || ch == 'V', "");
return Handle(THREAD, find_java_mirror_for_type(ch));
} else if (FieldType::is_obj(type) || FieldType::is_array(type)) {
// It's a reference type.
if (accessing_klass != NULL) {
class_loader = Handle(THREAD, accessing_klass->class_loader());
protection_domain = Handle(THREAD, accessing_klass->protection_domain());
}
Klass* constant_type_klass;
if (failure_mode == SignatureStream::ReturnNull) {
constant_type_klass = resolve_or_null(type, class_loader, protection_domain,
CHECK_(empty));
} else {
bool throw_error = (failure_mode == SignatureStream::NCDFError);
constant_type_klass = resolve_or_fail(type, class_loader, protection_domain,
throw_error, CHECK_(empty));
}
if (constant_type_klass == NULL) {
return Handle(); // report failure this way
}
Handle mirror(THREAD, constant_type_klass->java_mirror());
// Check accessibility, emulating ConstantPool::verify_constant_pool_resolve.
if (accessing_klass != NULL) {
Klass* sel_klass = constant_type_klass;
bool fold_type_to_class = true;
LinkResolver::check_klass_accessability(accessing_klass, sel_klass,
fold_type_to_class, CHECK_(empty));
}
return mirror;
}
// Fall through to an error.
assert(false, "unsupported mirror syntax");
THROW_MSG_(vmSymbols::java_lang_InternalError(), "unsupported mirror syntax", empty);
}
// Ask Java code to find or construct a java.lang.invoke.MethodType for the given
// signature, as interpreted relative to the given class loader.
// Because of class loader constraints, all method handle usage must be
@ -2695,15 +2770,13 @@ Handle SystemDictionary::find_method_handle_type(Symbol* signature,
pts->obj_at_put(arg++, mirror);
// Check accessibility.
if (ss.is_object() && accessing_klass != NULL) {
if (!java_lang_Class::is_primitive(mirror) && accessing_klass != NULL) {
Klass* sel_klass = java_lang_Class::as_Klass(mirror);
mirror = NULL; // safety
// Emulate ConstantPool::verify_constant_pool_resolve.
if (sel_klass->is_objArray_klass())
sel_klass = ObjArrayKlass::cast(sel_klass)->bottom_klass();
if (sel_klass->is_instance_klass()) {
LinkResolver::check_klass_accessability(accessing_klass, sel_klass, CHECK_(empty));
}
bool fold_type_to_class = true;
LinkResolver::check_klass_accessability(accessing_klass, sel_klass,
fold_type_to_class, CHECK_(empty));
}
}
assert(arg == npts, "");
@ -2806,9 +2879,60 @@ Handle SystemDictionary::link_method_handle_constant(Klass* caller,
return Handle(THREAD, (oop) result.get_jobject());
}
// Ask Java to compute a constant by invoking a BSM given a Dynamic_info CP entry
Handle SystemDictionary::link_dynamic_constant(Klass* caller,
int condy_index,
Handle bootstrap_specifier,
Symbol* name,
Symbol* type,
TRAPS) {
Handle empty;
Handle bsm, info;
if (java_lang_invoke_MethodHandle::is_instance(bootstrap_specifier())) {
bsm = bootstrap_specifier;
} else {
assert(bootstrap_specifier->is_objArray(), "");
objArrayOop args = (objArrayOop) bootstrap_specifier();
assert(args->length() == 2, "");
bsm = Handle(THREAD, args->obj_at(0));
info = Handle(THREAD, args->obj_at(1));
}
guarantee(java_lang_invoke_MethodHandle::is_instance(bsm()),
"caller must supply a valid BSM");
// This should not happen. JDK code should take care of that.
if (caller == NULL) {
THROW_MSG_(vmSymbols::java_lang_InternalError(), "bad dynamic constant", empty);
}
Handle constant_name = java_lang_String::create_from_symbol(name, CHECK_(empty));
// Resolve the constant type in the context of the caller class
Handle type_mirror = find_java_mirror_for_type(type, caller, SignatureStream::NCDFError,
CHECK_(empty));
// call java.lang.invoke.MethodHandleNatives::linkConstantDyanmic(caller, condy_index, bsm, type, info)
JavaCallArguments args;
args.push_oop(Handle(THREAD, caller->java_mirror()));
args.push_int(condy_index);
args.push_oop(bsm);
args.push_oop(constant_name);
args.push_oop(type_mirror);
args.push_oop(info);
JavaValue result(T_OBJECT);
JavaCalls::call_static(&result,
SystemDictionary::MethodHandleNatives_klass(),
vmSymbols::linkDynamicConstant_name(),
vmSymbols::linkDynamicConstant_signature(),
&args, CHECK_(empty));
return Handle(THREAD, (oop) result.get_jobject());
}
// Ask Java code to find or construct a java.lang.invoke.CallSite for the given
// name and signature, as interpreted relative to the given class loader.
methodHandle SystemDictionary::find_dynamic_call_site_invoker(Klass* caller,
int indy_index,
Handle bootstrap_specifier,
Symbol* name,
Symbol* type,
@ -2820,17 +2944,10 @@ methodHandle SystemDictionary::find_dynamic_call_site_invoker(Klass* caller,
if (java_lang_invoke_MethodHandle::is_instance(bootstrap_specifier())) {
bsm = bootstrap_specifier;
} else {
assert(bootstrap_specifier->is_objArray(), "");
objArrayHandle args(THREAD, (objArrayOop) bootstrap_specifier());
int len = args->length();
assert(len >= 1, "");
bsm = Handle(THREAD, args->obj_at(0));
if (len > 1) {
objArrayOop args1 = oopFactory::new_objArray(SystemDictionary::Object_klass(), len-1, CHECK_(empty));
for (int i = 1; i < len; i++)
args1->obj_at_put(i-1, args->obj_at(i));
info = Handle(THREAD, args1);
}
objArrayOop args = (objArrayOop) bootstrap_specifier();
assert(args->length() == 2, "");
bsm = Handle(THREAD, args->obj_at(0));
info = Handle(THREAD, args->obj_at(1));
}
guarantee(java_lang_invoke_MethodHandle::is_instance(bsm()),
"caller must supply a valid BSM");
@ -2846,9 +2963,10 @@ methodHandle SystemDictionary::find_dynamic_call_site_invoker(Klass* caller,
objArrayHandle appendix_box = oopFactory::new_objArray_handle(SystemDictionary::Object_klass(), 1, CHECK_(empty));
assert(appendix_box->obj_at(0) == NULL, "");
// call java.lang.invoke.MethodHandleNatives::linkCallSite(caller, bsm, name, mtype, info, &appendix)
// call java.lang.invoke.MethodHandleNatives::linkCallSite(caller, indy_index, bsm, name, mtype, info, &appendix)
JavaCallArguments args;
args.push_oop(Handle(THREAD, caller->java_mirror()));
args.push_int(indy_index);
args.push_oop(bsm);
args.push_oop(method_name);
args.push_oop(method_type);

View File

@ -32,6 +32,7 @@
#include "oops/symbol.hpp"
#include "runtime/java.hpp"
#include "runtime/reflectionUtils.hpp"
#include "runtime/signature.hpp"
#include "utilities/hashtable.hpp"
#include "utilities/hashtable.inline.hpp"
@ -527,6 +528,28 @@ public:
static methodHandle find_method_handle_intrinsic(vmIntrinsics::ID iid,
Symbol* signature,
TRAPS);
// compute java_mirror (java.lang.Class instance) for a type ("I", "[[B", "LFoo;", etc.)
// Either the accessing_klass or the CL/PD can be non-null, but not both.
static Handle find_java_mirror_for_type(Symbol* signature,
Klass* accessing_klass,
Handle class_loader,
Handle protection_domain,
SignatureStream::FailureMode failure_mode,
TRAPS);
static Handle find_java_mirror_for_type(Symbol* signature,
Klass* accessing_klass,
SignatureStream::FailureMode failure_mode,
TRAPS) {
// callee will fill in CL/PD from AK, if they are needed
return find_java_mirror_for_type(signature, accessing_klass, Handle(), Handle(),
failure_mode, THREAD);
}
// fast short-cut for the one-character case:
static oop find_java_mirror_for_type(char signature_char);
// find a java.lang.invoke.MethodType object for a given signature
// (asks Java to compute it if necessary, except in a compiler thread)
static Handle find_method_handle_type(Symbol* signature,
@ -546,8 +569,17 @@ public:
Symbol* signature,
TRAPS);
// ask Java to compute a constant by invoking a BSM given a Dynamic_info CP entry
static Handle link_dynamic_constant(Klass* caller,
int condy_index,
Handle bootstrap_specifier,
Symbol* name,
Symbol* type,
TRAPS);
// ask Java to create a dynamic call site, while linking an invokedynamic op
static methodHandle find_dynamic_call_site_invoker(Klass* caller,
int indy_index,
Handle bootstrap_method,
Symbol* name,
Symbol* type,

View File

@ -2054,19 +2054,21 @@ void ClassVerifier::verify_ldc(
const constantPoolHandle& cp, u2 bci, TRAPS) {
verify_cp_index(bci, cp, index, CHECK_VERIFY(this));
constantTag tag = cp->tag_at(index);
unsigned int types;
unsigned int types = 0;
if (opcode == Bytecodes::_ldc || opcode == Bytecodes::_ldc_w) {
if (!tag.is_unresolved_klass()) {
types = (1 << JVM_CONSTANT_Integer) | (1 << JVM_CONSTANT_Float)
| (1 << JVM_CONSTANT_String) | (1 << JVM_CONSTANT_Class)
| (1 << JVM_CONSTANT_MethodHandle) | (1 << JVM_CONSTANT_MethodType);
| (1 << JVM_CONSTANT_MethodHandle) | (1 << JVM_CONSTANT_MethodType)
| (1 << JVM_CONSTANT_Dynamic);
// Note: The class file parser already verified the legality of
// MethodHandle and MethodType constants.
verify_cp_type(bci, index, cp, types, CHECK_VERIFY(this));
}
} else {
assert(opcode == Bytecodes::_ldc2_w, "must be ldc2_w");
types = (1 << JVM_CONSTANT_Double) | (1 << JVM_CONSTANT_Long);
types = (1 << JVM_CONSTANT_Double) | (1 << JVM_CONSTANT_Long)
| (1 << JVM_CONSTANT_Dynamic);
verify_cp_type(bci, index, cp, types, CHECK_VERIFY(this));
}
if (tag.is_string() && cp->is_pseudo_string_at(index)) {
@ -2101,6 +2103,30 @@ void ClassVerifier::verify_ldc(
current_frame->push_stack(
VerificationType::reference_type(
vmSymbols::java_lang_invoke_MethodType()), CHECK_VERIFY(this));
} else if (tag.is_dynamic_constant()) {
Symbol* constant_type = cp->uncached_signature_ref_at(index);
if (!SignatureVerifier::is_valid_type_signature(constant_type)) {
class_format_error(
"Invalid type for dynamic constant in class %s referenced "
"from constant pool index %d", _klass->external_name(), index);
return;
}
assert(sizeof(VerificationType) == sizeof(uintptr_t),
"buffer type must match VerificationType size");
uintptr_t constant_type_buffer[2];
VerificationType* v_constant_type = (VerificationType*)constant_type_buffer;
SignatureStream sig_stream(constant_type, false);
int n = change_sig_to_verificationType(
&sig_stream, v_constant_type, CHECK_VERIFY(this));
int opcode_n = (opcode == Bytecodes::_ldc2_w ? 2 : 1);
if (n != opcode_n) {
// wrong kind of ldc; reverify against updated type mask
types &= ~(1 << JVM_CONSTANT_Dynamic);
verify_cp_type(bci, index, cp, types, CHECK_VERIFY(this));
}
for (int i = 0; i < n; i++) {
current_frame->push_stack(v_constant_type[i], CHECK_VERIFY(this));
}
} else {
/* Unreachable? verify_cp_type has already validated the cp type. */
verify_error(
@ -2665,7 +2691,7 @@ void ClassVerifier::verify_invoke_instructions(
// Make sure the constant pool item is the right type
u2 index = bcs->get_index_u2();
Bytecodes::Code opcode = bcs->raw_code();
unsigned int types;
unsigned int types = 0;
switch (opcode) {
case Bytecodes::_invokeinterface:
types = 1 << JVM_CONSTANT_InterfaceMethodref;

Some files were not shown because too many files have changed in this diff Show More