Merge
This commit is contained in:
commit
83e8947b90
3
.hgtags
3
.hgtags
@ -546,3 +546,6 @@ a535ba736cabc6886acdff36de3a096c46e5ddc5 jdk-13+8
|
||||
4ce47bc1fb92cf94c6e3d1f49d582f02dcb851ab jdk-12+32
|
||||
c081f3ea6b9300265a4a34e38f970b1e3ddaae9f jdk-13+9
|
||||
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33
|
||||
8e069f7b4fabfe05d9f500783e6d56cb0196d25c jdk-13+10
|
||||
21ea4076a275a0f498afa517e9ee1b94a9cf0255 jdk-13+11
|
||||
1d7aec80147a6d92b101a76aef92f3ddc88bedf4 jdk-13+12
|
||||
|
@ -237,7 +237,7 @@
|
||||
<p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
|
||||
<pre><code>sudo yum groupinstall "Development Tools"</code></pre>
|
||||
<h3 id="aix">AIX</h3>
|
||||
<p>The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also supported. See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
|
||||
<h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
|
||||
<p>Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.</p>
|
||||
<table>
|
||||
@ -373,8 +373,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
|
||||
<p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
<p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
|
||||
<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
|
||||
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
|
||||
<p>Paradoxically, building the JDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not, however, have to be a JDK built directly from the source code available in the OpenJDK Community. If you are porting the JDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
|
||||
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, the JDK should be able to "build itself", so an up-to-date build of the current JDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
|
||||
|
@ -295,9 +295,9 @@ sudo yum groupinstall "Development Tools"
|
||||
|
||||
### AIX
|
||||
|
||||
The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also
|
||||
supported. See the [OpenJDK PowerPC Port Status Page](
|
||||
http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of AIX are supported.
|
||||
|
||||
## Native Compiler (Toolchain) Requirements
|
||||
|
||||
@ -419,11 +419,10 @@ https://stackoverflow.com/questions/10888391) for other suggestions.
|
||||
|
||||
### IBM XL C/C++
|
||||
|
||||
The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for
|
||||
AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017`.
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of XLC are supported.
|
||||
|
||||
See the [OpenJDK PowerPC Port Status Page](
|
||||
http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
|
||||
|
||||
## Boot JDK Requirements
|
||||
|
||||
|
@ -1,24 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="generator" content="pandoc">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||||
<title>Testing the JDK</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
|
||||
<style type="text/css">code{white-space: pre;}</style>
|
||||
<link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
<style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
|
||||
</head>
|
||||
<body>
|
||||
<header id="title-block-header">
|
||||
<header>
|
||||
<h1 class="title">Testing the JDK</h1>
|
||||
</header>
|
||||
<nav id="TOC">
|
||||
@ -124,7 +119,7 @@ TEST FAILURE</code></pre>
|
||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||
<h4 id="jobs-1">JOBS</h4>
|
||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than 12.</p>
|
||||
<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em> (for sparc, if more than 16 cpus, then <em>number of CPU cores/5</em>, otherwise <em>number of CPU cores/4</em>), but never more than <em>memory size in GB/2</em>.</p>
|
||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
||||
<p>Defaults to 4.</p>
|
||||
|
@ -252,8 +252,9 @@ Please note that running with JCov reporting can be very memory intensive.
|
||||
The test concurrency (`-concurrency`).
|
||||
|
||||
Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but
|
||||
never more than 12.
|
||||
JOBS, except for Hotspot, where the default is *number of CPU cores/2* (for
|
||||
sparc, if more than 16 cpus, then *number of CPU cores/5*, otherwise *number of
|
||||
CPU cores/4*), but never more than *memory size in GB/2*.
|
||||
|
||||
#### TIMEOUT_FACTOR
|
||||
The timeout factor (`-timeoutFactor`).
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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,7 +38,7 @@ $(eval $(call IncludeCustomExtension, CompileJavaModules.gmk))
|
||||
################################################################################
|
||||
# Module specific build settings
|
||||
|
||||
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
|
||||
java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-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
|
||||
|
||||
@ -79,7 +79,7 @@ java.datatransfer_COPY += flavormap.properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
|
||||
java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility \
|
||||
'-Xdoclint/package:java.*,javax.*' -Xlint:exports \
|
||||
--doclint-format html4
|
||||
java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
|
||||
@ -220,15 +220,15 @@ java.scripting_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
|
||||
java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
|
||||
java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -249,7 +249,7 @@ java.sql_SETUP := GENERATE_JDKBYTECODE_NOWARNINGS
|
||||
|
||||
################################################################################
|
||||
|
||||
java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
java.sql.rowset_CLEAN_FILES += $(wildcard \
|
||||
$(TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
|
||||
$(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
|
||||
@ -263,14 +263,14 @@ java.rmi_CLEAN_FILES += $(wildcard \
|
||||
|
||||
################################################################################
|
||||
|
||||
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
|
||||
java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility \
|
||||
'-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
|
||||
javax.xml.transform javax.xml.validation javax.xml.xpath)'
|
||||
java.xml_CLEAN += .properties
|
||||
|
||||
################################################################################
|
||||
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
||||
java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
|
||||
java.naming_CLEAN += jndiprovider.properties
|
||||
|
||||
################################################################################
|
||||
@ -279,7 +279,7 @@ java.security.jgss_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package
|
||||
|
||||
################################################################################
|
||||
|
||||
java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
|
||||
java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -461,6 +461,7 @@ jdk.internal.vm.compiler_EXCLUDES += \
|
||||
org.graalvm.compiler.debug.test \
|
||||
org.graalvm.compiler.graph.test \
|
||||
org.graalvm.compiler.hotspot.amd64.test \
|
||||
org.graalvm.compiler.hotspot.jdk9.test \
|
||||
org.graalvm.compiler.hotspot.lir.test \
|
||||
org.graalvm.compiler.hotspot.sparc.test \
|
||||
org.graalvm.compiler.hotspot.test \
|
||||
@ -538,8 +539,13 @@ jdk.jfr_ADD_JAVAC_FLAGS := -XDstringConcat=inline -Xlint:-exports
|
||||
################################################################################
|
||||
# If this is an imported module that has prebuilt classes, only compile
|
||||
# module-info.java.
|
||||
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
|
||||
$(MODULE)_INCLUDE_FILES := module-info.java
|
||||
ifneq ($(IMPORT_MODULES_CLASSES), )
|
||||
IMPORT_MODULE_DIR := $(IMPORT_MODULES_CLASSES)/$(MODULE)
|
||||
ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
|
||||
$(MODULE)_INCLUDE_FILES := module-info.java
|
||||
endif
|
||||
else
|
||||
IMPORT_MODULE_DIR :=
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
@ -645,13 +651,13 @@ endif
|
||||
# If this is an imported module, copy the pre built classes and resources into
|
||||
# the modules output dir
|
||||
|
||||
ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
|
||||
ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
|
||||
$(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
|
||||
$(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
|
||||
$(call CacheFind, $(IMPORT_MODULE_DIR))
|
||||
$(call MakeDir, $(@D))
|
||||
# Do not delete marker and build meta data files
|
||||
$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
|
||||
$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
|
||||
$(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/
|
||||
$(TOUCH) $@
|
||||
|
||||
TARGETS += $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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
|
||||
@ -26,6 +26,7 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
|
||||
ifeq ($(MODULE), )
|
||||
@ -37,7 +38,8 @@ $(eval $(call IncludeCustomExtension, CreateJmods.gmk))
|
||||
################################################################################
|
||||
|
||||
JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
|
||||
JMODS_TEMPDIR := $(SUPPORT_OUTPUTDIR)/jmods
|
||||
JMODS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jmods
|
||||
JMOD_FILE := $(MODULE).jmod
|
||||
|
||||
LIBS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(IMPORT_MODULES_LIBS))))
|
||||
@ -152,26 +154,27 @@ endif
|
||||
# to avoid false incremental rebuilds.
|
||||
ifeq ($(INTERIM_JMOD), true)
|
||||
DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
|
||||
INTERIM_MSG := interim$(SPACE)
|
||||
endif
|
||||
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||
|
||||
# Create jmods in a temp dir and then move them into place to keep the
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
$(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
|
||||
$(call LogWarn, Creating $(patsubst $(OUTPUTDIR)/%, %, $@))
|
||||
$(call MakeDir, $(JMODS_DIR) $(JMODS_TEMPDIR))
|
||||
$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/jmods/$(MODULE).jmod, \
|
||||
$(JMOD) create \
|
||||
--module-version $(VERSION_SHORT) \
|
||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||
--module-path $(JMODS_DIR) \
|
||||
$(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) \
|
||||
)
|
||||
$(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@
|
||||
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
WARN := Creating $(INTERIM_MSG)$(JMOD_FILE), \
|
||||
DEPS := $(DEPS), \
|
||||
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
||||
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
||||
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
))
|
||||
|
||||
TARGETS += $(JMODS_DIR)/$(MODULE).jmod
|
||||
TARGETS += $(create_$(JMOD_FILE))
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 1997, 2019, 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
|
||||
@ -26,6 +26,7 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
include ModuleTools.gmk
|
||||
include ProcessMarkdown.gmk
|
||||
@ -195,10 +196,13 @@ define setup_gengraph_dot_to_png
|
||||
|
||||
# For each module needing a graph, create a png file from the dot file
|
||||
# generated by the GenGraphs tool and store it in the target dir.
|
||||
$$($1_$2_PNG_TARGET): $$($1_GENGRAPHS_MARKER)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$($1_$2_DOT_SRC), \
|
||||
$$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC))
|
||||
$$(eval $$(call SetupExecute, gengraphs_png_$1_$2, \
|
||||
INFO := Running dot for module graphs for $2, \
|
||||
DEPS := $$(gengraphs_$1_TARGET), \
|
||||
OUTPUT_FILE := $$($1_$2_PNG_TARGET), \
|
||||
SUPPORT_DIR := $$($1_GENGRAPHS_DIR), \
|
||||
COMMAND := $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC), \
|
||||
))
|
||||
|
||||
$1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET)
|
||||
endef
|
||||
@ -336,18 +340,18 @@ define SetupApiDocsGenerationBody
|
||||
$1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \
|
||||
$$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module)))))
|
||||
|
||||
# Javadoc creates a lot of files but use index.html as a marker
|
||||
$$($1_TARGET_DIR)/index.html: $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) \
|
||||
$$($1_SOURCE_DEPS) $$($1_OVERVIEW)
|
||||
$$(call LogWarn, Generating $1 javadoc for \
|
||||
$$(words $$($1_ALL_MODULES)) modules)
|
||||
$$(call LogInfo, Javadoc modules: $$($1_ALL_MODULES))
|
||||
$$(call MakeDir, $$($1_TARGET_DIR))
|
||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1, \
|
||||
$$($1_JAVADOC_CMD) -d $$($1_TARGET_DIR) \
|
||||
$$($1_OPTIONS) $$($1_LOG_OPTION))
|
||||
$$(eval $$(call SetupExecute, javadoc_$1, \
|
||||
WARN := Generating $1 javadoc for $$(words $$($1_ALL_MODULES)) modules, \
|
||||
INFO := Javadoc modules: $$($1_ALL_MODULES), \
|
||||
DEPS := $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_SOURCE_DEPS) \
|
||||
$$($1_OVERVIEW), \
|
||||
OUTPUT_DIR := $$($1_TARGET_DIR), \
|
||||
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/docs, \
|
||||
COMMAND := $$($1_JAVADOC_CMD) -d $$($1_TARGET_DIR) $$($1_OPTIONS) \
|
||||
$$($1_LOG_OPTION), \
|
||||
))
|
||||
|
||||
$1_JAVADOC_TARGETS := $$($1_TARGET_DIR)/index.html
|
||||
$1_JAVADOC_TARGETS := $$(javadoc_$1_TARGET)
|
||||
|
||||
ifeq ($$(ENABLE_FULL_DOCS), true)
|
||||
# We have asked ModuleGraph to generate links to png files. Now we must
|
||||
@ -367,19 +371,18 @@ define SetupApiDocsGenerationBody
|
||||
$$(TOPDIR)/make/jdk/src/classes/build/tools/jigsaw/javadoc-graphs.properties
|
||||
|
||||
$1_GENGRAPHS_DIR := $$(SUPPORT_OUTPUTDIR)/docs/$1-gengraphs
|
||||
$1_GENGRAPHS_MARKER := $$($1_GENGRAPHS_DIR)/_gengraphs_run.marker
|
||||
|
||||
$$($1_GENGRAPHS_MARKER): $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS)
|
||||
$$(call LogInfo, Running gengraphs for $1 documentation)
|
||||
$$(call MakeDir, $$($1_GENGRAPHS_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_GENGRAPHS_DIR)/gengraphs, \
|
||||
$$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
|
||||
--dot-attributes $$(GENGRAPHS_PROPS) && \
|
||||
$$(TOUCH) $$($1_GENGRAPHS_MARKER))
|
||||
$$(eval $$(call SetupExecute, gengraphs_$1, \
|
||||
INFO := Running gengraphs for $1 documentation, \
|
||||
DEPS := $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS), \
|
||||
OUTPUT_DIR := $$($1_GENGRAPHS_DIR), \
|
||||
COMMAND := $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
|
||||
--dot-attributes $$(GENGRAPHS_PROPS), \
|
||||
))
|
||||
|
||||
# For each module needing a graph, create a png file from the dot file
|
||||
# generated by the GenGraphs tool and store it in the target dir.
|
||||
# They will depend on $1_GENGRAPHS_MARKER, and will be added to $1.
|
||||
# They will depend on gengraphs_$1_TARGET, and will be added to $1.
|
||||
$$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \
|
||||
$$(eval $$(call setup_gengraph_dot_to_png,$1,$$m)) \
|
||||
)
|
||||
|
@ -29,19 +29,21 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include $(TOPDIR)/make/ModuleTools.gmk
|
||||
|
||||
################################################################################
|
||||
|
||||
PACKAGES_ATTRIBUTE_TARGET := $(JDK_OUTPUTDIR)/_packages_attribute.done
|
||||
ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class)
|
||||
|
||||
$(PACKAGES_ATTRIBUTE_TARGET): $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES)
|
||||
$(call LogInfo, Optimizing the exploded image)
|
||||
$(call ExecuteWithLog, $@, $(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR))
|
||||
$(TOUCH) $@
|
||||
$(eval $(call SetupExecute, optimize_image, \
|
||||
INFO := Optimizing the exploded image, \
|
||||
DEPS := $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES), \
|
||||
OUTPUT_DIR := $(JDK_OUTPUTDIR), \
|
||||
COMMAND := $(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
TARGETS := $(PACKAGES_ATTRIBUTE_TARGET)
|
||||
TARGETS := $(optimize_image_TARGET)
|
||||
|
||||
################################################################################
|
||||
|
||||
|
100
make/Images.gmk
100
make/Images.gmk
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2019, 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,9 +27,9 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include Modules.gmk
|
||||
|
||||
TOOL_TARGETS :=
|
||||
JDK_TARGETS :=
|
||||
JRE_TARGETS :=
|
||||
|
||||
@ -56,9 +56,6 @@ BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
|
||||
|
||||
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
|
||||
|
||||
# Use this file inside the image as target for make rule
|
||||
JIMAGE_TARGET_FILE := release
|
||||
|
||||
JLINK_ORDER_RESOURCES := **module-info.class
|
||||
JLINK_JLI_CLASSES :=
|
||||
ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
|
||||
@ -88,40 +85,61 @@ ifeq ($(JLINK_KEEP_PACKAGED_MODULES), true)
|
||||
JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
|
||||
endif
|
||||
|
||||
$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(call LogWarn, Creating jdk image)
|
||||
$(RM) -r $(JDK_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
$(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
|
||||
$(JLINK_JDK_EXTRA_OPTS) \
|
||||
--output $(JDK_IMAGE_DIR) \
|
||||
)
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
$(call LogWarn, Creating CDS archive for jdk image)
|
||||
$(FIXPATH) $(JDK_IMAGE_DIR)/bin/java \
|
||||
-Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
|
||||
endif
|
||||
$(TOUCH) $@
|
||||
$(eval $(call SetupExecute, jlink_jdk, \
|
||||
WARN := Creating jdk image, \
|
||||
DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST), \
|
||||
OUTPUT_DIR := $(JDK_IMAGE_DIR), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
PRE_COMMAND := $(RM) -r $(JDK_IMAGE_DIR), \
|
||||
COMMAND := $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
|
||||
$(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR), \
|
||||
))
|
||||
|
||||
$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
|
||||
$(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
|
||||
$(call LogWarn, Creating legacy jre image)
|
||||
$(RM) -r $(JRE_IMAGE_DIR)
|
||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
$(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) \
|
||||
--output $(JRE_IMAGE_DIR) \
|
||||
)
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
$(call LogWarn, Creating CDS archive for jre image)
|
||||
$(FIXPATH) $(JRE_IMAGE_DIR)/bin/java \
|
||||
-Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
|
||||
endif
|
||||
$(TOUCH) $@
|
||||
JLINK_JDK_TARGETS := $(jlink_jdk)
|
||||
|
||||
TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
||||
TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
|
||||
$(eval $(call SetupExecute, jlink_jre, \
|
||||
WARN := Creating legacy jre image, \
|
||||
DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
|
||||
$(call DependOnVariable, JDK_MODULES_LIST), \
|
||||
OUTPUT_DIR := $(JDK_IMAGE_DIR), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
PRE_COMMAND := $(RM) -r $(JRE_IMAGE_DIR), \
|
||||
COMMAND := $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
|
||||
$(JLINK_JRE_EXTRA_OPTS) --output $(JRE_IMAGE_DIR), \
|
||||
))
|
||||
|
||||
JLINK_JRE_TARGETS := $(jlink_jre)
|
||||
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
CDS_ARCHIVE := bin/server/classes.jsa
|
||||
else
|
||||
CDS_ARCHIVE := lib/server/classes.jsa
|
||||
endif
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jdk, \
|
||||
WARN := Creating CDS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_archive_jdk)
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jre, \
|
||||
WARN := Creating CDS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_archive_jdk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# src.zip
|
||||
@ -244,11 +262,11 @@ $(eval $(call IncludeCustomExtension, Images-post.gmk))
|
||||
|
||||
################################################################################
|
||||
|
||||
$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
|
||||
$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
|
||||
$(JRE_TARGETS): $(JLINK_JRE_TARGETS)
|
||||
$(JDK_TARGETS): $(JLINK_JDK_TARGETS)
|
||||
|
||||
jdk: $(TOOL_JDK_TARGETS) $(JDK_TARGETS)
|
||||
jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)
|
||||
jdk: $(JLINK_JDK_TARGETS) $(JDK_TARGETS)
|
||||
jre: $(JLINK_JRE_TARGETS) $(JRE_TARGETS)
|
||||
symbols: $(SYMBOLS_TARGETS)
|
||||
|
||||
all: jdk jre symbols
|
||||
|
@ -456,7 +456,7 @@ define DeclareInterimJmodRecipe
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
|
||||
MODULE=$1 \
|
||||
JMODS_DIR=$(INTERIM_JMODS_DIR) \
|
||||
JMODS_TEMPDIR=$(INTERIM_JMODS_DIR)/temp \
|
||||
JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
|
||||
INTERIM_JMOD=true \
|
||||
)
|
||||
endef
|
||||
@ -1120,7 +1120,8 @@ ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \
|
||||
# file.
|
||||
|
||||
CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
|
||||
images make-support test-make bundles buildjdk test-results test-support
|
||||
images make-support test-make bundles buildjdk test-results test-support \
|
||||
support/images
|
||||
CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
|
||||
CLEAN_SUPPORT_DIRS += demos
|
||||
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
||||
@ -1170,6 +1171,9 @@ clean-support: clean-jdk
|
||||
|
||||
clean-test: clean-test-results clean-test-support
|
||||
|
||||
# When cleaning images, also clean the support/images directory.
|
||||
clean-images: clean-support/images
|
||||
|
||||
# Remove everything, including configure configuration. If the output
|
||||
# directory was created by configure and now becomes empty, remove it as well.
|
||||
dist-clean: clean
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2019, 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
|
||||
@ -29,6 +29,7 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include NativeCompilation.gmk
|
||||
include ToolsJdk.gmk
|
||||
|
||||
@ -47,17 +48,21 @@ ifeq ($(COMPILE_TYPE), cross)
|
||||
endif
|
||||
|
||||
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
|
||||
GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c
|
||||
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
|
||||
|
||||
BITS := $(OPENJDK_TARGET_CPU_BITS)
|
||||
|
||||
# Generate the C code for the program that will output the offset file.
|
||||
$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
|
||||
$(call LogInfo, Generating X11 wrapper data generator source code)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
|
||||
$(eval $(call SetupExecute, gensrc_generator, \
|
||||
INFO := Generating X11 wrapper data generator source code, \
|
||||
DEPS := $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK), \
|
||||
OUTPUT_FILE := $(GENERATOR_SOURCE_FILE), \
|
||||
COMMAND := $(TOOL_WRAPPERGENERATOR) gen_c_source $(GENERATOR_SOURCE_FILE) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS), \
|
||||
))
|
||||
|
||||
DATA_GENERATOR_INCLUDES := \
|
||||
-I$(TOPDIR)/src/hotspot/share/include \
|
||||
@ -75,7 +80,7 @@ DATA_GENERATOR_INCLUDES := \
|
||||
$(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
|
||||
PROGRAM := data_generator, \
|
||||
OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
|
||||
EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
|
||||
EXTRA_FILES := $(GENERATOR_SOURCE_FILE), \
|
||||
CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
|
||||
LDFLAGS := $(LDFLAGS_JDKEXE), \
|
||||
LIBS := $(X_LIBS), \
|
||||
@ -83,16 +88,19 @@ $(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
|
||||
))
|
||||
|
||||
# Run the executable to create the data file.
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
|
||||
$(call LogInfo, Generating X11 wrapper data files)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
|
||||
$(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
|
||||
$(eval $(call SetupExecute, run_wrappergen, \
|
||||
INFO := Generating X11 wrapper data files, \
|
||||
DEPS := $(BUILD_DATA_GENERATOR), \
|
||||
OUTPUT_FILE := $(WRAPPER_OUTPUT_FILE), \
|
||||
COMMAND := $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $(WRAPPER_OUTPUT_FILE), \
|
||||
))
|
||||
|
||||
wrapper-information: $(run_wrappergen)
|
||||
$(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
|
||||
$(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
|
||||
$(ECHO) updated them for $(BITS) bit platforms only.
|
||||
|
||||
TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
|
||||
TARGETS += $(run_wrappergen) wrapper-information
|
||||
|
||||
################################################################################
|
||||
|
||||
|
7
make/autoconf/configure
vendored
7
make/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2019, 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
|
||||
@ -78,9 +78,12 @@ autoconf_missing_help() {
|
||||
APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
|
||||
YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
|
||||
BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
|
||||
ZYPPER="`which zypper 2> /dev/null | grep -v '^no zypper in'`"
|
||||
CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
|
||||
|
||||
if test "x$APT_GET" != x; then
|
||||
if test "x$ZYPPER" != x; then
|
||||
PKGHANDLER_COMMAND="sudo zypper install autoconf"
|
||||
elif test "x$APT_GET" != x; then
|
||||
PKGHANDLER_COMMAND="sudo apt-get install autoconf"
|
||||
elif test "x$YUM" != x; then
|
||||
PKGHANDLER_COMMAND="sudo yum install autoconf"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
|
||||
[
|
||||
AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd)
|
||||
AC_CHECK_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd)
|
||||
])
|
||||
|
||||
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
@ -54,6 +54,8 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
|
||||
pkgutil_help $MISSING_DEPENDENCY ;;
|
||||
pkgadd)
|
||||
pkgadd_help $MISSING_DEPENDENCY ;;
|
||||
zypper)
|
||||
zypper_help $MISSING_DEPENDENCY ;;
|
||||
esac
|
||||
|
||||
if test "x$PKGHANDLER_COMMAND" != x; then
|
||||
@ -110,6 +112,25 @@ apt_help() {
|
||||
esac
|
||||
}
|
||||
|
||||
zypper_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
PKGHANDLER_COMMAND="sudo zypper install gcc gcc-c++" ;;
|
||||
alsa)
|
||||
PKGHANDLER_COMMAND="sudo zypper install alsa-devel" ;;
|
||||
cups)
|
||||
PKGHANDLER_COMMAND="sudo zypper install cups-devel" ;;
|
||||
fontconfig)
|
||||
PKGHANDLER_COMMAND="sudo zypper install fontconfig-devel" ;;
|
||||
freetype)
|
||||
PKGHANDLER_COMMAND="sudo zypper install freetype-devel" ;;
|
||||
x11)
|
||||
PKGHANDLER_COMMAND="sudo zypper install libX11-devel libXext-devel libXrender-devel libXrandr-devel libXtst-devel libXt-devel libXi-devel" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="sudo zypper install ccache" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
yum_help() {
|
||||
case $1 in
|
||||
devkit)
|
||||
|
@ -643,14 +643,21 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_LD_VERSION],
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# gcc -Wl,-version output typically looks like
|
||||
# gcc -Wl,-version output typically looks like:
|
||||
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
|
||||
# Copyright (C) 2015 Free Software Foundation, Inc.
|
||||
# This program is free software; [...]
|
||||
LINKER_VERSION_STRING=`$LD -Wl,-version 2>&1 | $HEAD -n 1`
|
||||
# If using gold it will look like:
|
||||
# GNU gold (GNU Binutils 2.30) 1.15
|
||||
LINKER_VERSION_STRING=`$LD -Wl,--version 2> /dev/null | $HEAD -n 1`
|
||||
# Extract version number
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
if [ [[ "$LINKER_VERSION_STRING" == *gold* ]] ]; then
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*) .*/\1/'` ]
|
||||
else
|
||||
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
|
||||
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# clang -Wl,-v output typically looks like
|
||||
# @(#)PROGRAM:ld PROJECT:ld64-305
|
||||
|
198
make/common/Execute.gmk
Normal file
198
make/common/Execute.gmk
Normal file
@ -0,0 +1,198 @@
|
||||
#
|
||||
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including Execute.gmk)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Code for handling the SetupExecute macro.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# Setup make rules for executing an arbitrary command.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# You need to specify a COMMAND, the actual command line to execute. You are
|
||||
# strongly recommended to provide a INFO with the text to display for LOG=info
|
||||
# on what operation is performed. You can use DEPS to provide additional
|
||||
# dependencies for your command to run. You can optionally include a PRE_COMMAND
|
||||
# and a POST_COMMAND, intended for simple pre- and post-processing. The latter
|
||||
# might be e.g. a mv from a temporary file to the final destination, the former
|
||||
# e.g. a simple sed replacement on the input file. If the operations are
|
||||
# unrelated to the main COMMAND, this is not a suitable solution.
|
||||
#
|
||||
# If your command outputs a variety of files, or if it's really a single file
|
||||
# but you don't really care about the output from the perspective, you can just
|
||||
# supply an OUTPUT_DIR. You are supposed to make sure the command creates files
|
||||
# in this directory (which will be created for you if it does not exist), but
|
||||
# this can't be enforced by SetupExecute. Additional support files (like logs
|
||||
# and markers) are created in this directory. If you want support files in a
|
||||
# separate directory (e.g. if you're targeting an OUTPUT_DIR in the image
|
||||
# directly), you can specify a SUPPORT_DIR. If your command outputs only a
|
||||
# single file, you can get rid of the marker files (but not the log files) by
|
||||
# specifying OUTPUT_FILE. Note that if you specify an OUTPUT_FILE, support log
|
||||
# files will be placed in the same directory as the OUTPUT_FILE. If you do not
|
||||
# want that, use SUPPORT_DIR as well.
|
||||
#
|
||||
# After the call to SetupExecute, $1 will contain references to all generated
|
||||
# files (that make knows about), and $1_TARGET will contain a reference to the
|
||||
# final target (that is OUTPUT_FILE if it exists, or the $1_exec.marker file
|
||||
# otherwise).
|
||||
#
|
||||
# All the above keep functioning as expected even if PRE_COMMAND and
|
||||
# POST_COMMAND are given. One special case worth noting is that if OUTPUT_FILE
|
||||
# and POST_COMMAND is both given, the actual OUTPUT_FILE is considered to be a
|
||||
# result of running the POST_COMMAND.
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# COMMAND : The command to execute
|
||||
# PRE_COMMAND : A helper command to execute before COMMAND
|
||||
# POST_COMMAND: A helper command to execute after COMMAND
|
||||
# OUTPUT_DIR : The directory that will contain the result from the command
|
||||
# OUTPUT_FILE : Use this if the command results in a single output file
|
||||
# SUPPORT_DIR : Where to store generated support files
|
||||
# INFO : Message to display at LOG=info level when running command (optional)
|
||||
# WARN : Message to display at LOG=warn level when running command (optional)
|
||||
# DEPS : Dependencies for the execution to take place
|
||||
#
|
||||
|
||||
# Setup make rules for copying files, with an option to do more complex
|
||||
SetupExecute = $(NamedParamsMacroTemplate)
|
||||
define SetupExecuteBody
|
||||
ifeq ($$($1_COMMAND), )
|
||||
$$(error COMMAND is missing in SetupExecute $1)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_OUTPUT_FILE), )
|
||||
ifneq ($$($1_OUTPUT_DIR), )
|
||||
$$(error Cannot specify both OUTPUT_DIR and OUTPUT_FILE in SetupExecute $1)
|
||||
endif
|
||||
# We need to know output dir since we will make sure it is created.
|
||||
$1_OUTPUT_DIR := $$(patsubst %/,%, $$(dir $$($1_OUTPUT_FILE)))
|
||||
ifeq ($$($1_SUPPORT_DIR), )
|
||||
# If support dir is not given, use base dir of output file.
|
||||
$1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
|
||||
endif
|
||||
else ifneq ($$($1_OUTPUT_DIR), )
|
||||
ifeq ($$($1_SUPPORT_DIR), )
|
||||
# If support dir is not given, use output dir.
|
||||
$1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
|
||||
endif
|
||||
else
|
||||
$$(error OUTPUT_DIR or OUTPUT_FILE is required in SetupExecute $1)
|
||||
endif
|
||||
|
||||
$1_BASE := $$($1_SUPPORT_DIR)/_$1
|
||||
$1_PRE_MARKER := $$($1_BASE)_pre.marker
|
||||
$1_EXEC_MARKER := $$($1_BASE)_exec.marker
|
||||
$1_POST_MARKER := $$($1_BASE)_post.marker
|
||||
|
||||
ifeq ($$($1_OUTPUT_FILE), )
|
||||
# No specified output file, use markers everywhere
|
||||
$1_EXEC_RESULT := $$($1_EXEC_MARKER)
|
||||
ifeq ($$($1_POST_COMMAND), )
|
||||
$1_FINAL_RESULT := $$($1_EXEC_MARKER)
|
||||
else
|
||||
$1_FINAL_RESULT := $$($1_POST_MARKER)
|
||||
endif
|
||||
|
||||
else
|
||||
# If we have a single output file, we don't need a separate marker
|
||||
|
||||
ifeq ($$($1_POST_COMMAND), )
|
||||
$1_EXEC_RESULT := $$($1_OUTPUT_FILE)
|
||||
$1_FINAL_RESULT := $$($1_EXEC_RESULT)
|
||||
else
|
||||
$1_EXEC_RESULT := $$($1_EXEC_MARKER)
|
||||
$1_FINAL_RESULT := $$($1_OUTPUT_FILE)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($$($1_INFO)$$($1_WARN), )
|
||||
# If neither info nor warn is provided, add basic info text.
|
||||
$1_INFO := Running commands for $1
|
||||
endif
|
||||
|
||||
ifneq ($$($1_PRE_COMMAND), )
|
||||
|
||||
$$($1_PRE_MARKER): $$($1_DEPS)
|
||||
ifneq ($$($1_WARN), )
|
||||
$$(call LogWarn, $$($1_WARN))
|
||||
endif
|
||||
ifneq ($$($1_INFO), )
|
||||
$$(call LogInfo, $$($1_INFO))
|
||||
endif
|
||||
$$(call MakeDir, $$($1_SUPPORT_DIR) $$($1_OUTPUT_DIR))
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_pre, \
|
||||
$$($1_PRE_COMMAND))
|
||||
$$(TOUCH) $$@
|
||||
|
||||
$$($1_EXEC_RESULT): $$($1_PRE_MARKER)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
$$($1_COMMAND))
|
||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
|
||||
$1 := $$($1_PRE_MARKER) $$($1_EXEC_RESULT)
|
||||
else
|
||||
$$($1_EXEC_RESULT): $$($1_DEPS)
|
||||
ifneq ($$($1_WARN), )
|
||||
$$(call LogWarn, $$($1_WARN))
|
||||
endif
|
||||
ifneq ($$($1_INFO), )
|
||||
$$(call LogInfo, $$($1_INFO))
|
||||
endif
|
||||
$$(call MakeDir, $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||
$$($1_COMMAND))
|
||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||
$$(TOUCH) $$@
|
||||
endif
|
||||
|
||||
$1 := $$($1_EXEC_RESULT)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_POST_COMMAND), )
|
||||
|
||||
$$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
|
||||
$$(call ExecuteWithLog, $$($1_BASE)_post, \
|
||||
$$($1_POST_COMMAND))
|
||||
$$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_FINAL_RESULT)
|
||||
endif
|
||||
|
||||
# Export all our generated targets in $1, and the final target in $1_TARGET.
|
||||
$1_TARGET := $$($1_FINAL_RESULT)
|
||||
|
||||
endef
|
@ -505,8 +505,9 @@ define SetupNativeCompilationBody
|
||||
$$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
|
||||
$$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
|
||||
|
||||
# Find all files in the source trees. Preserve order.
|
||||
$1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
|
||||
$1_SRCS_RAW = $$(call CacheFind, $$($1_SRC))
|
||||
# Order src files according to the order of the src dirs
|
||||
$1_SRCS := $$(foreach d, $$($1_SRC), $$(filter $$d%, $$($1_SRCS_RAW)))
|
||||
$1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
|
||||
# Extract the C/C++ files.
|
||||
ifneq ($$($1_EXCLUDE_PATTERNS), )
|
||||
@ -970,10 +971,9 @@ define SetupNativeCompilationBody
|
||||
$$(shell $(RM) $$($1_TARGET))
|
||||
endif
|
||||
$$($1_IMPORT_LIBRARY): $$($1_TARGET)
|
||||
$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
|
||||
$$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
|
||||
)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$1 += $$($1_IMPORT_LIBRARY)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -65,10 +65,13 @@ define ProcessMarkdown
|
||||
endif
|
||||
endif
|
||||
|
||||
$1_$2_OPTIONS := $$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
|
||||
# This does not need to be included in VARDEPS since it's from the actual
|
||||
# source file. Only run the shell if the recipe gets executed below.
|
||||
$1_$2_OPTIONS_FROM_SRC = \
|
||||
$$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
|
||||
|
||||
ifneq ($$($1_FILTER), )
|
||||
$1_$2_OPTIONS += --filter $$($1_FILTER)
|
||||
$1_$2_OPTIONS := --filter $$($1_FILTER)
|
||||
endif
|
||||
|
||||
$1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
|
||||
@ -82,8 +85,8 @@ define ProcessMarkdown
|
||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
|
||||
$$(PANDOC) $$($1_OPTIONS) -f $$(PANDOC_MARKDOWN_FLAG) \
|
||||
-t $$($1_FORMAT) --standalone \
|
||||
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS) '$$($1_$2_PANDOC_INPUT)' \
|
||||
-o '$$($1_$2_PANDOC_OUTPUT)')
|
||||
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS_FROM_SRC) $$($1_$2_OPTIONS) \
|
||||
'$$($1_$2_PANDOC_INPUT)' -o '$$($1_$2_PANDOC_OUTPUT)')
|
||||
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
|
||||
TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
|
||||
if [ "x$$$$TOO_LONG_LINES" != x ]; then \
|
||||
|
@ -90,8 +90,7 @@ define SetupTestFilesCompilationBody
|
||||
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
|
||||
NAME := $$(unprefixed_name), \
|
||||
TYPE := $$($1_COMPILATION_TYPE), \
|
||||
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
|
||||
INCLUDE_FILES := $$(notdir $$(file)), \
|
||||
EXTRA_FILES := $$(file), \
|
||||
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
|
||||
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
|
||||
CFLAGS := $$($1_BASE_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
|
||||
|
@ -939,21 +939,27 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc7.3.0-OEL6.4+1.2",
|
||||
macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
|
||||
linux_x64: "gcc8.2.0-OL6.4+1.0",
|
||||
macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
|
||||
windows_x64: "VS2017-15.5.5+1.0",
|
||||
linux_aarch64: "gcc7.3.0-Fedora27+1.2",
|
||||
linux_arm: "gcc7.3.0-Fedora27+1.2",
|
||||
linux_ppc64le: "gcc7.3.0-Fedora27+1.0",
|
||||
linux_s390x: "gcc7.3.0-Fedora27+1.0"
|
||||
windows_x64: "VS2017-15.9.6+1.0",
|
||||
linux_aarch64: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_arm: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_s390x: "gcc8.2.0-Fedora27+1.0"
|
||||
};
|
||||
|
||||
var devkit_platform = (input.target_cpu == "x86"
|
||||
? input.target_os + "_x64"
|
||||
: input.target_platform);
|
||||
|
||||
var devkit_cross_prefix = "";
|
||||
if (input.build_platform != input.target_platform
|
||||
&& input.build_platform != devkit_platform) {
|
||||
devkit_cross_prefix = input.build_platform + "-to-";
|
||||
}
|
||||
|
||||
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
|
||||
+ "-" + input.build_cpu;
|
||||
var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz")
|
||||
@ -984,7 +990,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
devkit: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
module: "devkit-" + devkit_platform,
|
||||
module: "devkit-" + devkit_cross_prefix + devkit_platform,
|
||||
revision: devkit_platform_revisions[devkit_platform],
|
||||
environment: {
|
||||
"DEVKIT_HOME": input.get("devkit", "home_path"),
|
||||
|
@ -440,6 +440,8 @@ charset IBM00858 IBM858
|
||||
alias cp00858
|
||||
alias 858
|
||||
alias PC-Multilingual-850+euro
|
||||
alias ibm858
|
||||
alias ibm-858
|
||||
|
||||
charset IBM862 IBM862
|
||||
package sun.nio.cs
|
||||
@ -1389,6 +1391,7 @@ charset x-IBM833 IBM833
|
||||
alias cp833
|
||||
alias ibm833
|
||||
alias ibm-833
|
||||
alias 833
|
||||
|
||||
|
||||
charset x-IBM834 IBM834 # EBCDIC DBCS-only Korean
|
||||
@ -1590,6 +1593,8 @@ charset IBM01140 IBM1140
|
||||
alias cp01140
|
||||
alias 1140
|
||||
alias ebcdic-us-037+euro
|
||||
alias ibm1140
|
||||
alias ibm-1140
|
||||
|
||||
charset IBM01141 IBM1141
|
||||
package sun.nio.cs.ext
|
||||
@ -1601,6 +1606,8 @@ charset IBM01141 IBM1141
|
||||
alias cp01141
|
||||
alias 1141
|
||||
alias ebcdic-de-273+euro
|
||||
alias ibm1141
|
||||
alias ibm-1141
|
||||
|
||||
charset IBM01142 IBM1142
|
||||
package sun.nio.cs.ext
|
||||
@ -1613,6 +1620,8 @@ charset IBM01142 IBM1142
|
||||
alias 1142
|
||||
alias ebcdic-no-277+euro
|
||||
alias ebcdic-dk-277+euro
|
||||
alias ibm1142
|
||||
alias ibm-1142
|
||||
|
||||
charset IBM01143 IBM1143
|
||||
package sun.nio.cs.ext
|
||||
@ -1625,6 +1634,8 @@ charset IBM01143 IBM1143
|
||||
alias 1143
|
||||
alias ebcdic-fi-278+euro
|
||||
alias ebcdic-se-278+euro
|
||||
alias ibm1143
|
||||
alias ibm-1143
|
||||
|
||||
charset IBM01144 IBM1144
|
||||
package sun.nio.cs.ext
|
||||
@ -1636,6 +1647,8 @@ charset IBM01144 IBM1144
|
||||
alias cp01144
|
||||
alias 1144
|
||||
alias ebcdic-it-280+euro
|
||||
alias ibm1144
|
||||
alias ibm-1144
|
||||
|
||||
charset IBM01145 IBM1145
|
||||
package sun.nio.cs.ext
|
||||
@ -1647,6 +1660,8 @@ charset IBM01145 IBM1145
|
||||
alias cp01145
|
||||
alias 1145
|
||||
alias ebcdic-es-284+euro
|
||||
alias ibm1145
|
||||
alias ibm-1145
|
||||
|
||||
charset IBM01146 IBM1146
|
||||
package sun.nio.cs.ext
|
||||
@ -1658,6 +1673,8 @@ charset IBM01146 IBM1146
|
||||
alias cp01146
|
||||
alias 1146
|
||||
alias ebcdic-gb-285+euro
|
||||
alias ibm1146
|
||||
alias ibm-1146
|
||||
|
||||
charset IBM01147 IBM1147
|
||||
package sun.nio.cs.ext
|
||||
@ -1669,6 +1686,8 @@ charset IBM01147 IBM1147
|
||||
alias cp01147
|
||||
alias 1147
|
||||
alias ebcdic-fr-277+euro
|
||||
alias ibm1147
|
||||
alias ibm-1147
|
||||
|
||||
charset IBM01148 IBM1148
|
||||
package sun.nio.cs.ext
|
||||
@ -1680,6 +1699,8 @@ charset IBM01148 IBM1148
|
||||
alias cp01148
|
||||
alias 1148
|
||||
alias ebcdic-international-500+euro
|
||||
alias ibm1148
|
||||
alias ibm-1148
|
||||
|
||||
charset IBM01149 IBM1149
|
||||
package sun.nio.cs.ext
|
||||
@ -1691,6 +1712,8 @@ charset IBM01149 IBM1149
|
||||
alias cp01149
|
||||
alias 1149
|
||||
alias ebcdic-s-871+euro
|
||||
alias ibm1149
|
||||
alias ibm-1149
|
||||
|
||||
charset IBM290 IBM290
|
||||
package sun.nio.cs.ext
|
||||
|
@ -29,14 +29,10 @@
|
||||
# gcc based cross compilation, portable, self contained packages, capable
|
||||
# of building OpenJDK.
|
||||
#
|
||||
# In addition to the makefiles, access to Oracle Linux installation
|
||||
# media is required. This has been tested against Oracle Enterprise Linux
|
||||
# 6.4.
|
||||
#
|
||||
# By default this Makefile will build a native toolchain for the current
|
||||
# platform if called with something like this:
|
||||
#
|
||||
# make tars BASE_OS=OEL6
|
||||
# make tars BASE_OS=OL
|
||||
#
|
||||
# To build the full set of crosstools for additional platforms, use a command
|
||||
# line looking like this:
|
||||
@ -48,9 +44,19 @@
|
||||
# to build several devkits for a specific OS version at once.
|
||||
# You can find the final results under ../../build/devkit/result/<host>-to-<target>
|
||||
#
|
||||
# You may want the native toolchain to be used when compiling the cross
|
||||
# compilation toolchains. To achieve this, first build the native toolchain,
|
||||
# then add the bin directory from this build to the path when invoking this
|
||||
# makefile again for cross compilation. Ex:
|
||||
#
|
||||
# PATH=$PWD/../../build/devkit/result/x86_64-linux-gnu-to-x86_64-linux-gnu/bin:$PATH \
|
||||
# make TARGETS="arm-linux-gnueabihf,ppc64-linux-gnu" BASE_OS=Fedora
|
||||
#
|
||||
# This is the makefile which iterates over all host and target platforms.
|
||||
#
|
||||
|
||||
COMMA := ,
|
||||
|
||||
os := $(shell uname -o)
|
||||
cpu := $(shell uname -p)
|
||||
|
||||
@ -66,7 +72,7 @@ ifeq ($(TARGETS), )
|
||||
platforms := $(me)
|
||||
host_platforms := $(platforms)
|
||||
else
|
||||
platforms := $(TARGETS)
|
||||
platforms := $(subst $(COMMA), , $(TARGETS))
|
||||
host_platforms := $(me)
|
||||
endif
|
||||
target_platforms := $(platforms)
|
||||
@ -93,7 +99,7 @@ $(host_platforms) :
|
||||
$(MAKE) -f Tools.gmk all $(submakevars) \
|
||||
TARGET=$$p PREFIX=$(RESULT)/$@-to-$$p && \
|
||||
$(MAKE) -f Tools.gmk ccache $(submakevars) \
|
||||
TARGET=$@ PREFIX=$(RESULT)/$@-to-$$p BUILDDIR=$(OUTPUT_ROOT)/$@/$$p || exit 1 ; \
|
||||
TARGET=$@ PREFIX=$(RESULT)/$@-to-$$p || exit 1 ; \
|
||||
done
|
||||
@echo 'All done"'
|
||||
|
||||
@ -103,7 +109,6 @@ define Mktar
|
||||
$(1)-to-$(2)_tar = $$(RESULT)/sdk-$(1)-to-$(2)-$$(today).tar.gz
|
||||
$$($(1)-to-$(2)_tar) : PLATFORM = $(1)-to-$(2)
|
||||
TARFILES += $$($(1)-to-$(2)_tar)
|
||||
$$($(1)-to-$(2)_tar) : $$(shell find $$(RESULT)/$(1)-to-$(2) -type f)
|
||||
endef
|
||||
|
||||
$(foreach p,$(host_platforms),$(foreach t,$(target_platforms),$(eval $(call Mktar,$(p),$(t)))))
|
||||
@ -111,9 +116,7 @@ $(foreach p,$(host_platforms),$(foreach t,$(target_platforms),$(eval $(call Mkta
|
||||
tars : all $(TARFILES)
|
||||
onlytars : $(TARFILES)
|
||||
%.tar.gz :
|
||||
@echo 'Creating compiler package $@'
|
||||
cd $(RESULT) && tar -czf $@ $(PLATFORM)/*
|
||||
touch $@
|
||||
$(MAKE) -r -f Tars.gmk SRC_DIR=$(RESULT)/$(PLATFORM) TAR_FILE=$@
|
||||
|
||||
clean :
|
||||
rm -rf $(addprefix ../../build/devkit/, result $(host_platforms))
|
||||
|
49
make/devkit/Tars.gmk
Normal file
49
make/devkit/Tars.gmk
Normal file
@ -0,0 +1,49 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This makefile creates the tar files. It needs to be called with make -r
|
||||
# which is why it's separated out into its own file.
|
||||
|
||||
# Input parameters
|
||||
# SRC_DIR
|
||||
# TAR_FILE
|
||||
|
||||
ifeq ($(SRC_DIR), )
|
||||
$(error SRC_DIR not set)
|
||||
endif
|
||||
ifeq ($(TAR_FILE), )
|
||||
$(error TAR_FILE not set)
|
||||
endif
|
||||
|
||||
default: tars
|
||||
|
||||
tars : $(TAR_FILE)
|
||||
|
||||
$(TAR_FILE): $(shell find $(SRC_DIR) -type f)
|
||||
@echo 'Creating compiler package $@'
|
||||
cd $(dir $(SRC_DIR)) && tar -czf $@ $(notdir $(SRC_DIR))/*
|
||||
touch $@
|
||||
|
||||
.PHONY: default tars
|
@ -51,9 +51,9 @@ endif
|
||||
|
||||
$(info ARCH=$(ARCH))
|
||||
|
||||
ifeq ($(BASE_OS), OEL6)
|
||||
ifeq ($(BASE_OS), OL)
|
||||
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
|
||||
LINUX_VERSION := OEL6.4
|
||||
LINUX_VERSION := OL6.4
|
||||
else ifeq ($(BASE_OS), Fedora)
|
||||
DEFAULT_OS_VERSION := 27
|
||||
ifeq ($(BASE_OS_VERSION), )
|
||||
@ -79,8 +79,17 @@ endif
|
||||
# Define external dependencies
|
||||
|
||||
# Latest that could be made to work.
|
||||
GCC_VER := 7.3.0
|
||||
ifeq ($(GCC_VER), 7.3.0)
|
||||
GCC_VER := 8.2.0
|
||||
ifeq ($(GCC_VER), 8.2.0)
|
||||
gcc_ver := gcc-8.2.0
|
||||
binutils_ver := binutils-2.30
|
||||
ccache_ver := ccache-3.5.1a
|
||||
CCACHE_DIRNAME := ccache-3.5.1
|
||||
mpfr_ver := mpfr-3.1.5
|
||||
gmp_ver := gmp-6.1.2
|
||||
mpc_ver := mpc-1.0.3
|
||||
gdb_ver := gdb-8.2.1
|
||||
else ifeq ($(GCC_VER), 7.3.0)
|
||||
gcc_ver := gcc-7.3.0
|
||||
binutils_ver := binutils-2.30
|
||||
ccache_ver := ccache-3.3.6
|
||||
@ -174,14 +183,16 @@ download-rpms:
|
||||
|
||||
# Generate downloading + unpacking of sources.
|
||||
define Download
|
||||
$(1)_DIR = $(abspath $(SRCDIR)/$(basename $(basename $(notdir $($(1))))))
|
||||
# Allow override
|
||||
$(1)_DIRNAME ?= $(basename $(basename $(notdir $($(1)))))
|
||||
$(1)_DIR = $(abspath $(SRCDIR)/$$($(1)_DIRNAME))
|
||||
$(1)_CFG = $$($(1)_DIR)/configure
|
||||
$(1)_FILE = $(DOWNLOAD)/$(notdir $($(1)))
|
||||
|
||||
$$($(1)_CFG) : $$($(1)_FILE)
|
||||
mkdir -p $$(SRCDIR)
|
||||
tar -C $$(SRCDIR) -xf $$<
|
||||
$$(foreach p,$$(abspath $$(wildcard $$(notdir $$($(1)_DIR)).patch)), \
|
||||
$$(foreach p,$$(abspath $$(wildcard patches/$$(notdir $$($(1)_DIR)).patch)), \
|
||||
echo PATCHING $$(p) ; \
|
||||
patch -d $$($(1)_DIR) -p1 -i $$(p) ; \
|
||||
)
|
||||
@ -370,7 +381,7 @@ $(BUILDDIR)/$(binutils_ver)/Makefile \
|
||||
--disable-nls \
|
||||
--program-prefix=$(TARGET)- \
|
||||
--enable-multilib \
|
||||
--enable-gold \
|
||||
--enable-gold=default \
|
||||
--enable-threads \
|
||||
--enable-plugins \
|
||||
) > $(@D)/log.config 2>&1
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, 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,16 +48,14 @@ BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
# Find the version of Xcode
|
||||
XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
|
||||
| awk '/Xcode/ { print $2 }' )"
|
||||
SDK_VERSION="MacOSX10.13"
|
||||
if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
|
||||
echo "Expected SDK version not found: ${SDK_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
SDK_VERSION="$(ls $XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
|
||||
| grep [0-9] | sort -r | head -n1 | sed 's/\.sdk//')"
|
||||
|
||||
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Xcode version: $XCODE_VERSION"
|
||||
echo "SDK version: $SDK_VERSION"
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
mkdir -p $DEVKIT_ROOT
|
@ -1,161 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script copies part of an Xcode installer into a devkit suitable
|
||||
# for building OpenJDK and OracleJDK. The installation .dmg files for Xcode
|
||||
# and the aux tools need to be available.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
USAGE="$0 <Xcode.dmg> <XQuartz.dmg> <gnu make binary> [<auxtools.dmg>]"
|
||||
|
||||
if [ "$1" = "" ] || [ "$2" = "" ]; then
|
||||
echo $USAGE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
XCODE_DMG="$1"
|
||||
XQUARTZ_DMG="$2"
|
||||
GNU_MAKE="$3"
|
||||
AUXTOOLS_DMG="$4"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
|
||||
# Mount XCODE_DMG
|
||||
if [ -e "/Volumes/Xcode" ]; then
|
||||
hdiutil detach /Volumes/Xcode
|
||||
fi
|
||||
hdiutil attach $XCODE_DMG
|
||||
|
||||
# Find the version of Xcode
|
||||
XCODE_VERSION="$(/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version \
|
||||
| awk '/Xcode/ { print $2 }' )"
|
||||
SDK_VERSION="MacOSX10.9"
|
||||
if [ ! -e "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
|
||||
echo "Expected SDK version not found: ${SDK_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Xcode version: $XCODE_VERSION"
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
################################################################################
|
||||
# Copy files to root
|
||||
mkdir -p $DEVKIT_ROOT
|
||||
if [ ! -d $DEVKIT_ROOT/Xcode.app ]; then
|
||||
echo "Copying Xcode.app..."
|
||||
cp -RH "/Volumes/Xcode/Xcode.app" $DEVKIT_ROOT/
|
||||
fi
|
||||
# Trim out some seemingly unneeded parts to save space.
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Applications
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/iPhone*
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Documentation
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/share/man
|
||||
( cd $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
|
||||
&& rm -rf `ls | grep -v ${SDK_VERSION}` )
|
||||
rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man
|
||||
|
||||
hdiutil detach /Volumes/Xcode
|
||||
|
||||
################################################################################
|
||||
# Copy Freetype into sysroot
|
||||
if [ -e "/Volumes/XQuartz-*" ]; then
|
||||
hdiutil detach /Volumes/XQuartz-*
|
||||
fi
|
||||
hdiutil attach $XQUARTZ_DMG
|
||||
|
||||
echo "Copying freetype..."
|
||||
rm -rf /tmp/XQuartz
|
||||
pkgutil --expand /Volumes/XQuartz-*/XQuartz.pkg /tmp/XQuartz/
|
||||
rm -rf /tmp/x11
|
||||
mkdir /tmp/x11
|
||||
cd /tmp/x11
|
||||
cat /tmp/XQuartz/x11.pkg/Payload | gunzip -dc | cpio -i
|
||||
|
||||
mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
|
||||
mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
|
||||
cp -RH opt/X11/include/freetype2 \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
|
||||
cp -RH opt/X11/include/ft2build.h \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
|
||||
cp -RH opt/X11/lib/libfreetype.* \
|
||||
$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
|
||||
|
||||
cd -
|
||||
|
||||
hdiutil detach /Volumes/XQuartz-*
|
||||
|
||||
################################################################################
|
||||
# Copy gnu make
|
||||
mkdir -p $DEVKIT_ROOT/bin
|
||||
cp $GNU_MAKE $DEVKIT_ROOT/bin
|
||||
|
||||
################################################################################
|
||||
# Optionally copy PackageMaker
|
||||
|
||||
if [ -e "$AUXTOOLS_DMG" ]; then
|
||||
if [ -e "/Volumes/Auxiliary Tools" ]; then
|
||||
hdiutil detach "/Volumes/Auxiliary Tools"
|
||||
fi
|
||||
hdiutil attach $AUXTOOLS_DMG
|
||||
|
||||
echo "Copying PackageMaker.app..."
|
||||
cp -RH "/Volumes/Auxiliary Tools/PackageMaker.app" $DEVKIT_ROOT/
|
||||
|
||||
hdiutil detach "/Volumes/Auxiliary Tools"
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "# The parameters used to create this devkit were:"
|
||||
echo-info "# $*"
|
||||
echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
|
||||
echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk\""
|
||||
echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/bin:\$DEVKIT_ROOT/PackageMaker.app/Contents/MacOS:\$DEVKIT_TOOLCHAIN_PATH\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle..."
|
||||
(cd $DEVKIT_ROOT && tar c - . | gzip - > "$DEVKIT_BUNDLE")
|
@ -1,136 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script copies parts of a Visual Studio 2013 installation into a devkit
|
||||
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
VS_VERSION="2013"
|
||||
VS_VERSION_NUM="12.0"
|
||||
VS_VERSION_NUM_NODOT="120"
|
||||
SDK_VERSION="8.1"
|
||||
VS_VERSION_SP="SP4"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcr${VS_VERSION_NUM_NODOT}.dll
|
||||
MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
|
||||
|
||||
################################################################################
|
||||
# Copy Visual Studio files
|
||||
|
||||
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
|
||||
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
|
||||
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/VC ]; then
|
||||
echo "Copying VC..."
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
|
||||
cp "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
# The msvcdis dll is needed to run some of the tools in VC/bin but is not
|
||||
# shipped in that directory. Copy it from the common dir.
|
||||
cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
|
||||
$DEVKIT_ROOT/VC/bin/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
|
||||
PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
|
||||
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
|
||||
echo "Copying SDK..."
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
|
||||
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle: $DEVKIT_BUNDLE"
|
||||
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
|
@ -1,142 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This script copies parts of a Visual Studio installation into a devkit
|
||||
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
|
||||
# erik.joelsson@oracle.com
|
||||
|
||||
VS_VERSION="2015"
|
||||
VS_VERSION_NUM="14.0"
|
||||
VS_VERSION_NUM_NODOT="140"
|
||||
SDK_VERSION="8.1"
|
||||
VS_VERSION_SP="update3"
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
|
||||
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
|
||||
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
|
||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||
|
||||
echo "Creating devkit in $DEVKIT_ROOT"
|
||||
|
||||
MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/vcruntime${VS_VERSION_NUM_NODOT}.dll
|
||||
MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
|
||||
|
||||
################################################################################
|
||||
# Copy Visual Studio files
|
||||
|
||||
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
|
||||
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
|
||||
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/VC ]; then
|
||||
echo "Copying VC..."
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
|
||||
cp "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
|
||||
# The msvcdis dll is needed to run some of the tools in VC/bin but is not
|
||||
# shipped in that directory. Copy it from the common dir.
|
||||
cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
|
||||
$DEVKIT_ROOT/VC/bin/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
|
||||
PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
|
||||
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
|
||||
echo "Copying SDK..."
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
|
||||
# In 2015, the new Universal CRT is delivered in the sdk 10 directory
|
||||
# so need to include that as well.
|
||||
mkdir -p $DEVKIT_ROOT/10/lib
|
||||
cp -r "$SDK_INSTALL_DIR/../10/lib/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/lib/
|
||||
mkdir -p $DEVKIT_ROOT/10/include
|
||||
cp -r "$SDK_INSTALL_DIR/../10/include/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/include/
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
|
||||
echo-info() {
|
||||
echo "$1" >> $DEVKIT_ROOT/devkit.info
|
||||
}
|
||||
|
||||
echo "Generating devkit.info..."
|
||||
rm -f $DEVKIT_ROOT/devkit.info
|
||||
echo-info "# This file describes to configure how to interpret the contents of this devkit"
|
||||
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
|
||||
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86;\$DEVKIT_ROOT/10/lib/ucrt/x86\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
|
||||
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
|
||||
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64;\$DEVKIT_ROOT/10/lib/ucrt/x64\""
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
||||
echo "Copying this script..."
|
||||
cp $0 $DEVKIT_ROOT/
|
||||
|
||||
################################################################################
|
||||
# Create bundle
|
||||
|
||||
echo "Creating bundle: $DEVKIT_BUNDLE"
|
||||
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
|
@ -107,34 +107,37 @@ MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
|
||||
################################################################################
|
||||
# Copy Visual Studio files
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/VC ]; then
|
||||
VC_SUBDIR="VC/Tools/MSVC/$MSVC_FULL_VERSION"
|
||||
REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_FULL_VERSION"
|
||||
echo "Copying VC..."
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
mkdir -p $DEVKIT_ROOT/VC/Auxiliary
|
||||
cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
|
||||
TOOLS_VERSION="$(ls "$VS_INSTALL_DIR/VC/Tools/MSVC" | sort -r -n | head -n1)"
|
||||
echo "Found Tools version: $TOOLS_VERSION"
|
||||
VC_SUBDIR="VC/Tools/MSVC/$TOOLS_VERSION"
|
||||
REDIST_VERSION="$(ls "$VS_INSTALL_DIR/VC/Redist/MSVC" | sort -r -n | head -n1)"
|
||||
echo "Found Redist version: $REDIST_VERSION"
|
||||
REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION"
|
||||
echo "Copying VC..."
|
||||
rm -rf $DEVKIT_ROOT/VC
|
||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
|
||||
mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
|
||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
|
||||
mkdir -p $DEVKIT_ROOT/VC/Auxiliary
|
||||
cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
|
||||
mkdir -p $DEVKIT_ROOT/VC/redist
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
|
||||
cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
|
||||
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
fi
|
||||
# The redist runtime libs are needed to run the compiler but may not be
|
||||
# installed on the machine where the devkit will be used.
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
|
||||
|
||||
################################################################################
|
||||
# Copy SDK files
|
||||
@ -142,21 +145,24 @@ fi
|
||||
SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
|
||||
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
|
||||
|
||||
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
|
||||
echo "Copying SDK..."
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
|
||||
cp -r "$SDK_INSTALL_DIR/Redist/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
|
||||
cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
|
||||
fi
|
||||
SDK_FULL_VERSION="$(ls "$SDK_INSTALL_DIR/bin" | sort -r -n | head -n1)"
|
||||
echo "Found SDK version: $SDK_FULL_VERSION"
|
||||
UCRT_VERSION="$(ls "$SDK_INSTALL_DIR/Redist" | grep $SDK_VERSION | sort -r -n | head -n1)"
|
||||
echo "Found UCRT version: $UCRT_VERSION"
|
||||
echo "Copying SDK..."
|
||||
rm -rf $DEVKIT_ROOT/$SDK_VERSION
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
|
||||
cp -r "$SDK_INSTALL_DIR/Redist/$UCRT_VERSION/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
|
||||
mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
|
||||
cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
|
||||
|
||||
################################################################################
|
||||
# Generate devkit.info
|
||||
@ -184,6 +190,11 @@ echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlm
|
||||
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
|
||||
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
|
||||
echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\""
|
||||
echo-info ""
|
||||
echo-info "DEVKIT_TOOLS_VERSION=\"$TOOLS_VERSION\""
|
||||
echo-info "DEVKIT_REDIST_VERSION=\"$REDIST_VERSION\""
|
||||
echo-info "DEVKIT_SDK_VERSION=\"$SDK_FULL_VERSION\""
|
||||
echo-info "DEVKIT_UCRT_VERSION=\"$UCRT_VERSION\""
|
||||
|
||||
################################################################################
|
||||
# Copy this script
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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,6 +27,7 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2019, 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
|
||||
@ -26,27 +26,22 @@
|
||||
# Generate java sources using the X11 offsets that are precalculated in files
|
||||
# make/data/x11wrappergen/sizes-<address size>.txt.
|
||||
|
||||
GENSRC_X11WRAPPERS_OUTPUT_TOP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
|
||||
|
||||
GENSRC_X11WRAPPERS_MARKER := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/_x11wrappers.marker
|
||||
|
||||
# Put the generated Java classes used to interface X11 from awt here.
|
||||
GENSRC_X11WRAPPERS_OUTPUTDIR := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/sun/awt/X11
|
||||
GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
|
||||
|
||||
# The pre-calculated offset file are stored here:
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt
|
||||
|
||||
# Run the tool on the offset files to generate several Java classes used in awt.
|
||||
$(GENSRC_X11WRAPPERS_MARKER): $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt
|
||||
$(call MakeDir, $(GENSRC_X11WRAPPERS_OUTPUTDIR))
|
||||
$(call LogInfo, Generating X11 wrapper source files)
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(OPENJDK_TARGET_CPU_BITS))
|
||||
$(TOUCH) $@
|
||||
$(eval $(call SetupExecute, gen_x11wrappers, \
|
||||
INFO := Generating X11 wrapper source files, \
|
||||
DEPS := $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt, \
|
||||
OUTPUT_DIR := $(GENSRC_X11WRAPPERS_OUTPUTDIR), \
|
||||
COMMAND := $(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
|
||||
$(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
|
||||
$(OPENJDK_TARGET_CPU_BITS), \
|
||||
))
|
||||
|
||||
|
||||
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS_MARKER)
|
||||
GENSRC_JAVA_DESKTOP += $(gen_x11wrappers_TARGET)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2019, 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,6 +27,7 @@ default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include Execute.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
@ -35,10 +36,10 @@ include HotspotCommon.gmk
|
||||
|
||||
# The real work is done in these files
|
||||
|
||||
include gensrc/GensrcJfr.gmk
|
||||
include gensrc/GensrcAdlc.gmk
|
||||
include gensrc/GensrcDtrace.gmk
|
||||
include gensrc/GensrcJvmti.gmk
|
||||
include gensrc/GensrcJfr.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, hotspot/gensrc/GenerateSources.gmk))
|
||||
|
||||
|
@ -166,18 +166,16 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
##############################################################################
|
||||
# Run the adlc tool on the single concatenated ad source file, and store the
|
||||
# output in support/adlc for further processing.
|
||||
ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
|
||||
|
||||
$(ADLC_RUN_MARKER): $(BUILD_ADLC) $(SINGLE_AD_SRCFILE)
|
||||
$(call LogInfo, Generating adlc files)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
|
||||
$(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
|
||||
-c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
-h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
|
||||
-a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
-v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp)
|
||||
$(TOUCH) $@
|
||||
$(eval $(call SetupExecute, adlc_run, \
|
||||
INFO := Generating adlc files, \
|
||||
DEPS := $(BUILD_ADLC) $(SINGLE_AD_SRCFILE), \
|
||||
OUTPUT_DIR := $(ADLC_SUPPORT_DIR), \
|
||||
COMMAND := $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
|
||||
-c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
-h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
|
||||
-a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
-v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp, \
|
||||
))
|
||||
|
||||
##############################################################################
|
||||
# Finally copy the generated files from support/adlc into gensrc/adfiles,
|
||||
@ -197,7 +195,7 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
|
||||
)
|
||||
|
||||
$(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
|
||||
$(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(adlc_run_TARGET)
|
||||
$(call LogInfo, Postprocessing adlc file $*)
|
||||
$(call MakeDir, $(@D))
|
||||
$(NAWK) \
|
||||
@ -206,6 +204,6 @@ ifeq ($(call check-jvm-feature, compiler2), true)
|
||||
{print}' \
|
||||
< $(ADLC_SUPPORT_DIR)/$* > $@
|
||||
|
||||
TARGETS := $(ADLC_GENERATED_FILES)
|
||||
TARGETS += $(ADLC_GENERATED_FILES)
|
||||
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2019, 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
|
||||
@ -64,9 +64,9 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
include lib/JvmFeatures.gmk
|
||||
include lib/JvmFlags.gmk
|
||||
|
||||
# We cannot compile until the JVMTI and JFR gensrc has finished
|
||||
# We cannot compile until the JVMTI and JFR gensrc has finished.
|
||||
# JFR_FILES is defined in GensrcJfr.gmk.
|
||||
JVMTI_H := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h
|
||||
JFR_FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jfrfiles/jfrEventClasses.hpp
|
||||
|
||||
$(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
|
||||
NAME := dtraceGenOffsets, \
|
||||
@ -87,12 +87,14 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
||||
# Argument 1: Output filename
|
||||
# Argument 2: dtrace-gen-offset tool command line option
|
||||
define SetupDtraceOffsetsGeneration
|
||||
$1: $$(BUILD_DTRACE_GEN_OFFSETS)
|
||||
$$(call LogInfo, Generating dtrace $2 file $$(@F))
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, ( $$(DTRACE_GEN_OFFSETS_TOOL) -$$(strip $2) > $$@ ) )
|
||||
$$(eval $$(call SetupExecute, dtrace_offset_$$(strip $2), \
|
||||
INFO := Generating dtrace $2 file, \
|
||||
DEPS := $$(BUILD_DTRACE_GEN_OFFSETS), \
|
||||
OUTPUT_FILE := $1, \
|
||||
COMMAND := ( $$(DTRACE_GEN_OFFSETS_TOOL) -$$(strip $2) > $1 ), \
|
||||
))
|
||||
|
||||
TARGETS += $1
|
||||
TARGETS += $$(dtrace_offset_$$(strip $2)_TARGET)
|
||||
endef
|
||||
|
||||
JVM_OFFSETS_H := $(DTRACE_GENSRC_DIR)/JvmOffsets.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2019, 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
|
||||
@ -57,11 +57,12 @@ JFR_SRCDIR := $(TOPDIR)/src/hotspot/share/jfr/metadata
|
||||
METADATA_XML := $(JFR_SRCDIR)/metadata.xml
|
||||
METADATA_XSD := $(JFR_SRCDIR)/metadata.xsd
|
||||
|
||||
$(JFR_OUTPUTDIR)/jfrEventClasses.hpp: $(METADATA_XML) $(METADATA_XSD) \
|
||||
$(BUILD_JFR_TOOLS)
|
||||
$(call LogInfo, Generating $(@F))
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, $(TOOL_JFR_GEN) $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR))
|
||||
test -f $@
|
||||
$(eval $(call SetupExecute, jfr_gen, \
|
||||
INFO := Generating JFR header files, \
|
||||
DEPS := $(METADATA_XML) $(METADATA_XSD) $(BUILD_JFR_TOOLS), \
|
||||
OUTPUT_DIR := $(JFR_OUTPUTDIR), \
|
||||
COMMAND := $(TOOL_JFR_GEN) $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
TARGETS += $(JFR_OUTPUTDIR)/jfrEventClasses.hpp
|
||||
JFR_FILES := $(jfr_gen_TARGET)
|
||||
TARGETS += $(JFR_FILES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2013, 2019, 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
|
||||
@ -28,6 +28,7 @@ $(eval $(call IncludeCustomExtension, hotspot/gensrc/GensrcJvmti.gmk))
|
||||
################################################################################
|
||||
# Build tools needed for the JVMTI source code generation
|
||||
|
||||
# FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed.
|
||||
JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
|
||||
JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
|
||||
|
||||
@ -64,16 +65,17 @@ TOOL_JVMTI_ENV_FILL := $(JAVA_SMALL) -cp $(JVMTI_TOOLS_OUTPUTDIR) jvmtiEnvFill
|
||||
# DEPS -- Additional dependencies
|
||||
SetupXslTransform = $(NamedParamsMacroTemplate)
|
||||
define SetupXslTransformBody
|
||||
$$($1_OUTPUT_DIR)/$1: $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS)
|
||||
$$(call LogInfo, Generating $$(@F))
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
|
||||
-XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
|
||||
# jvmtiGen does not return error code properly on fail.
|
||||
# NOTE: We should really fix jvmtiGen.java instead.
|
||||
test -f $$@
|
||||
$1_OUTPUT_FILE := $$($1_OUTPUT_DIR)/$1
|
||||
|
||||
TARGETS += $$($1_OUTPUT_DIR)/$1
|
||||
$$(eval $$(call SetupExecute, jvmti_gen_$1, \
|
||||
INFO := Generating jvmti file $1, \
|
||||
DEPS := $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS), \
|
||||
OUTPUT_FILE := $$($1_OUTPUT_FILE), \
|
||||
COMMAND := $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
|
||||
-XSL $$($1_XSL_FILE) -OUT $$($1_OUTPUT_FILE) $$($1_ARGS), \
|
||||
))
|
||||
|
||||
TARGETS += $$(jvmti_gen_$1_TARGET)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
|
@ -30,6 +30,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JavaCompilation.gmk
|
||||
include SetupJavaCompilers.gmk
|
||||
include Execute.gmk
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# The next part is a bit hacky. We include the CompileJvm.gmk to be
|
||||
@ -144,14 +145,16 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
VCPROJ_VARDEPS_FILE := $(call DependOnVariable, VCPROJ_VARDEPS, \
|
||||
$(VCPROJ_FILE).vardeps)
|
||||
|
||||
$(VCPROJ_FILE): $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE)
|
||||
$(call MakeDir, $(@D))
|
||||
$(call ExecuteWithLog, $@, \
|
||||
$(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
|
||||
$(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $@)) \
|
||||
$(LOG_INFO)
|
||||
$(eval $(call SetupExecute, vcproj_file, \
|
||||
INFO := Generating Visual Studio project file, \
|
||||
DEPS := $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE), \
|
||||
OUTPUT_FILE := $(VCPROJ_FILE), \
|
||||
COMMAND := $(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
|
||||
$(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $(VCPROJ_FILE)) \
|
||||
$(LOG_INFO), \
|
||||
))
|
||||
|
||||
TARGETS += $(VCPROJ_FILE)
|
||||
TARGETS += $(vcproj_file_TARGET)
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
|
@ -166,6 +166,9 @@ JVM_OPTIMIZATION ?= HIGHEST_JVM
|
||||
# default.
|
||||
JVM_STRIPFLAGS ?= $(STRIPFLAGS)
|
||||
|
||||
# This source set is reused so save in cache.
|
||||
$(eval $(call FillCacheFind, $(JVM_SRC_DIRS)))
|
||||
|
||||
################################################################################
|
||||
# Now set up the actual compilation of the main hotspot native library
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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,6 +27,8 @@ include LauncherCommon.gmk
|
||||
|
||||
$(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk))
|
||||
|
||||
JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc
|
||||
|
||||
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/common
|
||||
JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, 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
|
||||
@ -51,7 +51,6 @@ LAUNCHER_CFLAGS += -I$(TOPDIR)/src/java.base/share/native/launcher \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
|
||||
#
|
||||
GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
|
||||
JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc
|
||||
MACOSX_PLIST_DIR := $(TOPDIR)/src/java.base/macosx/native/launcher
|
||||
JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
|
||||
|
||||
|
@ -78,8 +78,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \
|
||||
NAME := verify, \
|
||||
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_gcc := implicit-fallthrough unused-function, \
|
||||
DISABLED_WARNINGS_microsoft := 4244 4267, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS_unix := -ljvm, \
|
||||
|
@ -41,115 +41,124 @@ TARGETS_EXTRA_LIB :=
|
||||
|
||||
ifeq ($(INCLUDE_GRAAL), true)
|
||||
ifneq ($(GRAALUNIT_LIB), )
|
||||
|
||||
SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.compiler/share/classes
|
||||
TEST_DIR := $(TOPDIR)/test/hotspot/jtreg/compiler/graalunit
|
||||
COMPILE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/test/graalunit
|
||||
LIB_OUTPUTDIR := $(TEST_IMAGE_DIR)/hotspot/jtreg/graal
|
||||
|
||||
TEST_COMPILE_CP := \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.internal.vm.compiler \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.internal.vm.ci \
|
||||
$(LIB_OUTPUTDIR)/junit-4.12.jar \
|
||||
$(LIB_OUTPUTDIR)/asm-5.0.4.jar \
|
||||
$(LIB_OUTPUTDIR)/asm-tree-5.0.4.jar \
|
||||
$(LIB_OUTPUTDIR)/java-allocation-instrumenter.jar \
|
||||
$(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
|
||||
# This evaluation is expensive and should only be done if this target was
|
||||
# explicitly called.
|
||||
ifneq ($(filter build-test-hotspot-jtreg-graal, $(MAKECMDGOALS)), )
|
||||
|
||||
TEST_JAVAC_FLAGS := \
|
||||
-Xlint:none \
|
||||
-processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
|
||||
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
||||
TEST_COMPILE_CP := \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.internal.vm.compiler \
|
||||
$(JDK_OUTPUTDIR)/modules/jdk.internal.vm.ci \
|
||||
$(LIB_OUTPUTDIR)/junit-4.12.jar \
|
||||
$(LIB_OUTPUTDIR)/asm-5.0.4.jar \
|
||||
$(LIB_OUTPUTDIR)/asm-tree-5.0.4.jar \
|
||||
$(LIB_OUTPUTDIR)/java-allocation-instrumenter.jar \
|
||||
$(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
|
||||
|
||||
### Copy 3rd party libs
|
||||
$(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
|
||||
FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \
|
||||
DEST := $(LIB_OUTPUTDIR), \
|
||||
))
|
||||
TEST_JAVAC_FLAGS := \
|
||||
-Xlint:none \
|
||||
-processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
|
||||
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
|
||||
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
|
||||
|
||||
TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS)
|
||||
### Copy 3rd party libs
|
||||
$(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
|
||||
FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \
|
||||
DEST := $(LIB_OUTPUTDIR), \
|
||||
))
|
||||
|
||||
### Compile graalunit tests
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.api.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.aarch64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.sparc.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.aarch64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.jdk9.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.debug.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.graph.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.lir.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.sparc.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.jtt/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.lir.jtt/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.lir.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.loop.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.options.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.test/src \
|
||||
$(SRC_DIR)/org.graalvm.util.test/src \
|
||||
, \
|
||||
EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
CLASSPATH := $(TEST_COMPILE_CP), \
|
||||
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
||||
))
|
||||
TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS)
|
||||
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS)
|
||||
### Compile graalunit tests
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := \
|
||||
$(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.api.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.aarch64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.sparc.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.asm.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.aarch64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.jdk9.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.core.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.debug.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.graph.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.amd64.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.jdk9.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.lir.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.sparc.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.hotspot.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.jtt/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.lir.jtt/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.lir.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.loop.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.options.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.replacements.test/src \
|
||||
$(SRC_DIR)/org.graalvm.compiler.test/src \
|
||||
$(SRC_DIR)/org.graalvm.util.test/src \
|
||||
, \
|
||||
EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
CLASSPATH := $(TEST_COMPILE_CP), \
|
||||
ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
|
||||
))
|
||||
|
||||
### Compile graalunit tests which require -XDstringConcat=inline
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
|
||||
SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
|
||||
INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
CLASSPATH := \
|
||||
$(TEST_COMPILE_CP) \
|
||||
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
||||
, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
$(TEST_JAVAC_FLAGS) \
|
||||
-XDstringConcat=inline \
|
||||
, \
|
||||
))
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS)
|
||||
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
|
||||
### Compile graalunit tests which require -XDstringConcat=inline
|
||||
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
|
||||
SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
|
||||
INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
CLASSPATH := \
|
||||
$(TEST_COMPILE_CP) \
|
||||
$(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
|
||||
, \
|
||||
ADD_JAVAC_FLAGS := \
|
||||
$(TEST_JAVAC_FLAGS) \
|
||||
-XDstringConcat=inline \
|
||||
, \
|
||||
))
|
||||
|
||||
### Generate jdk.vm.compiler.tests.jar
|
||||
$(eval $(call SetupJarArchive, BUILD_VM_COMPILER_TESTS_JAR, \
|
||||
DEPENDENCIES := $(BUILD_VM_COMPILER_TESTS) $(BUILD_VM_COMPILER_TESTS_SET2), \
|
||||
SRCS := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
JAR := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests.jar, \
|
||||
))
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
|
||||
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_JAR)
|
||||
### Generate jdk.vm.compiler.tests.jar
|
||||
$(eval $(call SetupJarArchive, BUILD_VM_COMPILER_TESTS_JAR, \
|
||||
DEPENDENCIES := $(BUILD_VM_COMPILER_TESTS) $(BUILD_VM_COMPILER_TESTS_SET2), \
|
||||
SRCS := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
|
||||
JAR := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests.jar, \
|
||||
))
|
||||
|
||||
### Compile and build mxtool
|
||||
$(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
|
||||
JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
|
||||
CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
|
||||
))
|
||||
TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_JAR)
|
||||
|
||||
TARGETS_BUILD += $(BUILD_MXTOOL)
|
||||
### Compile and build mxtool
|
||||
$(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
|
||||
SETUP := GENERATE_USINGJDKBYTECODE, \
|
||||
SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
|
||||
BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
|
||||
JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
|
||||
CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
|
||||
))
|
||||
|
||||
TARGETS_BUILD += $(BUILD_MXTOOL)
|
||||
|
||||
$(TARGETS_BUILD): $(TARGETS_EXTRA_LIB)
|
||||
|
||||
endif # build-test-hotspot-jtreg-graal
|
||||
|
||||
################################################################################
|
||||
# Targets for building test-image.
|
||||
@ -168,7 +177,6 @@ ifeq ($(INCLUDE_GRAAL), true)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(TARGETS_BUILD): $(TARGETS_EXTRA_LIB)
|
||||
build-test-hotspot-jtreg-graal: $(TARGETS_BUILD)
|
||||
test-image-hotspot-jtreg-graal: $(TARGETS_IMAGE)
|
||||
|
||||
|
@ -1513,19 +1513,23 @@ else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libterminatedThread += -lpthread
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
|
||||
TYPE := LIBRARY, \
|
||||
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
|
||||
))
|
||||
# This evaluation is expensive and should only be done if this target was
|
||||
# explicitly called.
|
||||
ifneq ($(filter build-test-hotspot-jtreg-native, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
|
||||
TYPE := LIBRARY, \
|
||||
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
|
||||
TYPE := PROGRAM, \
|
||||
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
|
||||
))
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
|
||||
TYPE := PROGRAM, \
|
||||
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
|
||||
))
|
||||
endif
|
||||
|
||||
build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES)
|
||||
|
||||
@ -1537,8 +1541,9 @@ build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPO
|
||||
$(eval $(call SetupCopyFiles,COPY_HOTSPOT_JTREG_NATIVE, \
|
||||
SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
|
||||
DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
|
||||
FILES := $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES), \
|
||||
FLATTEN := true))
|
||||
FILES := $(wildcard $(addprefix $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
|
||||
FLATTEN := true, \
|
||||
))
|
||||
|
||||
test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE)
|
||||
|
||||
|
@ -82,19 +82,23 @@ else
|
||||
BUILD_JDK_JTREG_EXCLUDE += exeJniInvocationTest.c
|
||||
endif
|
||||
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
|
||||
TYPE := LIBRARY, \
|
||||
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
|
||||
))
|
||||
# This evaluation is expensive and should only be done if this target was
|
||||
# explicitly called.
|
||||
ifneq ($(filter build-test-jdk-jtreg-native, $(MAKECMDGOALS)), )
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
|
||||
TYPE := LIBRARY, \
|
||||
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_EXECUTABLES, \
|
||||
TYPE := PROGRAM, \
|
||||
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
|
||||
))
|
||||
$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_EXECUTABLES, \
|
||||
TYPE := PROGRAM, \
|
||||
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
|
||||
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
|
||||
EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
|
||||
))
|
||||
endif
|
||||
|
||||
build-test-jdk-jtreg-native: $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXECUTABLES)
|
||||
|
||||
@ -106,8 +110,9 @@ build-test-jdk-jtreg-native: $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXEC
|
||||
$(eval $(call SetupCopyFiles,COPY_JDK_JTREG_NATIVE, \
|
||||
SRC := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
|
||||
DEST := $(TEST_IMAGE_DIR)/jdk/jtreg/native, \
|
||||
FILES := $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXECUTABLES), \
|
||||
FLATTEN := true))
|
||||
FILES := $(wildcard $(addprefix $(BUILD_JDK_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
|
||||
FLATTEN := true, \
|
||||
))
|
||||
|
||||
test-image-jdk-jtreg-native: $(COPY_JDK_JTREG_NATIVE)
|
||||
|
||||
|
@ -4246,7 +4246,7 @@ operand immByteMapBase()
|
||||
%{
|
||||
// Get base of card map
|
||||
predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
|
||||
(jbyte*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
|
||||
(CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
|
||||
match(ConP);
|
||||
|
||||
op_cost(0);
|
||||
@ -15660,6 +15660,98 @@ instruct reduce_mul2D(vRegD dst, vRegD src1, vecX src2, vecX tmp)
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_max2F(vRegF dst, vRegF src1, vecD src2, vecD tmp) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MaxReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "fmaxs $dst, $src1, $src2\n\t"
|
||||
"ins $tmp, S, $src2, 0, 1\n\t"
|
||||
"fmaxs $dst, $dst, $tmp\t max reduction2F" %}
|
||||
ins_encode %{
|
||||
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
|
||||
__ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($src2$$reg), 0, 1);
|
||||
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_max4F(vRegF dst, vRegF src1, vecX src2) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MaxReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "fmaxv $dst, T4S, $src2\n\t"
|
||||
"fmaxs $dst, $dst, $src1\t max reduction4F" %}
|
||||
ins_encode %{
|
||||
__ fmaxv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($src2$$reg));
|
||||
__ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_max2D(vRegD dst, vRegD src1, vecX src2, vecX tmp) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
|
||||
match(Set dst (MaxReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "fmaxd $dst, $src1, $src2\n\t"
|
||||
"ins $tmp, D, $src2, 0, 1\n\t"
|
||||
"fmaxd $dst, $dst, $tmp\t max reduction2D" %}
|
||||
ins_encode %{
|
||||
__ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
|
||||
__ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($src2$$reg), 0, 1);
|
||||
__ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_min2F(vRegF dst, vRegF src1, vecD src2, vecD tmp) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MinReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "fmins $dst, $src1, $src2\n\t"
|
||||
"ins $tmp, S, $src2, 0, 1\n\t"
|
||||
"fmins $dst, $dst, $tmp\t min reduction2F" %}
|
||||
ins_encode %{
|
||||
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
|
||||
__ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($src2$$reg), 0, 1);
|
||||
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_min4F(vRegF dst, vRegF src1, vecX src2) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MinReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst);
|
||||
format %{ "fminv $dst, T4S, $src2\n\t"
|
||||
"fmins $dst, $dst, $src1\t min reduction4F" %}
|
||||
ins_encode %{
|
||||
__ fminv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($src2$$reg));
|
||||
__ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
instruct reduce_min2D(vRegD dst, vRegD src1, vecX src2, vecX tmp) %{
|
||||
predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
|
||||
match(Set dst (MinReductionV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP_DEF dst, TEMP tmp);
|
||||
format %{ "fmind $dst, $src1, $src2\n\t"
|
||||
"ins $tmp, D, $src2, 0, 1\n\t"
|
||||
"fmind $dst, $dst, $tmp\t min reduction2D" %}
|
||||
ins_encode %{
|
||||
__ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
|
||||
__ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($src2$$reg), 0, 1);
|
||||
__ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
|
||||
%}
|
||||
ins_pipe(pipe_class_default);
|
||||
%}
|
||||
|
||||
// ====================VECTOR ARITHMETIC=======================================
|
||||
|
||||
// --------------------------------- ADD --------------------------------------
|
||||
@ -17198,6 +17290,90 @@ instruct vsrl2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
ins_pipe(vshift128_imm);
|
||||
%}
|
||||
|
||||
instruct vmax2F(vecD dst, vecD src1, vecD src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MaxV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmax $dst,$src1,$src2\t# vector (2F)" %}
|
||||
ins_encode %{
|
||||
__ fmax(as_FloatRegister($dst$$reg), __ T2S,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp64);
|
||||
%}
|
||||
|
||||
instruct vmax4F(vecX dst, vecX src1, vecX src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 4 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MaxV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmax $dst,$src1,$src2\t# vector (4S)" %}
|
||||
ins_encode %{
|
||||
__ fmax(as_FloatRegister($dst$$reg), __ T4S,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp128);
|
||||
%}
|
||||
|
||||
instruct vmax2D(vecX dst, vecX src1, vecX src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
|
||||
match(Set dst (MaxV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmax $dst,$src1,$src2\t# vector (2D)" %}
|
||||
ins_encode %{
|
||||
__ fmax(as_FloatRegister($dst$$reg), __ T2D,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp128);
|
||||
%}
|
||||
|
||||
instruct vmin2F(vecD dst, vecD src1, vecD src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MinV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmin $dst,$src1,$src2\t# vector (2F)" %}
|
||||
ins_encode %{
|
||||
__ fmin(as_FloatRegister($dst$$reg), __ T2S,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp64);
|
||||
%}
|
||||
|
||||
instruct vmin4F(vecX dst, vecX src1, vecX src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 4 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
|
||||
match(Set dst (MinV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmin $dst,$src1,$src2\t# vector (4S)" %}
|
||||
ins_encode %{
|
||||
__ fmin(as_FloatRegister($dst$$reg), __ T4S,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp128);
|
||||
%}
|
||||
|
||||
instruct vmin2D(vecX dst, vecX src1, vecX src2)
|
||||
%{
|
||||
predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
|
||||
match(Set dst (MinV src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "fmin $dst,$src1,$src2\t# vector (2D)" %}
|
||||
ins_encode %{
|
||||
__ fmin(as_FloatRegister($dst$$reg), __ T2D,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
%}
|
||||
ins_pipe(vdop_fp128);
|
||||
%}
|
||||
|
||||
//----------PEEPHOLE RULES-----------------------------------------------------
|
||||
// These must follow all instruction definitions as they use the names
|
||||
// defined in the instructions definitions.
|
||||
|
@ -2209,13 +2209,15 @@ public:
|
||||
rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
INSN(addv, 0, 0b100001);
|
||||
INSN(subv, 1, 0b100001);
|
||||
INSN(mulv, 0, 0b100111);
|
||||
INSN(mlav, 0, 0b100101);
|
||||
INSN(mlsv, 1, 0b100101);
|
||||
INSN(sshl, 0, 0b010001);
|
||||
INSN(ushl, 1, 0b010001);
|
||||
INSN(addv, 0, 0b100001);
|
||||
INSN(subv, 1, 0b100001);
|
||||
INSN(mulv, 0, 0b100111);
|
||||
INSN(mlav, 0, 0b100101);
|
||||
INSN(mlsv, 1, 0b100101);
|
||||
INSN(sshl, 0, 0b010001);
|
||||
INSN(ushl, 1, 0b010001);
|
||||
INSN(umullv, 1, 0b110000);
|
||||
INSN(umlalv, 1, 0b100000);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@ -2227,13 +2229,27 @@ public:
|
||||
rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
INSN(absr, 0, 0b100000101110);
|
||||
INSN(negr, 1, 0b100000101110);
|
||||
INSN(notr, 1, 0b100000010110);
|
||||
INSN(addv, 0, 0b110001101110);
|
||||
INSN(cls, 0, 0b100000010010);
|
||||
INSN(clz, 1, 0b100000010010);
|
||||
INSN(cnt, 0, 0b100000010110);
|
||||
INSN(absr, 0, 0b100000101110);
|
||||
INSN(negr, 1, 0b100000101110);
|
||||
INSN(notr, 1, 0b100000010110);
|
||||
INSN(addv, 0, 0b110001101110);
|
||||
INSN(cls, 0, 0b100000010010);
|
||||
INSN(clz, 1, 0b100000010010);
|
||||
INSN(cnt, 0, 0b100000010110);
|
||||
INSN(uaddlv, 1, 0b110000001110);
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, opc) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn) { \
|
||||
starti; \
|
||||
assert(T == T4S, "arrangement must be T4S"); \
|
||||
f(0, 31), f((int)T & 1, 30), f(0b101110, 29, 24), f(opc, 23), \
|
||||
f(T == T4S ? 0 : 1, 22), f(0b110000111110, 21, 10); rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
INSN(fmaxv, 0);
|
||||
INSN(fminv, 1);
|
||||
|
||||
#undef INSN
|
||||
|
||||
@ -2278,6 +2294,8 @@ public:
|
||||
INSN(fsub, 0, 1, 0b110101);
|
||||
INSN(fmla, 0, 0, 0b110011);
|
||||
INSN(fmls, 0, 1, 0b110011);
|
||||
INSN(fmax, 0, 0, 0b111101);
|
||||
INSN(fmin, 0, 1, 0b111101);
|
||||
|
||||
#undef INSN
|
||||
|
||||
|
@ -193,7 +193,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label done;
|
||||
Label runtime;
|
||||
@ -211,7 +210,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
// storing region crossing non-NULL, is card already dirty?
|
||||
|
||||
ExternalAddress cardtable((address) ct->byte_map_base());
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
const Register card_addr = tmp;
|
||||
|
||||
__ lsr(card_addr, store_addr, CardTable::card_shift);
|
||||
@ -417,7 +415,6 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label done;
|
||||
Label runtime;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, 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,7 +32,6 @@
|
||||
|
||||
#define __ masm->
|
||||
|
||||
|
||||
void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register obj, Address dst) {
|
||||
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
@ -40,7 +39,6 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register ob
|
||||
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
__ lsr(obj, obj, CardTable::card_shift);
|
||||
|
||||
@ -68,7 +66,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label L_loop;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -373,15 +373,9 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
|
||||
Register last_java_fp,
|
||||
address last_java_pc,
|
||||
Register scratch) {
|
||||
if (last_java_pc != NULL) {
|
||||
adr(scratch, last_java_pc);
|
||||
} else {
|
||||
// FIXME: This is almost never correct. We should delete all
|
||||
// cases of set_last_Java_frame with last_java_pc=NULL and use the
|
||||
// correct return address instead.
|
||||
adr(scratch, pc());
|
||||
}
|
||||
assert(last_java_pc != NULL, "must provide a valid PC");
|
||||
|
||||
adr(scratch, last_java_pc);
|
||||
str(scratch, Address(rthread,
|
||||
JavaThread::frame_anchor_offset()
|
||||
+ JavaFrameAnchor::last_Java_pc_offset()));
|
||||
@ -398,7 +392,7 @@ void MacroAssembler::set_last_Java_frame(Register last_java_sp,
|
||||
} else {
|
||||
InstructionMark im(this);
|
||||
L.add_patch_at(code(), locator());
|
||||
set_last_Java_frame(last_java_sp, last_java_fp, (address)NULL, scratch);
|
||||
set_last_Java_frame(last_java_sp, last_java_fp, pc() /* Patched later */, scratch);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4311,7 +4305,7 @@ void MacroAssembler::adrp(Register reg1, const Address &dest, unsigned long &byt
|
||||
}
|
||||
|
||||
void MacroAssembler::load_byte_map_base(Register reg) {
|
||||
jbyte *byte_map_base =
|
||||
CardTable::CardValue* byte_map_base =
|
||||
((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base();
|
||||
|
||||
if (is_valid_AArch64_address((address)byte_map_base)) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2018, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1782,14 +1782,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
}
|
||||
|
||||
// Change state to native (we save the return address in the thread, since it might not
|
||||
// be pushed on the stack when we do a a stack traversal). It is enough that the pc()
|
||||
// points into the right code segment. It does not have to be the correct return pc.
|
||||
// be pushed on the stack when we do a stack traversal).
|
||||
// We use the same pc/oopMap repeatedly when we call out
|
||||
|
||||
intptr_t the_pc = (intptr_t) __ pc();
|
||||
oop_maps->add_gc_map(the_pc - start, map);
|
||||
|
||||
__ set_last_Java_frame(sp, noreg, (address)the_pc, rscratch1);
|
||||
Label native_return;
|
||||
__ set_last_Java_frame(sp, noreg, native_return, rscratch1);
|
||||
|
||||
Label dtrace_method_entry, dtrace_method_entry_done;
|
||||
{
|
||||
@ -1922,6 +1919,11 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
return_type);
|
||||
}
|
||||
|
||||
__ bind(native_return);
|
||||
|
||||
intptr_t return_pc = (intptr_t) __ pc();
|
||||
oop_maps->add_gc_map(return_pc - start, map);
|
||||
|
||||
// Unpack native results.
|
||||
switch (ret_type) {
|
||||
case T_BOOLEAN: __ c2bool(r0); break;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -3257,11 +3257,14 @@ class StubGenerator: public StubCodeGenerator {
|
||||
Register buff = c_rarg1;
|
||||
Register len = c_rarg2;
|
||||
Register nmax = r4;
|
||||
Register base = r5;
|
||||
Register base = r5;
|
||||
Register count = r6;
|
||||
Register temp0 = rscratch1;
|
||||
Register temp1 = rscratch2;
|
||||
Register temp2 = r7;
|
||||
FloatRegister vbytes = v0;
|
||||
FloatRegister vs1acc = v1;
|
||||
FloatRegister vs2acc = v2;
|
||||
FloatRegister vtable = v3;
|
||||
|
||||
// Max number of bytes we can process before having to take the mod
|
||||
// 0x15B0 is 5552 in decimal, the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1
|
||||
@ -3271,6 +3274,10 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ mov(base, BASE);
|
||||
__ mov(nmax, NMAX);
|
||||
|
||||
// Load accumulation coefficients for the upper 16 bits
|
||||
__ lea(temp0, ExternalAddress((address) StubRoutines::aarch64::_adler_table));
|
||||
__ ld1(vtable, __ T16B, Address(temp0));
|
||||
|
||||
// s1 is initialized to the lower 16 bits of adler
|
||||
// s2 is initialized to the upper 16 bits of adler
|
||||
__ ubfx(s2, adler, 16, 16); // s2 = ((adler >> 16) & 0xffff)
|
||||
@ -3311,53 +3318,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
__ bind(L_nmax_loop);
|
||||
|
||||
__ ldp(temp0, temp1, Address(__ post(buff, 16)));
|
||||
|
||||
__ add(s1, s1, temp0, ext::uxtb);
|
||||
__ ubfx(temp2, temp0, 8, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 16, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 24, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 32, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 40, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 48, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp0, Assembler::LSR, 56);
|
||||
__ add(s2, s2, s1);
|
||||
|
||||
__ add(s1, s1, temp1, ext::uxtb);
|
||||
__ ubfx(temp2, temp1, 8, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 16, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 24, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 32, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 40, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 48, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp1, Assembler::LSR, 56);
|
||||
__ add(s2, s2, s1);
|
||||
generate_updateBytesAdler32_accum(s1, s2, buff, temp0, temp1,
|
||||
vbytes, vs1acc, vs2acc, vtable);
|
||||
|
||||
__ subs(count, count, 16);
|
||||
__ br(Assembler::HS, L_nmax_loop);
|
||||
@ -3400,53 +3362,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
__ bind(L_by16_loop);
|
||||
|
||||
__ ldp(temp0, temp1, Address(__ post(buff, 16)));
|
||||
|
||||
__ add(s1, s1, temp0, ext::uxtb);
|
||||
__ ubfx(temp2, temp0, 8, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 16, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 24, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 32, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 40, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp0, 48, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp0, Assembler::LSR, 56);
|
||||
__ add(s2, s2, s1);
|
||||
|
||||
__ add(s1, s1, temp1, ext::uxtb);
|
||||
__ ubfx(temp2, temp1, 8, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 16, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 24, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 32, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 40, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ ubfx(temp2, temp1, 48, 8);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp2);
|
||||
__ add(s2, s2, s1);
|
||||
__ add(s1, s1, temp1, Assembler::LSR, 56);
|
||||
__ add(s2, s2, s1);
|
||||
generate_updateBytesAdler32_accum(s1, s2, buff, temp0, temp1,
|
||||
vbytes, vs1acc, vs2acc, vtable);
|
||||
|
||||
__ subs(len, len, 16);
|
||||
__ br(Assembler::HS, L_by16_loop);
|
||||
@ -3500,6 +3417,43 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return start;
|
||||
}
|
||||
|
||||
void generate_updateBytesAdler32_accum(Register s1, Register s2, Register buff,
|
||||
Register temp0, Register temp1, FloatRegister vbytes,
|
||||
FloatRegister vs1acc, FloatRegister vs2acc, FloatRegister vtable) {
|
||||
// Below is a vectorized implementation of updating s1 and s2 for 16 bytes.
|
||||
// We use b1, b2, ..., b16 to denote the 16 bytes loaded in each iteration.
|
||||
// In non-vectorized code, we update s1 and s2 as:
|
||||
// s1 <- s1 + b1
|
||||
// s2 <- s2 + s1
|
||||
// s1 <- s1 + b2
|
||||
// s2 <- s2 + b1
|
||||
// ...
|
||||
// s1 <- s1 + b16
|
||||
// s2 <- s2 + s1
|
||||
// Putting above assignments together, we have:
|
||||
// s1_new = s1 + b1 + b2 + ... + b16
|
||||
// s2_new = s2 + (s1 + b1) + (s1 + b1 + b2) + ... + (s1 + b1 + b2 + ... + b16)
|
||||
// = s2 + s1 * 16 + (b1 * 16 + b2 * 15 + ... + b16 * 1)
|
||||
// = s2 + s1 * 16 + (b1, b2, ... b16) dot (16, 15, ... 1)
|
||||
__ ld1(vbytes, __ T16B, Address(__ post(buff, 16)));
|
||||
|
||||
// s2 = s2 + s1 * 16
|
||||
__ add(s2, s2, s1, Assembler::LSL, 4);
|
||||
|
||||
// vs1acc = b1 + b2 + b3 + ... + b16
|
||||
// vs2acc = (b1 * 16) + (b2 * 15) + (b3 * 14) + ... + (b16 * 1)
|
||||
__ umullv(vs2acc, __ T8B, vtable, vbytes);
|
||||
__ umlalv(vs2acc, __ T16B, vtable, vbytes);
|
||||
__ uaddlv(vs1acc, __ T16B, vbytes);
|
||||
__ uaddlv(vs2acc, __ T8H, vs2acc);
|
||||
|
||||
// s1 = s1 + vs1acc, s2 = s2 + vs2acc
|
||||
__ fmovd(temp0, vs1acc);
|
||||
__ fmovd(temp1, vs2acc);
|
||||
__ add(s1, s1, temp0);
|
||||
__ add(s2, s2, temp1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Arguments:
|
||||
*
|
||||
@ -4846,7 +4800,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
// Set up last_Java_sp and last_Java_fp
|
||||
address the_pc = __ pc();
|
||||
__ set_last_Java_frame(sp, rfp, (address)NULL, rscratch1);
|
||||
__ set_last_Java_frame(sp, rfp, the_pc, rscratch1);
|
||||
|
||||
// Call runtime
|
||||
if (arg1 != noreg) {
|
||||
|
@ -287,6 +287,11 @@ juint StubRoutines::aarch64::_crc_table[] ATTRIBUTE_ALIGNED(4096) =
|
||||
0xD502ED78UL, 0xAE7D62EDUL, // byte swap of word swap
|
||||
};
|
||||
|
||||
// Accumulation coefficients for adler32 upper 16 bits
|
||||
jubyte StubRoutines::aarch64::_adler_table[] __attribute__ ((aligned(64))) = {
|
||||
16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
|
||||
};
|
||||
|
||||
juint StubRoutines::aarch64::_npio2_hw[] __attribute__ ((aligned(64))) = {
|
||||
// first, various coefficient values: 0.5, invpio2, pio2_1, pio2_1t, pio2_2,
|
||||
// pio2_2t, pio2_3, pio2_3t
|
||||
|
@ -186,6 +186,7 @@ class aarch64 {
|
||||
|
||||
private:
|
||||
static juint _crc_table[];
|
||||
static jubyte _adler_table[];
|
||||
// begin trigonometric tables block. See comments in .cpp file
|
||||
static juint _npio2_hw[];
|
||||
static jdouble _two_over_pi[];
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2018, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1351,9 +1351,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
// pass JNIEnv
|
||||
__ add(c_rarg0, rthread, in_bytes(JavaThread::jni_environment_offset()));
|
||||
|
||||
// It is enough that the pc() points into the right code
|
||||
// segment. It does not have to be the correct return pc.
|
||||
__ set_last_Java_frame(esp, rfp, (address)NULL, rscratch1);
|
||||
// Set the last Java PC in the frame anchor to be the return address from
|
||||
// the call to the native method: this will allow the debugger to
|
||||
// generate an accurate stack trace.
|
||||
Label native_return;
|
||||
__ set_last_Java_frame(esp, rfp, native_return, rscratch1);
|
||||
|
||||
// change thread state
|
||||
#ifdef ASSERT
|
||||
@ -1374,6 +1376,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
|
||||
// Call the native method.
|
||||
__ blrt(r10, rscratch1);
|
||||
__ bind(native_return);
|
||||
__ maybe_isb();
|
||||
__ get_method(rmethod);
|
||||
// result potentially in r0 or v0
|
||||
|
@ -194,6 +194,19 @@ void VM_Version::get_processor_features() {
|
||||
|
||||
// Enable vendor specific features
|
||||
|
||||
// Ampere eMAG
|
||||
if (_cpu == CPU_AMCC && (_model == 0) && (_variant == 0x3)) {
|
||||
if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
|
||||
FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
|
||||
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(UseSIMDForArrayEquals)) {
|
||||
FLAG_SET_DEFAULT(UseSIMDForArrayEquals, !(_revision == 1 || _revision == 2));
|
||||
}
|
||||
}
|
||||
|
||||
// ThunderX
|
||||
if (_cpu == CPU_CAVIUM && (_model == 0xA1)) {
|
||||
if (_variant == 0) _features |= CPU_DMB_ATOMICS;
|
||||
@ -219,6 +232,16 @@ void VM_Version::get_processor_features() {
|
||||
}
|
||||
}
|
||||
|
||||
// HiSilicon TSV110
|
||||
if (_cpu == CPU_HISILICON && _model == 0xd01) {
|
||||
if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
|
||||
FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
|
||||
}
|
||||
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
|
||||
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
|
||||
}
|
||||
}
|
||||
|
||||
// Cortex A53
|
||||
if (_cpu == CPU_ARM && (_model == 0xd03 || _model2 == 0xd03)) {
|
||||
_features |= CPU_A53MAC;
|
||||
|
@ -72,6 +72,7 @@ public:
|
||||
CPU_BROADCOM = 'B',
|
||||
CPU_CAVIUM = 'C',
|
||||
CPU_DEC = 'D',
|
||||
CPU_HISILICON = 'H',
|
||||
CPU_INFINEON = 'I',
|
||||
CPU_MOTOROLA = 'M',
|
||||
CPU_NVIDIA = 'N',
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2019, 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
|
||||
@ -216,7 +216,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
|
||||
// storing region crossing non-NULL, is card already dirty?
|
||||
const Register card_addr = tmp1;
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
__ mov_address(tmp2, (address)ct->byte_map_base());
|
||||
__ add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTable::card_shift));
|
||||
|
@ -47,7 +47,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
BarrierSet* bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label L_cardtable_loop, L_done;
|
||||
|
||||
@ -102,7 +101,6 @@ void CardTableBarrierSetAssembler::store_check_part1(MacroAssembler* masm, Regis
|
||||
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "Adjust store check code");
|
||||
|
||||
// Load card table base address.
|
||||
|
||||
@ -132,7 +130,6 @@ void CardTableBarrierSetAssembler::store_check_part2(MacroAssembler* masm, Regis
|
||||
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "Adjust store check code");
|
||||
|
||||
assert(CardTable::dirty_card_val() == 0, "Dirty card value must be 0 due to optimizations.");
|
||||
Address card_table_addr(card_table_base, obj, lsr, CardTable::card_shift);
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2017, SAP SE. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2019, 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
|
||||
@ -2378,23 +2378,28 @@ void LIR_Assembler::setup_md_access(ciMethod* method, int bci,
|
||||
|
||||
|
||||
void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) {
|
||||
Register obj = op->object()->as_register();
|
||||
const Register obj = op->object()->as_register(); // Needs to live in this register at safepoint (patching stub).
|
||||
Register k_RInfo = op->tmp1()->as_register();
|
||||
Register klass_RInfo = op->tmp2()->as_register();
|
||||
Register Rtmp1 = op->tmp3()->as_register();
|
||||
Register dst = op->result_opr()->as_register();
|
||||
ciKlass* k = op->klass();
|
||||
bool should_profile = op->should_profile();
|
||||
bool move_obj_to_dst = (op->code() == lir_checkcast);
|
||||
// Attention: do_temp(opTypeCheck->_object) is not used, i.e. obj may be same as one of the temps.
|
||||
bool reg_conflict = (obj == k_RInfo || obj == klass_RInfo || obj == Rtmp1);
|
||||
bool restore_obj = move_obj_to_dst && reg_conflict;
|
||||
bool reg_conflict = false;
|
||||
if (obj == k_RInfo) {
|
||||
k_RInfo = dst;
|
||||
reg_conflict = true;
|
||||
} else if (obj == klass_RInfo) {
|
||||
klass_RInfo = dst;
|
||||
reg_conflict = true;
|
||||
} else if (obj == Rtmp1) {
|
||||
Rtmp1 = dst;
|
||||
reg_conflict = true;
|
||||
}
|
||||
assert_different_registers(obj, k_RInfo, klass_RInfo, Rtmp1);
|
||||
|
||||
__ cmpdi(CCR0, obj, 0);
|
||||
if (move_obj_to_dst || reg_conflict) {
|
||||
__ mr_if_needed(dst, obj);
|
||||
if (reg_conflict) { obj = dst; }
|
||||
}
|
||||
|
||||
ciMethodData* md = NULL;
|
||||
ciProfileData* data = NULL;
|
||||
@ -2460,12 +2465,27 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
} else {
|
||||
// Call out-of-line instance of __ check_klass_subtype_slow_path(...):
|
||||
address entry = Runtime1::entry_for(Runtime1::slow_subtype_check_id);
|
||||
//__ load_const_optimized(Rtmp1, entry, R0);
|
||||
__ calculate_address_from_global_toc(Rtmp1, entry, true, true, false);
|
||||
__ mtctr(Rtmp1);
|
||||
// Stub needs fixed registers (tmp1-3).
|
||||
Register original_k_RInfo = op->tmp1()->as_register();
|
||||
Register original_klass_RInfo = op->tmp2()->as_register();
|
||||
Register original_Rtmp1 = op->tmp3()->as_register();
|
||||
bool keep_obj_alive = reg_conflict && (op->code() == lir_checkcast);
|
||||
bool keep_klass_RInfo_alive = (obj == original_klass_RInfo) && should_profile;
|
||||
if (keep_obj_alive && (obj != original_Rtmp1)) { __ mr(R0, obj); }
|
||||
__ mr_if_needed(original_k_RInfo, k_RInfo);
|
||||
__ mr_if_needed(original_klass_RInfo, klass_RInfo);
|
||||
if (keep_obj_alive) { __ mr(dst, (obj == original_Rtmp1) ? obj : R0); }
|
||||
//__ load_const_optimized(original_Rtmp1, entry, R0);
|
||||
__ calculate_address_from_global_toc(original_Rtmp1, entry, true, true, false);
|
||||
__ mtctr(original_Rtmp1);
|
||||
__ bctrl(); // sets CR0
|
||||
if (keep_obj_alive) {
|
||||
if (keep_klass_RInfo_alive) { __ mr(R0, obj); }
|
||||
__ mr(obj, dst);
|
||||
}
|
||||
if (should_profile) {
|
||||
__ bne(CCR0, *failure_target);
|
||||
if (keep_klass_RInfo_alive) { __ mr(klass_RInfo, keep_obj_alive ? R0 : obj); }
|
||||
// Fall through to success case.
|
||||
} else {
|
||||
__ beq(CCR0, *success);
|
||||
@ -2493,11 +2513,6 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
||||
}
|
||||
|
||||
__ bind(*failure);
|
||||
|
||||
if (restore_obj) {
|
||||
__ mr(op->object()->as_register(), dst);
|
||||
// Fall through to failure case.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2590,10 +2605,11 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
|
||||
|
||||
} else if (code == lir_checkcast) {
|
||||
Label success, failure;
|
||||
emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success); // Moves obj to dst.
|
||||
emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success);
|
||||
__ b(*op->stub()->entry());
|
||||
__ align(32, 12);
|
||||
__ bind(success);
|
||||
__ mr_if_needed(op->result_opr()->as_register(), op->object()->as_register());
|
||||
} else if (code == lir_instanceof) {
|
||||
Register dst = op->result_opr()->as_register();
|
||||
Label success, failure, done;
|
||||
|
@ -213,7 +213,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
|
||||
assert_different_registers(store_addr, new_val, tmp1, tmp2);
|
||||
|
||||
CardTableBarrierSet* ct = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
// Does store cross heap regions?
|
||||
__ xorr(tmp1, store_addr, new_val);
|
||||
@ -478,7 +477,7 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
|
||||
Register tmp = R0;
|
||||
Register addr = R14;
|
||||
Register tmp2 = R15;
|
||||
jbyte* byte_map_base = bs->card_table()->byte_map_base();
|
||||
CardTable::CardValue* byte_map_base = bs->card_table()->byte_map_base();
|
||||
|
||||
Label restart, refill, ret;
|
||||
|
||||
|
@ -45,7 +45,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
Register count, Register preserve) {
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
assert_different_registers(addr, count, R0);
|
||||
|
||||
Label Lskip_loop, Lstore_loop;
|
||||
@ -73,7 +72,7 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::card_table_write(MacroAssembler* masm,
|
||||
jbyte* byte_map_base,
|
||||
CardTable::CardValue* byte_map_base,
|
||||
Register tmp, Register obj) {
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
CardTable* ct = ctbs->card_table();
|
||||
|
@ -34,7 +34,7 @@ protected:
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register addr, Register count, Register preserve);
|
||||
|
||||
void card_table_write(MacroAssembler* masm, jbyte* byte_map_base, Register tmp, Register obj);
|
||||
void card_table_write(MacroAssembler* masm, CardTable::CardValue* byte_map_base, Register tmp, Register obj);
|
||||
|
||||
void card_write_barrier_post(MacroAssembler* masm, Register store_addr, Register tmp);
|
||||
|
||||
|
@ -269,7 +269,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
|
||||
Label callRuntime, filtered;
|
||||
|
||||
CardTableBarrierSet* ct = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
BLOCK_COMMENT("g1_write_barrier_post {");
|
||||
|
||||
@ -298,7 +297,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
|
||||
Rnew_val = noreg; // end of lifetime
|
||||
|
||||
// Storing region crossing non-NULL, is card already dirty?
|
||||
assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
assert_different_registers(Rtmp1, Rtmp2, Rtmp3);
|
||||
// Make sure not to use Z_R0 for any of these registers.
|
||||
Register Rcard_addr = (Rtmp1 != Z_R0_scratch) ? Rtmp1 : Rtmp3;
|
||||
@ -311,14 +309,12 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm, Decorato
|
||||
Rbase = noreg; // end of lifetime
|
||||
|
||||
// Filter young.
|
||||
assert((unsigned int)G1CardTable::g1_young_card_val() <= 255, "otherwise check this code");
|
||||
__ z_cli(0, Rcard_addr, G1CardTable::g1_young_card_val());
|
||||
__ z_bre(filtered);
|
||||
|
||||
// Check the card value. If dirty, we're done.
|
||||
// This also avoids false sharing of the (already dirty) card.
|
||||
__ z_sync(); // Required to support concurrent cleaning.
|
||||
assert((unsigned int)G1CardTable::dirty_card_val() <= 255, "otherwise check this code");
|
||||
__ z_cli(0, Rcard_addr, G1CardTable::dirty_card_val()); // Reload after membar.
|
||||
__ z_bre(filtered);
|
||||
|
||||
@ -542,7 +538,7 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
|
||||
Register cardtable = r1; // Must be non-volatile, because it is used to save addr_card.
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
jbyte* byte_map_base = ct->byte_map_base();
|
||||
CardTable::CardValue* byte_map_base = ct->byte_map_base();
|
||||
|
||||
// Save registers used below (see assertion in G1PreBarrierStub::emit_code()).
|
||||
__ z_stg(r1, 0*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
|
||||
|
@ -47,7 +47,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
bool do_return) {
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
NearLabel doXC, done;
|
||||
assert_different_registers(Z_R0, Z_R1, addr, count);
|
||||
@ -144,7 +143,6 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register st
|
||||
// register obj is destroyed afterwards.
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
assert_different_registers(store_addr, tmp);
|
||||
|
||||
|
@ -275,7 +275,7 @@ static address dirty_card_log_enqueue = 0;
|
||||
static u_char* dirty_card_log_enqueue_end = 0;
|
||||
|
||||
// This gets to assume that o0 contains the object address.
|
||||
static void generate_dirty_card_log_enqueue(jbyte* byte_map_base) {
|
||||
static void generate_dirty_card_log_enqueue(CardTable::CardValue* byte_map_base) {
|
||||
BufferBlob* bb = BufferBlob::create("dirty_card_enqueue", EnqueueCodeSize*2);
|
||||
CodeBuffer buf(bb);
|
||||
MacroAssembler masm(&buf);
|
||||
@ -626,7 +626,7 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
|
||||
Register cardtable = G5;
|
||||
Register tmp = G1_scratch;
|
||||
Register tmp2 = G3_scratch;
|
||||
jbyte* byte_map_base = bs->card_table()->byte_map_base();
|
||||
CardTable::CardValue* byte_map_base = bs->card_table()->byte_map_base();
|
||||
|
||||
Label not_already_dirty, restart, refill, young_card;
|
||||
|
||||
|
@ -44,7 +44,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
Register addr, Register count, Register tmp) {
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
assert_different_registers(addr, count, tmp);
|
||||
|
||||
Label L_loop, L_done;
|
||||
@ -70,7 +69,7 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
}
|
||||
|
||||
void CardTableBarrierSetAssembler::card_table_write(MacroAssembler* masm,
|
||||
jbyte* byte_map_base,
|
||||
CardTable::CardValue* byte_map_base,
|
||||
Register tmp, Register obj) {
|
||||
__ srlx(obj, CardTable::card_shift, obj);
|
||||
assert(tmp != obj, "need separate temp reg");
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define CPU_SPARC_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_SPARC_HPP
|
||||
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "gc/shared/cardTable.hpp"
|
||||
#include "gc/shared/modRefBarrierSetAssembler.hpp"
|
||||
|
||||
class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
|
||||
@ -33,7 +34,7 @@ protected:
|
||||
virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
|
||||
Register addr, Register count, Register tmp);
|
||||
|
||||
void card_table_write(MacroAssembler* masm, jbyte* byte_map_base, Register tmp, Register obj);
|
||||
void card_table_write(MacroAssembler* masm, CardTable::CardValue* byte_map_base, Register tmp, Register obj);
|
||||
|
||||
void card_write_barrier_post(MacroAssembler* masm, Register store_addr, Register new_val, Register tmp);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2019, 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
|
||||
@ -7765,9 +7765,43 @@ int Assembler::simd_prefix_and_encode(XMMRegister dst, XMMRegister nds, XMMRegis
|
||||
}
|
||||
}
|
||||
|
||||
void Assembler::vmaxss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8(0x5F);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::vmaxsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
|
||||
attributes.set_rex_vex_w_reverted();
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8(0x5F);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::vminss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8(0x5D);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::vminsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
|
||||
attributes.set_rex_vex_w_reverted();
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8(0x5D);
|
||||
emit_int8((unsigned char)(0xC0 | encode));
|
||||
}
|
||||
|
||||
void Assembler::cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
assert(vector_len <= AVX_256bit, "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
|
||||
int encode = simd_prefix_and_encode(dst, nds, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8((unsigned char)0xC2);
|
||||
@ -7777,7 +7811,7 @@ void Assembler::cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop
|
||||
|
||||
void Assembler::blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
assert(vector_len <= AVX_256bit, "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
|
||||
emit_int8((unsigned char)0x4B);
|
||||
@ -7788,7 +7822,7 @@ void Assembler::blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMM
|
||||
|
||||
void Assembler::cmpps(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
assert(vector_len <= AVX_256bit, "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
|
||||
int encode = simd_prefix_and_encode(dst, nds, src, VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
|
||||
emit_int8((unsigned char)0xC2);
|
||||
@ -7798,7 +7832,7 @@ void Assembler::cmpps(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop
|
||||
|
||||
void Assembler::blendvps(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len) {
|
||||
assert(VM_Version::supports_avx(), "");
|
||||
assert(!VM_Version::supports_evex(), "");
|
||||
assert(vector_len <= AVX_256bit, "");
|
||||
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
|
||||
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
|
||||
emit_int8((unsigned char)0x4A);
|
||||
|
@ -1934,6 +1934,11 @@ private:
|
||||
void vsubss(XMMRegister dst, XMMRegister nds, Address src);
|
||||
void vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src);
|
||||
|
||||
void vmaxss(XMMRegister dst, XMMRegister nds, XMMRegister src);
|
||||
void vmaxsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
|
||||
void vminss(XMMRegister dst, XMMRegister nds, XMMRegister src);
|
||||
void vminsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
|
||||
|
||||
void shlxl(Register dst, Register src1, Register src2);
|
||||
void shlxq(Register dst, Register src1, Register src2);
|
||||
|
||||
|
@ -273,7 +273,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
|
||||
|
||||
CardTableBarrierSet* ct =
|
||||
barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label done;
|
||||
Label runtime;
|
||||
@ -522,7 +521,6 @@ void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler*
|
||||
|
||||
CardTableBarrierSet* ct =
|
||||
barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
|
||||
assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
Label done;
|
||||
Label enqueued;
|
||||
|
@ -46,7 +46,6 @@ void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembl
|
||||
BarrierSet *bs = BarrierSet::barrier_set();
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
intptr_t disp = (intptr_t) ct->byte_map_base();
|
||||
|
||||
Label L_loop, L_done;
|
||||
@ -92,7 +91,6 @@ void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register ob
|
||||
|
||||
CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
|
||||
CardTable* ct = ctbs->card_table();
|
||||
assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
|
||||
|
||||
__ shrptr(obj, CardTable::card_shift);
|
||||
|
||||
|
@ -165,6 +165,7 @@ class MacroAssembler: public Assembler {
|
||||
|
||||
// Support optimal SSE move instructions.
|
||||
void movflt(XMMRegister dst, XMMRegister src) {
|
||||
if (dst-> encoding() == src->encoding()) return;
|
||||
if (UseXmmRegToRegMoveAll) { movaps(dst, src); return; }
|
||||
else { movss (dst, src); return; }
|
||||
}
|
||||
@ -173,6 +174,7 @@ class MacroAssembler: public Assembler {
|
||||
void movflt(Address dst, XMMRegister src) { movss(dst, src); }
|
||||
|
||||
void movdbl(XMMRegister dst, XMMRegister src) {
|
||||
if (dst-> encoding() == src->encoding()) return;
|
||||
if (UseXmmRegToRegMoveAll) { movapd(dst, src); return; }
|
||||
else { movsd (dst, src); return; }
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ static bool returns_to_call_stub(address return_pc) { return return_pc == _call_
|
||||
|
||||
enum platform_dependent_constants {
|
||||
code_size1 = 20000 LP64_ONLY(+10000), // simply increase if too small (assembler will crash if too small)
|
||||
code_size2 = 35300 LP64_ONLY(+10000) // simply increase if too small (assembler will crash if too small)
|
||||
code_size2 = 35300 LP64_ONLY(+11000) // simply increase if too small (assembler will crash if too small)
|
||||
};
|
||||
|
||||
class x86 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2011, 2019, 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
|
||||
@ -1450,6 +1450,15 @@ const bool Matcher::match_rule_supported(int opcode) {
|
||||
if (UseSSE < 2)
|
||||
ret_value = false;
|
||||
break;
|
||||
#ifdef _LP64
|
||||
case Op_MaxD:
|
||||
case Op_MaxF:
|
||||
case Op_MinD:
|
||||
case Op_MinF:
|
||||
if (UseAVX < 1) // enabled for AVX only
|
||||
ret_value = false;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret_value; // Per default match rules are supported.
|
||||
|
@ -391,7 +391,7 @@ void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
|
||||
int format) {
|
||||
#ifdef ASSERT
|
||||
if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
|
||||
assert(oopDesc::is_oop(cast_to_oop(d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d32))), "cannot embed scavengable oops in code");
|
||||
assert(oopDesc::is_oop(cast_to_oop(d32)), "cannot embed broken oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
|
@ -547,7 +547,7 @@ void emit_d32_reloc(CodeBuffer& cbuf, int d32, RelocationHolder const& rspec, in
|
||||
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
|
||||
assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
|
||||
assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop((intptr_t)d32))), "cannot embed scavengable oops in code");
|
||||
assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)), "cannot embed broken oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
@ -574,8 +574,7 @@ void emit_d64_reloc(CodeBuffer& cbuf, int64_t d64, RelocationHolder const& rspec
|
||||
if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
|
||||
assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
|
||||
assert(oopDesc::is_oop(cast_to_oop(d64)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d64))),
|
||||
"cannot embed scavengable oops in code");
|
||||
assert(oopDesc::is_oop(cast_to_oop(d64)), "cannot embed broken oops in code");
|
||||
}
|
||||
#endif
|
||||
cbuf.relocate(cbuf.insts_mark(), rspec, format);
|
||||
@ -698,6 +697,87 @@ void emit_cmpfp3(MacroAssembler& _masm, Register dst) {
|
||||
__ bind(done);
|
||||
}
|
||||
|
||||
// Math.min() # Math.max()
|
||||
// --------------------------
|
||||
// ucomis[s/d] #
|
||||
// ja -> b # a
|
||||
// jp -> NaN # NaN
|
||||
// jb -> a # b
|
||||
// je #
|
||||
// |-jz -> a | b # a & b
|
||||
// | -> a #
|
||||
void emit_fp_min_max(MacroAssembler& _masm, XMMRegister dst,
|
||||
XMMRegister a, XMMRegister b,
|
||||
XMMRegister xmmt, Register rt,
|
||||
bool min, bool single) {
|
||||
|
||||
Label nan, zero, below, above, done;
|
||||
|
||||
if (single)
|
||||
__ ucomiss(a, b);
|
||||
else
|
||||
__ ucomisd(a, b);
|
||||
|
||||
if (dst->encoding() != (min ? b : a)->encoding())
|
||||
__ jccb(Assembler::above, above); // CF=0 & ZF=0
|
||||
else
|
||||
__ jccb(Assembler::above, done);
|
||||
|
||||
__ jccb(Assembler::parity, nan); // PF=1
|
||||
__ jccb(Assembler::below, below); // CF=1
|
||||
|
||||
// equal
|
||||
__ vpxor(xmmt, xmmt, xmmt, Assembler::AVX_128bit);
|
||||
if (single) {
|
||||
__ ucomiss(a, xmmt);
|
||||
__ jccb(Assembler::equal, zero);
|
||||
|
||||
__ movflt(dst, a);
|
||||
__ jmp(done);
|
||||
}
|
||||
else {
|
||||
__ ucomisd(a, xmmt);
|
||||
__ jccb(Assembler::equal, zero);
|
||||
|
||||
__ movdbl(dst, a);
|
||||
__ jmp(done);
|
||||
}
|
||||
|
||||
__ bind(zero);
|
||||
if (min)
|
||||
__ vpor(dst, a, b, Assembler::AVX_128bit);
|
||||
else
|
||||
__ vpand(dst, a, b, Assembler::AVX_128bit);
|
||||
|
||||
__ jmp(done);
|
||||
|
||||
__ bind(above);
|
||||
if (single)
|
||||
__ movflt(dst, min ? b : a);
|
||||
else
|
||||
__ movdbl(dst, min ? b : a);
|
||||
|
||||
__ jmp(done);
|
||||
|
||||
__ bind(nan);
|
||||
if (single) {
|
||||
__ movl(rt, 0x7fc00000); // Float.NaN
|
||||
__ movdl(dst, rt);
|
||||
}
|
||||
else {
|
||||
__ mov64(rt, 0x7ff8000000000000L); // Double.NaN
|
||||
__ movdq(dst, rt);
|
||||
}
|
||||
__ jmp(done);
|
||||
|
||||
__ bind(below);
|
||||
if (single)
|
||||
__ movflt(dst, min ? a : b);
|
||||
else
|
||||
__ movdbl(dst, min ? a : b);
|
||||
|
||||
__ bind(done);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty;
|
||||
@ -3547,6 +3627,15 @@ operand regF() %{
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Float register operands
|
||||
operand legRegF() %{
|
||||
constraint(ALLOC_IN_RC(float_reg_legacy));
|
||||
match(RegF);
|
||||
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Float register operands
|
||||
operand vlRegF() %{
|
||||
constraint(ALLOC_IN_RC(float_reg_vl));
|
||||
@ -3565,6 +3654,15 @@ operand regD() %{
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Double register operands
|
||||
operand legRegD() %{
|
||||
constraint(ALLOC_IN_RC(double_reg_legacy));
|
||||
match(RegD);
|
||||
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Double register operands
|
||||
operand vlRegD() %{
|
||||
constraint(ALLOC_IN_RC(double_reg_vl));
|
||||
@ -5303,6 +5401,16 @@ instruct MoveF2VL(vlRegF dst, regF src) %{
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Float
|
||||
instruct MoveF2LEG(legRegF dst, regF src) %{
|
||||
match(Set dst src);
|
||||
format %{ "movss $dst,$src\t# if src != dst load float (4 bytes)" %}
|
||||
ins_encode %{
|
||||
__ movflt($dst$$XMMRegister, $src$$XMMRegister);
|
||||
%}
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Float
|
||||
instruct MoveVL2F(regF dst, vlRegF src) %{
|
||||
match(Set dst src);
|
||||
@ -5313,6 +5421,16 @@ instruct MoveVL2F(regF dst, vlRegF src) %{
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Float
|
||||
instruct MoveLEG2F(regF dst, legRegF src) %{
|
||||
match(Set dst src);
|
||||
format %{ "movss $dst,$src\t# if src != dst load float (4 bytes)" %}
|
||||
ins_encode %{
|
||||
__ movflt($dst$$XMMRegister, $src$$XMMRegister);
|
||||
%}
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Double
|
||||
instruct loadD_partial(regD dst, memory mem)
|
||||
%{
|
||||
@ -5350,6 +5468,16 @@ instruct MoveD2VL(vlRegD dst, regD src) %{
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Double
|
||||
instruct MoveD2LEG(legRegD dst, regD src) %{
|
||||
match(Set dst src);
|
||||
format %{ "movsd $dst,$src\t# if src != dst load double (8 bytes)" %}
|
||||
ins_encode %{
|
||||
__ movdbl($dst$$XMMRegister, $src$$XMMRegister);
|
||||
%}
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Double
|
||||
instruct MoveVL2D(regD dst, vlRegD src) %{
|
||||
match(Set dst src);
|
||||
@ -5360,6 +5488,167 @@ instruct MoveVL2D(regD dst, vlRegD src) %{
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Load Double
|
||||
instruct MoveLEG2D(regD dst, legRegD src) %{
|
||||
match(Set dst src);
|
||||
format %{ "movsd $dst,$src\t# if src != dst load double (8 bytes)" %}
|
||||
ins_encode %{
|
||||
__ movdbl($dst$$XMMRegister, $src$$XMMRegister);
|
||||
%}
|
||||
ins_pipe( fpu_reg_reg );
|
||||
%}
|
||||
|
||||
// Following pseudo code describes the algorithm for max[FD]:
|
||||
// Min algorithm is on similar lines
|
||||
// btmp = (b < +0.0) ? a : b
|
||||
// atmp = (b < +0.0) ? b : a
|
||||
// Tmp = Max_Float(atmp , btmp)
|
||||
// Res = (atmp == NaN) ? atmp : Tmp
|
||||
|
||||
// max = java.lang.Math.max(float a, float b)
|
||||
instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
||||
predicate(UseAVX > 0 && !n->is_reduction());
|
||||
match(Set dst (MaxF a b));
|
||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||
format %{
|
||||
"blendvps $btmp,$b,$a,$b \n\t"
|
||||
"blendvps $atmp,$a,$b,$b \n\t"
|
||||
"vmaxss $tmp,$atmp,$btmp \n\t"
|
||||
"cmpps.unordered $btmp,$atmp,$atmp \n\t"
|
||||
"blendvps $dst,$tmp,$atmp,$btmp \n\t"
|
||||
%}
|
||||
ins_encode %{
|
||||
int vector_len = Assembler::AVX_128bit;
|
||||
__ blendvps($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, vector_len);
|
||||
__ blendvps($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $b$$XMMRegister, vector_len);
|
||||
__ vmaxss($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
|
||||
__ cmpps($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
|
||||
__ blendvps($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct maxF_reduction_reg(regF dst, regF a, regF b, regF xmmt, rRegI tmp, rFlagsReg cr) %{
|
||||
predicate(UseAVX > 0 && n->is_reduction());
|
||||
match(Set dst (MaxF a b));
|
||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||
|
||||
format %{ "$dst = max($a, $b)\t# intrinsic (float)" %}
|
||||
ins_encode %{
|
||||
emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
|
||||
false /*min*/, true /*single*/);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
// max = java.lang.Math.max(double a, double b)
|
||||
instruct maxD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
||||
predicate(UseAVX > 0 && !n->is_reduction());
|
||||
match(Set dst (MaxD a b));
|
||||
effect(USE a, USE b, TEMP atmp, TEMP btmp, TEMP tmp);
|
||||
format %{
|
||||
"blendvpd $btmp,$b,$a,$b \n\t"
|
||||
"blendvpd $atmp,$a,$b,$b \n\t"
|
||||
"vmaxsd $tmp,$atmp,$btmp \n\t"
|
||||
"cmppd.unordered $btmp,$atmp,$atmp \n\t"
|
||||
"blendvpd $dst,$tmp,$atmp,$btmp \n\t"
|
||||
%}
|
||||
ins_encode %{
|
||||
int vector_len = Assembler::AVX_128bit;
|
||||
__ blendvpd($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, vector_len);
|
||||
__ blendvpd($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $b$$XMMRegister, vector_len);
|
||||
__ vmaxsd($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
|
||||
__ cmppd($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
|
||||
__ blendvpd($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct maxD_reduction_reg(regD dst, regD a, regD b, regD xmmt, rRegL tmp, rFlagsReg cr) %{
|
||||
predicate(UseAVX > 0 && n->is_reduction());
|
||||
match(Set dst (MaxD a b));
|
||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||
|
||||
format %{ "$dst = max($a, $b)\t# intrinsic (double)" %}
|
||||
ins_encode %{
|
||||
emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
|
||||
false /*min*/, false /*single*/);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
// min = java.lang.Math.min(float a, float b)
|
||||
instruct minF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
|
||||
predicate(UseAVX > 0 && !n->is_reduction());
|
||||
match(Set dst (MinF a b));
|
||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||
format %{
|
||||
"blendvps $atmp,$a,$b,$a \n\t"
|
||||
"blendvps $btmp,$b,$a,$a \n\t"
|
||||
"vminss $tmp,$atmp,$btmp \n\t"
|
||||
"cmpps.unordered $btmp,$atmp,$atmp \n\t"
|
||||
"blendvps $dst,$tmp,$atmp,$btmp \n\t"
|
||||
%}
|
||||
ins_encode %{
|
||||
int vector_len = Assembler::AVX_128bit;
|
||||
__ blendvps($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, vector_len);
|
||||
__ blendvps($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $a$$XMMRegister, vector_len);
|
||||
__ vminss($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
|
||||
__ cmpps($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
|
||||
__ blendvps($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct minF_reduction_reg(regF dst, regF a, regF b, regF xmmt, rRegI tmp, rFlagsReg cr) %{
|
||||
predicate(UseAVX > 0 && n->is_reduction());
|
||||
match(Set dst (MinF a b));
|
||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||
|
||||
format %{ "$dst = min($a, $b)\t# intrinsic (float)" %}
|
||||
ins_encode %{
|
||||
emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
|
||||
true /*min*/, true /*single*/);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
// min = java.lang.Math.min(double a, double b)
|
||||
instruct minD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
|
||||
predicate(UseAVX > 0 && !n->is_reduction());
|
||||
match(Set dst (MinD a b));
|
||||
effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
|
||||
format %{
|
||||
"blendvpd $atmp,$a,$b,$a \n\t"
|
||||
"blendvpd $btmp,$b,$a,$a \n\t"
|
||||
"vminsd $tmp,$atmp,$btmp \n\t"
|
||||
"cmppd.unordered $btmp,$atmp,$atmp \n\t"
|
||||
"blendvpd $dst,$tmp,$atmp,$btmp \n\t"
|
||||
%}
|
||||
ins_encode %{
|
||||
int vector_len = Assembler::AVX_128bit;
|
||||
__ blendvpd($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, vector_len);
|
||||
__ blendvpd($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $a$$XMMRegister, vector_len);
|
||||
__ vminsd($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
|
||||
__ cmppd($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
|
||||
__ blendvpd($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
instruct minD_reduction_reg(regD dst, regD a, regD b, regD xmmt, rRegL tmp, rFlagsReg cr) %{
|
||||
predicate(UseAVX > 0 && n->is_reduction());
|
||||
match(Set dst (MinD a b));
|
||||
effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
|
||||
|
||||
format %{ "$dst = min($a, $b)\t# intrinsic (double)" %}
|
||||
ins_encode %{
|
||||
emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
|
||||
true /*min*/, false /*single*/);
|
||||
%}
|
||||
ins_pipe( pipe_slow );
|
||||
%}
|
||||
|
||||
// Load Effective Address
|
||||
instruct leaP8(rRegP dst, indOffset8 mem)
|
||||
%{
|
||||
|
@ -2996,8 +2996,6 @@ static void javaSignalHandler(int sig, siginfo_t* info, void* uc) {
|
||||
bool os::Aix::signal_handlers_are_installed = false;
|
||||
|
||||
// For signal-chaining
|
||||
struct sigaction sigact[NSIG];
|
||||
sigset_t sigs;
|
||||
bool os::Aix::libjsig_is_loaded = false;
|
||||
typedef struct sigaction *(*get_signal_t)(int);
|
||||
get_signal_t os::Aix::get_signal_action = NULL;
|
||||
@ -3011,7 +3009,7 @@ struct sigaction* os::Aix::get_chained_signal_action(int sig) {
|
||||
}
|
||||
if (actp == NULL) {
|
||||
// Retrieve the preinstalled signal handler from jvm
|
||||
actp = get_preinstalled_handler(sig);
|
||||
actp = os::Posix::get_preinstalled_handler(sig);
|
||||
}
|
||||
|
||||
return actp;
|
||||
@ -3074,19 +3072,6 @@ bool os::Aix::chained_handler(int sig, siginfo_t* siginfo, void* context) {
|
||||
return chained;
|
||||
}
|
||||
|
||||
struct sigaction* os::Aix::get_preinstalled_handler(int sig) {
|
||||
if (sigismember(&sigs, sig)) {
|
||||
return &sigact[sig];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void os::Aix::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
|
||||
assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
|
||||
sigact[sig] = oldAct;
|
||||
sigaddset(&sigs, sig);
|
||||
}
|
||||
|
||||
// for diagnostic
|
||||
int sigflags[NSIG];
|
||||
|
||||
@ -3118,7 +3103,7 @@ void os::Aix::set_signal_handler(int sig, bool set_installed) {
|
||||
return;
|
||||
} else if (UseSignalChaining) {
|
||||
// save the old handler in jvm
|
||||
save_preinstalled_handler(sig, oldAct);
|
||||
os::Posix::save_preinstalled_handler(sig, oldAct);
|
||||
// libjsig also interposes the sigaction() call below and saves the
|
||||
// old sigaction on it own.
|
||||
} else {
|
||||
@ -3174,7 +3159,6 @@ void os::Aix::install_signal_handlers() {
|
||||
(*begin_signal_setting)();
|
||||
}
|
||||
|
||||
::sigemptyset(&sigs);
|
||||
set_signal_handler(SIGSEGV, true);
|
||||
set_signal_handler(SIGPIPE, true);
|
||||
set_signal_handler(SIGBUS, true);
|
||||
|
@ -37,8 +37,6 @@ class Aix {
|
||||
static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
|
||||
// __sigaction(), signal() is loaded
|
||||
static struct sigaction *(*get_signal_action)(int);
|
||||
static struct sigaction *get_preinstalled_handler(int);
|
||||
static void save_preinstalled_handler(int, struct sigaction&);
|
||||
|
||||
static void check_signal_handler(int sig);
|
||||
|
||||
|
@ -2658,11 +2658,6 @@ static void signalHandler(int sig, siginfo_t* info, void* uc) {
|
||||
bool os::Bsd::signal_handlers_are_installed = false;
|
||||
|
||||
// For signal-chaining
|
||||
struct sigaction sigact[NSIG];
|
||||
uint32_t sigs = 0;
|
||||
#if (32 < NSIG-1)
|
||||
#error "Not all signals can be encoded in sigs. Adapt its type!"
|
||||
#endif
|
||||
bool os::Bsd::libjsig_is_loaded = false;
|
||||
typedef struct sigaction *(*get_signal_t)(int);
|
||||
get_signal_t os::Bsd::get_signal_action = NULL;
|
||||
@ -2676,7 +2671,7 @@ struct sigaction* os::Bsd::get_chained_signal_action(int sig) {
|
||||
}
|
||||
if (actp == NULL) {
|
||||
// Retrieve the preinstalled signal handler from jvm
|
||||
actp = get_preinstalled_handler(sig);
|
||||
actp = os::Posix::get_preinstalled_handler(sig);
|
||||
}
|
||||
|
||||
return actp;
|
||||
@ -2739,19 +2734,6 @@ bool os::Bsd::chained_handler(int sig, siginfo_t* siginfo, void* context) {
|
||||
return chained;
|
||||
}
|
||||
|
||||
struct sigaction* os::Bsd::get_preinstalled_handler(int sig) {
|
||||
if ((((uint32_t)1 << (sig-1)) & sigs) != 0) {
|
||||
return &sigact[sig];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void os::Bsd::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
|
||||
assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
|
||||
sigact[sig] = oldAct;
|
||||
sigs |= (uint32_t)1 << (sig-1);
|
||||
}
|
||||
|
||||
// for diagnostic
|
||||
int sigflags[NSIG];
|
||||
|
||||
@ -2783,7 +2765,7 @@ void os::Bsd::set_signal_handler(int sig, bool set_installed) {
|
||||
return;
|
||||
} else if (UseSignalChaining) {
|
||||
// save the old handler in jvm
|
||||
save_preinstalled_handler(sig, oldAct);
|
||||
os::Posix::save_preinstalled_handler(sig, oldAct);
|
||||
// libjsig also interposes the sigaction() call below and saves the
|
||||
// old sigaction on it own.
|
||||
} else {
|
||||
|
@ -37,8 +37,6 @@ class Bsd {
|
||||
static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
|
||||
// __sigaction(), signal() is loaded
|
||||
static struct sigaction *(*get_signal_action)(int);
|
||||
static struct sigaction *get_preinstalled_handler(int);
|
||||
static void save_preinstalled_handler(int, struct sigaction&);
|
||||
|
||||
static void check_signal_handler(int sig);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2019, 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
|
||||
@ -99,14 +99,14 @@ class CgroupSubsystem: CHeapObj<mtInternal> {
|
||||
buf[MAXPATHLEN-1] = '\0';
|
||||
_path = os::strdup(buf);
|
||||
} else {
|
||||
char *p = strstr(_root, cgroup_path);
|
||||
char *p = strstr(cgroup_path, _root);
|
||||
if (p != NULL && p == _root) {
|
||||
if (strlen(cgroup_path) > strlen(_root)) {
|
||||
int buflen;
|
||||
strncpy(buf, _mount_point, MAXPATHLEN);
|
||||
buf[MAXPATHLEN-1] = '\0';
|
||||
buflen = strlen(buf);
|
||||
if ((buflen + strlen(cgroup_path)) > (MAXPATHLEN-1)) {
|
||||
if ((buflen + strlen(cgroup_path) - strlen(_root)) > (MAXPATHLEN-1)) {
|
||||
return;
|
||||
}
|
||||
strncat(buf, cgroup_path + strlen(_root), MAXPATHLEN-buflen);
|
||||
@ -217,16 +217,11 @@ PRAGMA_DIAG_POP
|
||||
* we are running under cgroup control.
|
||||
*/
|
||||
void OSContainer::init() {
|
||||
int mountid;
|
||||
int parentid;
|
||||
int major;
|
||||
int minor;
|
||||
FILE *mntinfo = NULL;
|
||||
FILE *cgroup = NULL;
|
||||
char buf[MAXPATHLEN+1];
|
||||
char tmproot[MAXPATHLEN+1];
|
||||
char tmpmount[MAXPATHLEN+1];
|
||||
char tmpbase[MAXPATHLEN+1];
|
||||
char *p;
|
||||
jlong mem_limit;
|
||||
|
||||
@ -260,85 +255,24 @@ void OSContainer::init() {
|
||||
return;
|
||||
}
|
||||
|
||||
while ( (p = fgets(buf, MAXPATHLEN, mntinfo)) != NULL) {
|
||||
// Look for the filesystem type and see if it's cgroup
|
||||
char fstype[MAXPATHLEN+1];
|
||||
fstype[0] = '\0';
|
||||
char *s = strstr(p, " - ");
|
||||
if (s != NULL &&
|
||||
sscanf(s, " - %s", fstype) == 1 &&
|
||||
strcmp(fstype, "cgroup") == 0) {
|
||||
while ((p = fgets(buf, MAXPATHLEN, mntinfo)) != NULL) {
|
||||
char tmpcgroups[MAXPATHLEN+1];
|
||||
char *cptr = tmpcgroups;
|
||||
char *token;
|
||||
|
||||
if (strstr(p, "memory") != NULL) {
|
||||
int matched = sscanf(p, "%d %d %d:%d %s %s",
|
||||
&mountid,
|
||||
&parentid,
|
||||
&major,
|
||||
&minor,
|
||||
tmproot,
|
||||
tmpmount);
|
||||
if (matched == 6) {
|
||||
memory = new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
else
|
||||
log_debug(os, container)("Incompatible str containing cgroup and memory: %s", p);
|
||||
} else if (strstr(p, "cpuset") != NULL) {
|
||||
int matched = sscanf(p, "%d %d %d:%d %s %s",
|
||||
&mountid,
|
||||
&parentid,
|
||||
&major,
|
||||
&minor,
|
||||
tmproot,
|
||||
tmpmount);
|
||||
if (matched == 6) {
|
||||
cpuset = new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
else {
|
||||
log_debug(os, container)("Incompatible str containing cgroup and cpuset: %s", p);
|
||||
}
|
||||
} else if (strstr(p, "cpu,cpuacct") != NULL || strstr(p, "cpuacct,cpu") != NULL) {
|
||||
int matched = sscanf(p, "%d %d %d:%d %s %s",
|
||||
&mountid,
|
||||
&parentid,
|
||||
&major,
|
||||
&minor,
|
||||
tmproot,
|
||||
tmpmount);
|
||||
if (matched == 6) {
|
||||
cpu = new CgroupSubsystem(tmproot, tmpmount);
|
||||
cpuacct = new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
else {
|
||||
log_debug(os, container)("Incompatible str containing cgroup and cpu,cpuacct: %s", p);
|
||||
}
|
||||
} else if (strstr(p, "cpuacct") != NULL) {
|
||||
int matched = sscanf(p, "%d %d %d:%d %s %s",
|
||||
&mountid,
|
||||
&parentid,
|
||||
&major,
|
||||
&minor,
|
||||
tmproot,
|
||||
tmpmount);
|
||||
if (matched == 6) {
|
||||
cpuacct = new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
else {
|
||||
log_debug(os, container)("Incompatible str containing cgroup and cpuacct: %s", p);
|
||||
}
|
||||
} else if (strstr(p, "cpu") != NULL) {
|
||||
int matched = sscanf(p, "%d %d %d:%d %s %s",
|
||||
&mountid,
|
||||
&parentid,
|
||||
&major,
|
||||
&minor,
|
||||
tmproot,
|
||||
tmpmount);
|
||||
if (matched == 6) {
|
||||
cpu = new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
else {
|
||||
log_debug(os, container)("Incompatible str containing cgroup and cpu: %s", p);
|
||||
}
|
||||
// mountinfo format is documented at https://www.kernel.org/doc/Documentation/filesystems/proc.txt
|
||||
if (sscanf(p, "%*d %*d %*d:%*d %s %s %*[^-]- cgroup %*s %s", tmproot, tmpmount, tmpcgroups) != 3) {
|
||||
continue;
|
||||
}
|
||||
while ((token = strsep(&cptr, ",")) != NULL) {
|
||||
if (strcmp(token, "memory") == 0) {
|
||||
memory = new CgroupSubsystem(tmproot, tmpmount);
|
||||
} else if (strcmp(token, "cpuset") == 0) {
|
||||
cpuset = new CgroupSubsystem(tmproot, tmpmount);
|
||||
} else if (strcmp(token, "cpu") == 0) {
|
||||
cpu = new CgroupSubsystem(tmproot, tmpmount);
|
||||
} else if (strcmp(token, "cpuacct") == 0) {
|
||||
cpuacct= new CgroupSubsystem(tmproot, tmpmount);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -392,30 +326,30 @@ void OSContainer::init() {
|
||||
return;
|
||||
}
|
||||
|
||||
while ( (p = fgets(buf, MAXPATHLEN, cgroup)) != NULL) {
|
||||
int cgno;
|
||||
int matched;
|
||||
char *controller;
|
||||
while ((p = fgets(buf, MAXPATHLEN, cgroup)) != NULL) {
|
||||
char *controllers;
|
||||
char *token;
|
||||
char *base;
|
||||
|
||||
/* Skip cgroup number */
|
||||
strsep(&p, ":");
|
||||
/* Get controller and base */
|
||||
controller = strsep(&p, ":");
|
||||
/* Get controllers and base */
|
||||
controllers = strsep(&p, ":");
|
||||
base = strsep(&p, "\n");
|
||||
|
||||
if (controller != NULL) {
|
||||
if (strstr(controller, "memory") != NULL) {
|
||||
if (controllers == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
while ((token = strsep(&controllers, ",")) != NULL) {
|
||||
if (strcmp(token, "memory") == 0) {
|
||||
memory->set_subsystem_path(base);
|
||||
} else if (strstr(controller, "cpuset") != NULL) {
|
||||
} else if (strcmp(token, "cpuset") == 0) {
|
||||
cpuset->set_subsystem_path(base);
|
||||
} else if (strstr(controller, "cpu,cpuacct") != NULL || strstr(controller, "cpuacct,cpu") != NULL) {
|
||||
} else if (strcmp(token, "cpu") == 0) {
|
||||
cpu->set_subsystem_path(base);
|
||||
} else if (strcmp(token, "cpuacct") == 0) {
|
||||
cpuacct->set_subsystem_path(base);
|
||||
} else if (strstr(controller, "cpuacct") != NULL) {
|
||||
cpuacct->set_subsystem_path(base);
|
||||
} else if (strstr(controller, "cpu") != NULL) {
|
||||
cpu->set_subsystem_path(base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1856,10 +1856,9 @@ static bool _print_ascii_file(const char* filename, outputStream* st, const char
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(S390)
|
||||
#if defined(S390) || defined(PPC64)
|
||||
// keywords_to_match - NULL terminated array of keywords
|
||||
static bool print_matching_lines_from_sysinfo_file(outputStream* st, const char* keywords_to_match[]) {
|
||||
const char* filename = "/proc/sysinfo";
|
||||
static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) {
|
||||
char* line = NULL;
|
||||
size_t length = 0;
|
||||
FILE* fp = fopen(filename, "r");
|
||||
@ -2191,9 +2190,29 @@ void os::Linux::print_virtualization_info(outputStream* st) {
|
||||
// - whole "Box" (CPUs )
|
||||
// - z/VM / KVM (VM<nn>); this is not available in an LPAR-only setup
|
||||
const char* kw[] = { "LPAR", "CPUs", "VM", NULL };
|
||||
const char* info_file = "/proc/sysinfo";
|
||||
|
||||
if (! print_matching_lines_from_sysinfo_file(st, kw)) {
|
||||
st->print_cr(" </proc/sysinfo Not Available>");
|
||||
if (!print_matching_lines_from_file(info_file, st, kw)) {
|
||||
st->print_cr(" <%s Not Available>", info_file);
|
||||
}
|
||||
#elif defined(PPC64)
|
||||
const char* info_file = "/proc/ppc64/lparcfg";
|
||||
const char* kw[] = { "system_type=", // qemu indicates PowerKVM
|
||||
"partition_entitled_capacity=", // entitled processor capacity percentage
|
||||
"partition_max_entitled_capacity=",
|
||||
"capacity_weight=", // partition CPU weight
|
||||
"partition_active_processors=",
|
||||
"partition_potential_processors=",
|
||||
"entitled_proc_capacity_available=",
|
||||
"capped=", // 0 - uncapped, 1 - vcpus capped at entitled processor capacity percentage
|
||||
"shared_processor_mode=", // (non)dedicated partition
|
||||
"system_potential_processors=",
|
||||
"pool=", // CPU-pool number
|
||||
"pool_capacity=",
|
||||
"NumLpars=", // on non-KVM machines, NumLpars is not found for full partition mode machines
|
||||
NULL };
|
||||
if (!print_matching_lines_from_file(info_file, st, kw)) {
|
||||
st->print_cr(" <%s Not Available>", info_file);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -2273,7 +2292,7 @@ const char* search_string = "CPU";
|
||||
#elif defined(PPC64)
|
||||
const char* search_string = "cpu";
|
||||
#elif defined(S390)
|
||||
const char* search_string = "processor";
|
||||
const char* search_string = "machine =";
|
||||
#elif defined(SPARC)
|
||||
const char* search_string = "cpu";
|
||||
#else
|
||||
@ -4444,11 +4463,6 @@ static void signalHandler(int sig, siginfo_t* info, void* uc) {
|
||||
bool os::Linux::signal_handlers_are_installed = false;
|
||||
|
||||
// For signal-chaining
|
||||
struct sigaction sigact[NSIG];
|
||||
uint64_t sigs = 0;
|
||||
#if (64 < NSIG-1)
|
||||
#error "Not all signals can be encoded in sigs. Adapt its type!"
|
||||
#endif
|
||||
bool os::Linux::libjsig_is_loaded = false;
|
||||
typedef struct sigaction *(*get_signal_t)(int);
|
||||
get_signal_t os::Linux::get_signal_action = NULL;
|
||||
@ -4462,7 +4476,7 @@ struct sigaction* os::Linux::get_chained_signal_action(int sig) {
|
||||
}
|
||||
if (actp == NULL) {
|
||||
// Retrieve the preinstalled signal handler from jvm
|
||||
actp = get_preinstalled_handler(sig);
|
||||
actp = os::Posix::get_preinstalled_handler(sig);
|
||||
}
|
||||
|
||||
return actp;
|
||||
@ -4526,19 +4540,6 @@ bool os::Linux::chained_handler(int sig, siginfo_t* siginfo, void* context) {
|
||||
return chained;
|
||||
}
|
||||
|
||||
struct sigaction* os::Linux::get_preinstalled_handler(int sig) {
|
||||
if ((((uint64_t)1 << (sig-1)) & sigs) != 0) {
|
||||
return &sigact[sig];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void os::Linux::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
|
||||
assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
|
||||
sigact[sig] = oldAct;
|
||||
sigs |= (uint64_t)1 << (sig-1);
|
||||
}
|
||||
|
||||
// for diagnostic
|
||||
int sigflags[NSIG];
|
||||
|
||||
@ -4570,7 +4571,7 @@ void os::Linux::set_signal_handler(int sig, bool set_installed) {
|
||||
return;
|
||||
} else if (UseSignalChaining) {
|
||||
// save the old handler in jvm
|
||||
save_preinstalled_handler(sig, oldAct);
|
||||
os::Posix::save_preinstalled_handler(sig, oldAct);
|
||||
// libjsig also interposes the sigaction() call below and saves the
|
||||
// old sigaction on it own.
|
||||
} else {
|
||||
|
@ -38,8 +38,6 @@ class Linux {
|
||||
static bool libjsig_is_loaded; // libjsig that interposes sigaction(),
|
||||
// __sigaction(), signal() is loaded
|
||||
static struct sigaction *(*get_signal_action)(int);
|
||||
static struct sigaction *get_preinstalled_handler(int);
|
||||
static void save_preinstalled_handler(int, struct sigaction&);
|
||||
|
||||
static void check_signal_handler(int sig);
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "runtime/interfaceSupport.inline.hpp"
|
||||
#include "services/memTracker.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/events.hpp"
|
||||
#include "utilities/formatBuffer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/vmError.hpp"
|
||||
@ -1269,6 +1270,15 @@ static bool get_signal_code_description(const siginfo_t* si, enum_sigcode_desc_t
|
||||
return true;
|
||||
}
|
||||
|
||||
bool os::signal_sent_by_kill(const void* siginfo) {
|
||||
const siginfo_t* const si = (const siginfo_t*)siginfo;
|
||||
return si->si_code == SI_USER || si->si_code == SI_QUEUE
|
||||
#ifdef SI_TKILL
|
||||
|| si->si_code == SI_TKILL
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
||||
void os::print_siginfo(outputStream* os, const void* si0) {
|
||||
|
||||
const siginfo_t* const si = (const siginfo_t*) si0;
|
||||
@ -1299,7 +1309,7 @@ void os::print_siginfo(outputStream* os, const void* si0) {
|
||||
// so it depends on the context which member to use. For synchronous error signals,
|
||||
// we print si_addr, unless the signal was sent by another process or thread, in
|
||||
// which case we print out pid or tid of the sender.
|
||||
if (si->si_code == SI_USER || si->si_code == SI_QUEUE) {
|
||||
if (signal_sent_by_kill(si)) {
|
||||
const pid_t pid = si->si_pid;
|
||||
os->print(", si_pid: %ld", (long) pid);
|
||||
if (IS_VALID_PID(pid)) {
|
||||
@ -1325,6 +1335,25 @@ void os::print_siginfo(outputStream* os, const void* si0) {
|
||||
|
||||
}
|
||||
|
||||
bool os::signal_thread(Thread* thread, int sig, const char* reason) {
|
||||
OSThread* osthread = thread->osthread();
|
||||
if (osthread) {
|
||||
#if defined (SOLARIS)
|
||||
// Note: we cannot use pthread_kill on Solaris - not because
|
||||
// its missing, but because we do not have the pthread_t id.
|
||||
int status = thr_kill(osthread->thread_id(), sig);
|
||||
#else
|
||||
int status = pthread_kill(osthread->pthread_id(), sig);
|
||||
#endif
|
||||
if (status == 0) {
|
||||
Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.",
|
||||
sig, p2i(thread), reason);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int os::Posix::unblock_thread_signal_mask(const sigset_t *set) {
|
||||
return pthread_sigmask(SIG_UNBLOCK, set, NULL);
|
||||
}
|
||||
@ -1642,8 +1671,28 @@ static void pthread_init_common(void) {
|
||||
if ((status = pthread_mutexattr_settype(_mutexAttr, PTHREAD_MUTEX_NORMAL)) != 0) {
|
||||
fatal("pthread_mutexattr_settype: %s", os::strerror(status));
|
||||
}
|
||||
// Solaris has it's own PlatformMonitor, distinct from the one for POSIX.
|
||||
NOT_SOLARIS(os::PlatformMonitor::init();)
|
||||
}
|
||||
|
||||
#ifndef SOLARIS
|
||||
sigset_t sigs;
|
||||
struct sigaction sigact[NSIG];
|
||||
|
||||
struct sigaction* os::Posix::get_preinstalled_handler(int sig) {
|
||||
if (sigismember(&sigs, sig)) {
|
||||
return &sigact[sig];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void os::Posix::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
|
||||
assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
|
||||
sigact[sig] = oldAct;
|
||||
sigaddset(&sigs, sig);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Not all POSIX types and API's are available on all notionally "posix"
|
||||
// platforms. If we have build-time support then we will check for actual
|
||||
// runtime support via dlopen/dlsym lookup. This allows for running on an
|
||||
@ -1754,6 +1803,7 @@ void os::Posix::init_2(void) {
|
||||
(_pthread_condattr_setclock != NULL ? "" : " not"));
|
||||
log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with %s",
|
||||
_use_clock_monotonic_condattr ? "CLOCK_MONOTONIC" : "the default clock");
|
||||
sigemptyset(&sigs);
|
||||
#endif // !SOLARIS
|
||||
}
|
||||
|
||||
@ -1768,6 +1818,7 @@ void os::Posix::init_2(void) {
|
||||
log_info(os)("Use of CLOCK_MONOTONIC is not supported");
|
||||
log_info(os)("Use of pthread_condattr_setclock is not supported");
|
||||
log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with the default clock");
|
||||
sigemptyset(&sigs);
|
||||
#endif // !SOLARIS
|
||||
}
|
||||
|
||||
@ -2201,20 +2252,64 @@ void Parker::unpark() {
|
||||
|
||||
// Platform Monitor implementation
|
||||
|
||||
os::PlatformMonitor::PlatformMonitor() {
|
||||
os::PlatformMonitor::Impl::Impl() : _next(NULL) {
|
||||
int status = pthread_cond_init(&_cond, _condAttr);
|
||||
assert_status(status == 0, status, "cond_init");
|
||||
status = pthread_mutex_init(&_mutex, _mutexAttr);
|
||||
assert_status(status == 0, status, "mutex_init");
|
||||
}
|
||||
|
||||
os::PlatformMonitor::~PlatformMonitor() {
|
||||
os::PlatformMonitor::Impl::~Impl() {
|
||||
int status = pthread_cond_destroy(&_cond);
|
||||
assert_status(status == 0, status, "cond_destroy");
|
||||
status = pthread_mutex_destroy(&_mutex);
|
||||
assert_status(status == 0, status, "mutex_destroy");
|
||||
}
|
||||
|
||||
#if PLATFORM_MONITOR_IMPL_INDIRECT
|
||||
|
||||
pthread_mutex_t os::PlatformMonitor::_freelist_lock;
|
||||
os::PlatformMonitor::Impl* os::PlatformMonitor::_freelist = NULL;
|
||||
|
||||
void os::PlatformMonitor::init() {
|
||||
int status = pthread_mutex_init(&_freelist_lock, _mutexAttr);
|
||||
assert_status(status == 0, status, "freelist lock init");
|
||||
}
|
||||
|
||||
struct os::PlatformMonitor::WithFreeListLocked : public StackObj {
|
||||
WithFreeListLocked() {
|
||||
int status = pthread_mutex_lock(&_freelist_lock);
|
||||
assert_status(status == 0, status, "freelist lock");
|
||||
}
|
||||
|
||||
~WithFreeListLocked() {
|
||||
int status = pthread_mutex_unlock(&_freelist_lock);
|
||||
assert_status(status == 0, status, "freelist unlock");
|
||||
}
|
||||
};
|
||||
|
||||
os::PlatformMonitor::PlatformMonitor() {
|
||||
{
|
||||
WithFreeListLocked wfl;
|
||||
_impl = _freelist;
|
||||
if (_impl != NULL) {
|
||||
_freelist = _impl->_next;
|
||||
_impl->_next = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
_impl = new Impl();
|
||||
}
|
||||
|
||||
os::PlatformMonitor::~PlatformMonitor() {
|
||||
WithFreeListLocked wfl;
|
||||
assert(_impl->_next == NULL, "invariant");
|
||||
_impl->_next = _freelist;
|
||||
_freelist = _impl;
|
||||
}
|
||||
|
||||
#endif // PLATFORM_MONITOR_IMPL_INDIRECT
|
||||
|
||||
// Must already be locked
|
||||
int os::PlatformMonitor::wait(jlong millis) {
|
||||
assert(millis >= 0, "negative timeout");
|
||||
@ -2229,7 +2324,7 @@ int os::PlatformMonitor::wait(jlong millis) {
|
||||
to_abstime(&abst, millis * (NANOUNITS / MILLIUNITS), false, false);
|
||||
|
||||
int ret = OS_TIMEOUT;
|
||||
int status = pthread_cond_timedwait(&_cond, &_mutex, &abst);
|
||||
int status = pthread_cond_timedwait(cond(), mutex(), &abst);
|
||||
assert_status(status == 0 || status == ETIMEDOUT,
|
||||
status, "cond_timedwait");
|
||||
if (status == 0) {
|
||||
@ -2237,7 +2332,7 @@ int os::PlatformMonitor::wait(jlong millis) {
|
||||
}
|
||||
return ret;
|
||||
} else {
|
||||
int status = pthread_cond_wait(&_cond, &_mutex);
|
||||
int status = pthread_cond_wait(cond(), mutex());
|
||||
assert_status(status == 0, status, "cond_wait");
|
||||
return OS_OK;
|
||||
}
|
||||
|
@ -117,6 +117,9 @@ public:
|
||||
// effective gid, or if given uid is root.
|
||||
static bool matches_effective_uid_and_gid_or_root(uid_t uid, gid_t gid);
|
||||
|
||||
static struct sigaction *get_preinstalled_handler(int);
|
||||
static void save_preinstalled_handler(int, struct sigaction&);
|
||||
|
||||
static void print_umask(outputStream* st, mode_t umsk);
|
||||
|
||||
static void print_user_info(outputStream* st);
|
||||
@ -229,15 +232,60 @@ class PlatformParker : public CHeapObj<mtSynchronizer> {
|
||||
PlatformParker();
|
||||
};
|
||||
|
||||
// Workaround for a bug in macOSX kernel's pthread support (fixed in Mojave?).
|
||||
// Avoid ever allocating a pthread_mutex_t at the same address as one of our
|
||||
// former pthread_cond_t, by using a freelist of mutex/condvar pairs.
|
||||
// Conditional to avoid extra indirection and padding loss on other platforms.
|
||||
#ifdef __APPLE__
|
||||
#define PLATFORM_MONITOR_IMPL_INDIRECT 1
|
||||
#else
|
||||
#define PLATFORM_MONITOR_IMPL_INDIRECT 0
|
||||
#endif
|
||||
|
||||
// Platform specific implementation that underpins VM Monitor/Mutex class
|
||||
class PlatformMonitor : public CHeapObj<mtSynchronizer> {
|
||||
private:
|
||||
pthread_mutex_t _mutex; // Native mutex for locking
|
||||
pthread_cond_t _cond; // Native condition variable for blocking
|
||||
class Impl : public CHeapObj<mtSynchronizer> {
|
||||
public:
|
||||
pthread_mutex_t _mutex;
|
||||
pthread_cond_t _cond;
|
||||
Impl* _next;
|
||||
|
||||
Impl();
|
||||
~Impl();
|
||||
};
|
||||
|
||||
#if PLATFORM_MONITOR_IMPL_INDIRECT
|
||||
|
||||
Impl* _impl;
|
||||
|
||||
pthread_mutex_t* mutex() { return &(_impl->_mutex); }
|
||||
pthread_cond_t* cond() { return &(_impl->_cond); }
|
||||
|
||||
class WithFreeListLocked;
|
||||
static pthread_mutex_t _freelist_lock;
|
||||
static Impl* _freelist;
|
||||
|
||||
public:
|
||||
PlatformMonitor();
|
||||
PlatformMonitor(); // Use freelist allocation of impl.
|
||||
~PlatformMonitor();
|
||||
|
||||
static void init(); // Initialize the freelist.
|
||||
|
||||
#else
|
||||
|
||||
Impl _impl;
|
||||
|
||||
pthread_mutex_t* mutex() { return &(_impl._mutex); }
|
||||
pthread_cond_t* cond() { return &(_impl._cond); }
|
||||
|
||||
public:
|
||||
static void init() {} // Nothing needed for the non-indirect case.
|
||||
|
||||
// Default constructor and destructor.
|
||||
|
||||
#endif // PLATFORM_MONITOR_IMPL_INDIRECT
|
||||
|
||||
public:
|
||||
void lock();
|
||||
void unlock();
|
||||
bool try_lock();
|
||||
|
@ -50,28 +50,28 @@ inline int os::Posix::clock_getres(clockid_t clock_id, struct timespec *tp) {
|
||||
// Platform Monitor implementation
|
||||
|
||||
inline void os::PlatformMonitor::lock() {
|
||||
int status = pthread_mutex_lock(&_mutex);
|
||||
int status = pthread_mutex_lock(mutex());
|
||||
assert_status(status == 0, status, "mutex_lock");
|
||||
}
|
||||
|
||||
inline void os::PlatformMonitor::unlock() {
|
||||
int status = pthread_mutex_unlock(&_mutex);
|
||||
int status = pthread_mutex_unlock(mutex());
|
||||
assert_status(status == 0, status, "mutex_unlock");
|
||||
}
|
||||
|
||||
inline bool os::PlatformMonitor::try_lock() {
|
||||
int status = pthread_mutex_trylock(&_mutex);
|
||||
int status = pthread_mutex_trylock(mutex());
|
||||
assert_status(status == 0 || status == EBUSY, status, "mutex_trylock");
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
inline void os::PlatformMonitor::notify() {
|
||||
int status = pthread_cond_signal(&_cond);
|
||||
int status = pthread_cond_signal(cond());
|
||||
assert_status(status == 0, status, "cond_signal");
|
||||
}
|
||||
|
||||
inline void os::PlatformMonitor::notify_all() {
|
||||
int status = pthread_cond_broadcast(&_cond);
|
||||
int status = pthread_cond_broadcast(cond());
|
||||
assert_status(status == 0, status, "cond_broadcast");
|
||||
}
|
||||
|
||||
|
@ -923,13 +923,9 @@ double os::elapsedVTime() {
|
||||
}
|
||||
|
||||
jlong os::javaTimeMillis() {
|
||||
if (UseFakeTimers) {
|
||||
return fake_time++;
|
||||
} else {
|
||||
FILETIME wt;
|
||||
GetSystemTimeAsFileTime(&wt);
|
||||
return windows_to_java_time(wt);
|
||||
}
|
||||
FILETIME wt;
|
||||
GetSystemTimeAsFileTime(&wt);
|
||||
return windows_to_java_time(wt);
|
||||
}
|
||||
|
||||
void os::javaTimeSystemUTC(jlong &seconds, jlong &nanos) {
|
||||
@ -1801,6 +1797,11 @@ void os::print_memory_info(outputStream* st) {
|
||||
st->cr();
|
||||
}
|
||||
|
||||
bool os::signal_sent_by_kill(const void* siginfo) {
|
||||
// TODO: Is this possible?
|
||||
return false;
|
||||
}
|
||||
|
||||
void os::print_siginfo(outputStream *st, const void* siginfo) {
|
||||
const EXCEPTION_RECORD* const er = (EXCEPTION_RECORD*)siginfo;
|
||||
st->print("siginfo:");
|
||||
@ -1834,6 +1835,11 @@ void os::print_siginfo(outputStream *st, const void* siginfo) {
|
||||
st->cr();
|
||||
}
|
||||
|
||||
bool os::signal_thread(Thread* thread, int sig, const char* reason) {
|
||||
// TODO: Can we kill thread?
|
||||
return false;
|
||||
}
|
||||
|
||||
void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
|
||||
// do nothing
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
|
||||
* Copyright (c) 2012, 2019 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
|
||||
@ -70,22 +70,13 @@
|
||||
// Store|Load
|
||||
//
|
||||
|
||||
#define strasm_sync "\n sync \n"
|
||||
#define strasm_lwsync "\n lwsync \n"
|
||||
#define strasm_isync "\n isync \n"
|
||||
#define strasm_release strasm_lwsync
|
||||
#define strasm_acquire strasm_lwsync
|
||||
#define strasm_fence strasm_sync
|
||||
#define strasm_nobarrier ""
|
||||
#define strasm_nobarrier_clobber_memory ""
|
||||
|
||||
inline void pre_membar(atomic_memory_order order) {
|
||||
switch (order) {
|
||||
case memory_order_relaxed:
|
||||
case memory_order_acquire: break;
|
||||
case memory_order_release:
|
||||
case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
|
||||
case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,8 +85,8 @@ inline void post_membar(atomic_memory_order order) {
|
||||
case memory_order_relaxed:
|
||||
case memory_order_release: break;
|
||||
case memory_order_acquire:
|
||||
case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
|
||||
case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,13 +399,4 @@ inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value,
|
||||
return old_value;
|
||||
}
|
||||
|
||||
#undef strasm_sync
|
||||
#undef strasm_lwsync
|
||||
#undef strasm_isync
|
||||
#undef strasm_release
|
||||
#undef strasm_acquire
|
||||
#undef strasm_fence
|
||||
#undef strasm_nobarrier
|
||||
#undef strasm_nobarrier_clobber_memory
|
||||
|
||||
#endif // OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP
|
||||
|
@ -1,69 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
// Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License version 2 only, as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// version 2 for more details (a copy is included in the LICENSE file that
|
||||
// accompanied this code).
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License version
|
||||
// 2 along with this work; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
// or visit www.oracle.com if you need additional information or have any
|
||||
// questions.
|
||||
//
|
||||
//
|
||||
|
||||
// AArch64 Linux Architecture Description File
|
||||
|
||||
//----------OS-DEPENDENT ENCODING BLOCK----------------------------------------
|
||||
// This block specifies the encoding classes used by the compiler to
|
||||
// output byte streams. Encoding classes generate functions which are
|
||||
// called by Machine Instruction Nodes in order to generate the bit
|
||||
// encoding of the instruction. Operands specify their base encoding
|
||||
// interface with the interface keyword. There are currently
|
||||
// supported four interfaces, REG_INTER, CONST_INTER, MEMORY_INTER, &
|
||||
// COND_INTER. REG_INTER causes an operand to generate a function
|
||||
// which returns its register number when queried. CONST_INTER causes
|
||||
// an operand to generate a function which returns the value of the
|
||||
// constant when queried. MEMORY_INTER causes an operand to generate
|
||||
// four functions which return the Base Register, the Index Register,
|
||||
// the Scale Value, and the Offset Value of the operand when queried.
|
||||
// COND_INTER causes an operand to generate six functions which return
|
||||
// the encoding code (ie - encoding bits for the instruction)
|
||||
// associated with each basic boolean condition for a conditional
|
||||
// instruction. Instructions specify two basic values for encoding.
|
||||
// They use the ins_encode keyword to specify their encoding class
|
||||
// (which must be one of the class names specified in the encoding
|
||||
// block), and they use the opcode keyword to specify, in order, their
|
||||
// primary, secondary, and tertiary opcode. Only the opcode sections
|
||||
// which a particular instruction needs for encoding need to be
|
||||
// specified.
|
||||
encode %{
|
||||
// Build emit functions for each basic byte or larger field in the intel
|
||||
// encoding scheme (opcode, rm, sib, immediate), and call them from C++
|
||||
// code in the enc_class source block. Emit functions will live in the
|
||||
// main source block for now. In future, we can generalize this by
|
||||
// adding a syntax that specifies the sizes of fields in an order,
|
||||
// so that the adlc can build the emit functions automagically
|
||||
|
||||
enc_class Java_To_Runtime(method meth) %{
|
||||
%}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
// Platform dependent source
|
||||
|
||||
source %{
|
||||
|
||||
%}
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
|
||||
* Copyright (c) 2012, 2019 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
|
||||
@ -30,6 +30,8 @@
|
||||
#error "Atomic currently only implemented for PPC64"
|
||||
#endif
|
||||
|
||||
#include "utilities/debug.hpp"
|
||||
|
||||
// Implementation of class atomic
|
||||
|
||||
//
|
||||
@ -68,22 +70,13 @@
|
||||
// Store|Load
|
||||
//
|
||||
|
||||
#define strasm_sync "\n sync \n"
|
||||
#define strasm_lwsync "\n lwsync \n"
|
||||
#define strasm_isync "\n isync \n"
|
||||
#define strasm_release strasm_lwsync
|
||||
#define strasm_acquire strasm_lwsync
|
||||
#define strasm_fence strasm_sync
|
||||
#define strasm_nobarrier ""
|
||||
#define strasm_nobarrier_clobber_memory ""
|
||||
|
||||
inline void pre_membar(atomic_memory_order order) {
|
||||
switch (order) {
|
||||
case memory_order_relaxed:
|
||||
case memory_order_acquire: break;
|
||||
case memory_order_release:
|
||||
case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
|
||||
case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,8 +85,8 @@ inline void post_membar(atomic_memory_order order) {
|
||||
case memory_order_relaxed:
|
||||
case memory_order_release: break;
|
||||
case memory_order_acquire:
|
||||
case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
|
||||
case memory_order_acq_rel: __asm__ __volatile__ ("isync" : : : "memory"); break;
|
||||
default /*conservative*/ : __asm__ __volatile__ ("sync" : : : "memory"); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -406,13 +399,4 @@ inline T Atomic::PlatformCmpxchg<8>::operator()(T exchange_value,
|
||||
return old_value;
|
||||
}
|
||||
|
||||
#undef strasm_sync
|
||||
#undef strasm_lwsync
|
||||
#undef strasm_isync
|
||||
#undef strasm_release
|
||||
#undef strasm_acquire
|
||||
#undef strasm_fence
|
||||
#undef strasm_nobarrier
|
||||
#undef strasm_nobarrier_clobber_memory
|
||||
|
||||
#endif // OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP
|
||||
|
@ -1,27 +0,0 @@
|
||||
//
|
||||
// Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License version 2 only, as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// version 2 for more details (a copy is included in the LICENSE file that
|
||||
// accompanied this code).
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License version
|
||||
// 2 along with this work; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
// or visit www.oracle.com if you need additional information or have any
|
||||
// questions.
|
||||
//
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
// SPARC Linux Architecture Description File
|
@ -74,7 +74,7 @@
|
||||
// * 63-47 Fixed (17-bits, always zero)
|
||||
//
|
||||
|
||||
const size_t ZPlatformPageSizeSmallShift = 21; // 2M
|
||||
const size_t ZPlatformGranuleSizeShift = 21; // 2M
|
||||
|
||||
const size_t ZPlatformAddressOffsetBits = 42; // 4TB
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2019, 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
|
||||
@ -25,6 +25,7 @@
|
||||
#include "gc/z/zAddress.inline.hpp"
|
||||
#include "gc/z/zBackingFile_linux_x86.hpp"
|
||||
#include "gc/z/zErrno.hpp"
|
||||
#include "gc/z/zGlobals.hpp"
|
||||
#include "gc/z/zLargePages.inline.hpp"
|
||||
#include "gc/z/zMemory.hpp"
|
||||
#include "gc/z/zNUMA.hpp"
|
||||
@ -47,23 +48,22 @@
|
||||
// Proc file entry for max map mount
|
||||
#define ZFILENAME_PROC_MAX_MAP_COUNT "/proc/sys/vm/max_map_count"
|
||||
|
||||
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity, size_t granule_size) :
|
||||
ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity) :
|
||||
_manager(),
|
||||
_file(),
|
||||
_granule_size(granule_size) {
|
||||
_file() {
|
||||
|
||||
if (!_file.is_initialized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check and warn if max map count is too low
|
||||
check_max_map_count(max_capacity, granule_size);
|
||||
check_max_map_count(max_capacity);
|
||||
|
||||
// Check and warn if available space on filesystem is too low
|
||||
check_available_space_on_filesystem(max_capacity);
|
||||
}
|
||||
|
||||
void ZPhysicalMemoryBacking::check_max_map_count(size_t max_capacity, size_t granule_size) const {
|
||||
void ZPhysicalMemoryBacking::check_max_map_count(size_t max_capacity) const {
|
||||
const char* const filename = ZFILENAME_PROC_MAX_MAP_COUNT;
|
||||
FILE* const file = fopen(filename, "r");
|
||||
if (file == NULL) {
|
||||
@ -86,7 +86,7 @@ void ZPhysicalMemoryBacking::check_max_map_count(size_t max_capacity, size_t gra
|
||||
// However, ZGC tends to create the most mappings and dominate the total count.
|
||||
// In the worst cases, ZGC will map each granule three times, i.e. once per heap view.
|
||||
// We speculate that we need another 20% to allow for non-ZGC subsystems to map memory.
|
||||
const size_t required_max_map_count = (max_capacity / granule_size) * 3 * 1.2;
|
||||
const size_t required_max_map_count = (max_capacity / ZGranuleSize) * 3 * 1.2;
|
||||
if (actual_max_map_count < required_max_map_count) {
|
||||
log_warning(gc, init)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****");
|
||||
log_warning(gc, init)("The system limit on number of memory mappings per process might be too low "
|
||||
@ -135,7 +135,7 @@ bool ZPhysicalMemoryBacking::is_initialized() const {
|
||||
size_t ZPhysicalMemoryBacking::try_expand(size_t old_capacity, size_t new_capacity) {
|
||||
assert(old_capacity < new_capacity, "Invalid old/new capacity");
|
||||
|
||||
const size_t capacity = _file.try_expand(old_capacity, new_capacity - old_capacity, _granule_size);
|
||||
const size_t capacity = _file.try_expand(old_capacity, new_capacity - old_capacity, ZGranuleSize);
|
||||
if (capacity > old_capacity) {
|
||||
// Add expanded capacity to free list
|
||||
_manager.free(old_capacity, capacity - old_capacity);
|
||||
@ -145,15 +145,15 @@ size_t ZPhysicalMemoryBacking::try_expand(size_t old_capacity, size_t new_capaci
|
||||
}
|
||||
|
||||
ZPhysicalMemory ZPhysicalMemoryBacking::alloc(size_t size) {
|
||||
assert(is_aligned(size, _granule_size), "Invalid size");
|
||||
assert(is_aligned(size, ZGranuleSize), "Invalid size");
|
||||
|
||||
ZPhysicalMemory pmem;
|
||||
|
||||
// Allocate segments
|
||||
for (size_t allocated = 0; allocated < size; allocated += _granule_size) {
|
||||
const uintptr_t start = _manager.alloc_from_front(_granule_size);
|
||||
for (size_t allocated = 0; allocated < size; allocated += ZGranuleSize) {
|
||||
const uintptr_t start = _manager.alloc_from_front(ZGranuleSize);
|
||||
assert(start != UINTPTR_MAX, "Allocation should never fail");
|
||||
pmem.add_segment(ZPhysicalMemorySegment(start, _granule_size));
|
||||
pmem.add_segment(ZPhysicalMemorySegment(start, ZGranuleSize));
|
||||
}
|
||||
|
||||
return pmem;
|
||||
@ -237,8 +237,8 @@ uintptr_t ZPhysicalMemoryBacking::nmt_address(uintptr_t offset) const {
|
||||
}
|
||||
|
||||
void ZPhysicalMemoryBacking::map(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
if (ZUnmapBadViews) {
|
||||
// Only map the good view, for debugging only
|
||||
if (ZVerifyViews) {
|
||||
// Map good view
|
||||
map_view(pmem, ZAddress::good(offset), AlwaysPreTouch);
|
||||
} else {
|
||||
// Map all views
|
||||
@ -249,8 +249,8 @@ void ZPhysicalMemoryBacking::map(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
}
|
||||
|
||||
void ZPhysicalMemoryBacking::unmap(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
if (ZUnmapBadViews) {
|
||||
// Only map the good view, for debugging only
|
||||
if (ZVerifyViews) {
|
||||
// Unmap good view
|
||||
unmap_view(pmem, ZAddress::good(offset));
|
||||
} else {
|
||||
// Unmap all views
|
||||
@ -260,11 +260,14 @@ void ZPhysicalMemoryBacking::unmap(ZPhysicalMemory pmem, uintptr_t offset) const
|
||||
}
|
||||
}
|
||||
|
||||
void ZPhysicalMemoryBacking::flip(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
assert(ZUnmapBadViews, "Should be enabled");
|
||||
const uintptr_t addr_good = ZAddress::good(offset);
|
||||
const uintptr_t addr_bad = ZAddress::is_marked(ZAddressGoodMask) ? ZAddress::remapped(offset) : ZAddress::marked(offset);
|
||||
// Map/Unmap views
|
||||
map_view(pmem, addr_good, false /* pretouch */);
|
||||
unmap_view(pmem, addr_bad);
|
||||
void ZPhysicalMemoryBacking::debug_map(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
// Map good view
|
||||
assert(ZVerifyViews, "Should be enabled");
|
||||
map_view(pmem, ZAddress::good(offset), false /* pretouch */);
|
||||
}
|
||||
|
||||
void ZPhysicalMemoryBacking::debug_unmap(ZPhysicalMemory pmem, uintptr_t offset) const {
|
||||
// Unmap good view
|
||||
assert(ZVerifyViews, "Should be enabled");
|
||||
unmap_view(pmem, ZAddress::good(offset));
|
||||
}
|
||||
|
@ -34,9 +34,8 @@ class ZPhysicalMemoryBacking {
|
||||
private:
|
||||
ZMemoryManager _manager;
|
||||
ZBackingFile _file;
|
||||
const size_t _granule_size;
|
||||
|
||||
void check_max_map_count(size_t max_capacity, size_t granule_size) const;
|
||||
void check_max_map_count(size_t max_capacity) const;
|
||||
void check_available_space_on_filesystem(size_t max_capacity) const;
|
||||
void map_failed(ZErrno err) const;
|
||||
|
||||
@ -46,7 +45,7 @@ private:
|
||||
void unmap_view(ZPhysicalMemory pmem, uintptr_t addr) const;
|
||||
|
||||
public:
|
||||
ZPhysicalMemoryBacking(size_t max_capacity, size_t granule_size);
|
||||
ZPhysicalMemoryBacking(size_t max_capacity);
|
||||
|
||||
bool is_initialized() const;
|
||||
|
||||
@ -59,7 +58,9 @@ public:
|
||||
|
||||
void map(ZPhysicalMemory pmem, uintptr_t offset) const;
|
||||
void unmap(ZPhysicalMemory pmem, uintptr_t offset) const;
|
||||
void flip(ZPhysicalMemory pmem, uintptr_t offset) const;
|
||||
|
||||
void debug_map(ZPhysicalMemory pmem, uintptr_t offset) const;
|
||||
void debug_unmap(ZPhysicalMemory pmem, uintptr_t offset) const;
|
||||
};
|
||||
|
||||
#endif // OS_CPU_LINUX_X86_GC_Z_ZPHYSICALMEMORYBACKING_LINUX_X86_HPP
|
||||
|
@ -3802,6 +3802,7 @@ void MatchNode::count_commutative_op(int& count) {
|
||||
"AndI","AndL",
|
||||
"AndV",
|
||||
"MaxI","MinI","MaxF","MinF","MaxD","MinD",
|
||||
"MaxV", "MinV",
|
||||
"MulI","MulL","MulF","MulD",
|
||||
"MulVS","MulVI","MulVL","MulVF","MulVD",
|
||||
"OrI","OrL",
|
||||
@ -4177,6 +4178,7 @@ bool MatchRule::is_vector() const {
|
||||
"NegVF","NegVD",
|
||||
"SqrtVD","SqrtVF",
|
||||
"AndV" ,"XorV" ,"OrV",
|
||||
"MaxV", "MinV",
|
||||
"AddReductionVI", "AddReductionVL",
|
||||
"AddReductionVF", "AddReductionVD",
|
||||
"MulReductionVI", "MulReductionVL",
|
||||
@ -4186,6 +4188,7 @@ bool MatchRule::is_vector() const {
|
||||
"LShiftVB","LShiftVS","LShiftVI","LShiftVL",
|
||||
"RShiftVB","RShiftVS","RShiftVI","RShiftVL",
|
||||
"URShiftVB","URShiftVS","URShiftVI","URShiftVL",
|
||||
"MaxReductionV", "MinReductionV",
|
||||
"ReplicateB","ReplicateS","ReplicateI","ReplicateL","ReplicateF","ReplicateD",
|
||||
"LoadVector","StoreVector",
|
||||
"FmaVD", "FmaVF","PopCountVI",
|
||||
|
@ -931,13 +931,13 @@ void AOTCodeHeap::oops_do(OopClosure* f) {
|
||||
// Scan only klasses_got cells which should have only Klass*,
|
||||
// metadata_got cells are scanned only for alive AOT methods
|
||||
// by AOTCompiledMethod::metadata_do().
|
||||
void AOTCodeHeap::got_metadata_do(void f(Metadata*)) {
|
||||
void AOTCodeHeap::got_metadata_do(MetadataClosure* f) {
|
||||
for (int i = 1; i < _klasses_got_size; i++) {
|
||||
Metadata** p = &_klasses_got[i];
|
||||
Metadata* md = *p;
|
||||
if (md == NULL) continue; // skip non-oops
|
||||
if (Metaspace::contains(md)) {
|
||||
f(md);
|
||||
f->do_metadata(md);
|
||||
} else {
|
||||
intptr_t meta = (intptr_t)md;
|
||||
fatal("Invalid value in _klasses_got[%d] = " INTPTR_FORMAT, i, meta);
|
||||
@ -969,7 +969,7 @@ int AOTCodeHeap::verify_icholder_relocations() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void AOTCodeHeap::metadata_do(void f(Metadata*)) {
|
||||
void AOTCodeHeap::metadata_do(MetadataClosure* f) {
|
||||
for (int index = 0; index < _method_count; index++) {
|
||||
if (_code_to_aot[index]._state != in_use) {
|
||||
continue; // Skip uninitialized entries.
|
||||
|
@ -252,8 +252,8 @@ public:
|
||||
|
||||
|
||||
void oops_do(OopClosure* f);
|
||||
void metadata_do(void f(Metadata*));
|
||||
void got_metadata_do(void f(Metadata*));
|
||||
void metadata_do(MetadataClosure* f);
|
||||
void got_metadata_do(MetadataClosure* f);
|
||||
|
||||
#ifdef ASSERT
|
||||
bool got_contains(Metadata **p) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user