OpenJDK / jdk / jdk
changeset 54244:3ee03f1d88c9
Merge
author | psadhukhan |
---|---|
date | Wed, 20 Mar 2019 16:07:43 +0530 |
parents | 0b9fb3cfb6f2 83cace4142c8 |
children | 96c45aa61056 33ef346b1478 |
files | make/devkit/createMacosxDevkit6.sh make/devkit/createMacosxDevkit9.sh make/devkit/createWindowsDevkit2013.sh make/devkit/createWindowsDevkit2015.sh src/hotspot/os_cpu/linux_aarch64/linux_aarch64.ad src/hotspot/os_cpu/linux_sparc/linux_sparc.ad src/hotspot/os_cpu/linux_x86/gc/z/zLargePages_linux_x86.cpp src/hotspot/os_cpu/linux_x86/gc/z/zNUMA_linux_x86.cpp src/hotspot/os_cpu/linux_x86/gc/z/zVirtualMemory_linux_x86.cpp src/hotspot/share/classfile/dictionary.inline.hpp src/hotspot/share/gc/z/zAddressRangeMap.hpp src/hotspot/share/gc/z/zAddressRangeMap.inline.hpp src/hotspot/share/gc/z/zForwardingTableEntry.hpp src/hotspot/share/gc/z/zNMethodAllocator.cpp src/hotspot/share/gc/z/zNMethodAllocator.hpp src/hotspot/share/gc/z/zPageTableEntry.hpp src/hotspot/share/prims/evmCompat.cpp src/hotspot/share/utilities/intHisto.cpp src/hotspot/share/utilities/intHisto.hpp src/java.base/share/classes/com/sun/net/ssl/HostnameVerifier.java src/java.base/share/classes/com/sun/net/ssl/HttpsURLConnection.java src/java.base/share/classes/com/sun/net/ssl/KeyManager.java src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactorySpi.java src/java.base/share/classes/com/sun/net/ssl/SSLContext.java src/java.base/share/classes/com/sun/net/ssl/SSLContextSpi.java src/java.base/share/classes/com/sun/net/ssl/SSLPermission.java src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java src/java.base/share/classes/com/sun/net/ssl/TrustManager.java src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactorySpi.java src/java.base/share/classes/com/sun/net/ssl/X509KeyManager.java src/java.base/share/classes/com/sun/net/ssl/X509TrustManager.java src/java.base/share/classes/com/sun/net/ssl/internal/ssl/Provider.java src/java.base/share/classes/com/sun/net/ssl/internal/ssl/X509ExtendedTrustManager.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/Handler.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java src/java.base/share/classes/com/sun/net/ssl/package-info.java src/java.base/unix/native/libnio/ch/ServerSocketChannelImpl.c src/java.base/unix/native/libnio/ch/UnixAsynchronousServerSocketChannelImpl.c src/java.base/windows/native/libnio/ch/ServerSocketChannelImpl.c src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/BaseStructure.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Marshaller.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XmlWriter.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XmlWriterToTree.java src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddressRangeMapForPageTable.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMaths.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/IntegerExactOpSpeculation.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlConstants.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlVersion.java src/jdk.sctp/unix/native/libsctp/SctpServerChannelImpl.c test/hotspot/gtest/gc/z/test_zForwardingTable.cpp test/hotspot/gtest/memory/test_virtualSpaceNode.cpp test/hotspot/jtreg/runtime/RedefineObject/Agent.java test/hotspot/jtreg/runtime/RedefineObject/TestRedefineObject.java test/hotspot/jtreg/runtime/RedefineObject/WalkThroughInvoke.java test/hotspot/jtreg/runtime/RedefineTests/ModifyAnonymous.java test/hotspot/jtreg/runtime/RedefineTests/RedefineAddLambdaExpression.java test/hotspot/jtreg/runtime/RedefineTests/RedefineAnnotations.java test/hotspot/jtreg/runtime/RedefineTests/RedefineDeleteJmethod.java test/hotspot/jtreg/runtime/RedefineTests/RedefineDoubleDelete.java test/hotspot/jtreg/runtime/RedefineTests/RedefineFinalizer.java test/hotspot/jtreg/runtime/RedefineTests/RedefineInterfaceCall.java test/hotspot/jtreg/runtime/RedefineTests/RedefineInterfaceMethods.java test/hotspot/jtreg/runtime/RedefineTests/RedefineLeak.java test/hotspot/jtreg/runtime/RedefineTests/RedefinePreviousVersions.java test/hotspot/jtreg/runtime/RedefineTests/RedefineRunningMethods.java test/hotspot/jtreg/runtime/RedefineTests/RedefineRunningMethodsWithBacktrace.java test/hotspot/jtreg/runtime/RedefineTests/RedefineRunningMethodsWithResolutionErrors.java test/hotspot/jtreg/runtime/RedefineTests/RedefineSubtractLambdaExpression.java test/hotspot/jtreg/runtime/RedefineTests/TestMultipleClasses.java test/hotspot/jtreg/runtime/RedefineTests/libRedefineDeleteJmethod.c test/hotspot/jtreg/runtime/RedefineTests/libRedefineDoubleDelete.c test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c test/hotspot/jtreg/serviceability/jvmti/RetransformClassesZeroLength.java test/hotspot/jtreg/serviceability/jvmti/TestLambdaFormRetransformation.java test/hotspot/jtreg/serviceability/jvmti/TestRedefineWithUnresolvedClass.java test/hotspot/jtreg/serviceability/jvmti/UnresolvedClassAgent.java test/hotspot/jtreg/serviceability/jvmti/UnresolvedClassAgent.mf test/jdk/ProblemList.txt test/jdk/TEST.ROOT test/jdk/com/sun/net/ssl/SSLSecurity/ComKeyManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ComSSLContextImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ComTrustManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxKeyManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxSSLContextImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxTrustManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ProviderTest.java test/jdk/com/sun/net/ssl/SSLSecurity/TruncateArray.java test/jdk/javax/net/ssl/FixingJavadocs/ComURLNulls.java test/jdk/javax/net/ssl/SSLSession/CheckMyTrustedKeystore.java test/jdk/sun/net/www/protocol/https/NewImpl/ComHTTPSConnection.java test/jdk/sun/net/www/protocol/https/NewImpl/ComHostnameVerifier.java test/jdk/sun/security/ssl/X509TrustManagerImpl/ClientServer.java test/jdk/vm/JniInvocationTest.java test/jdk/vm/exeJniInvocationTest.c test/jdk/vm/gc/ArraySize.java test/jdk/vm/gc/InfiniteList.java test/jdk/vm/jit/BadLogicCode.java test/jdk/vm/jit/ExceptionInInit.java test/jdk/vm/jit/JITClassInit.java test/jdk/vm/runtime/ExplicitArithmeticCheck.java test/jdk/vm/runtime/MonitorCacheMaybeExpand_DeadLock.java test/jdk/vm/runtime/ReflectStackOverflow.java test/jdk/vm/runtime/ShiftTest.java test/jdk/vm/runtime/WideStrictInline.java test/jdk/vm/verifier/TestStaticIF.java test/jdk/vm/verifier/VerifyProtectedConstructor.java test/jdk/vm/verifier/VerifyStackForExceptionHandlers.java test/jdk/vm/verifier/defaultMethods/DefaultMethodRegressionTests.java test/jdk/vm/verifier/defaultMethods/DefaultMethodRegressionTestsRun.java test/langtools/jdk/javadoc/tool/doclint/ImplicitHeadersTest.java test/langtools/jdk/javadoc/tool/removeOldDoclet/OldDoclet.jasm test/langtools/tools/javac/doclint/ImplicitHeadersTest.java |
diffstat | 1343 files changed, 41853 insertions(+), 32823 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Mar 18 14:55:41 2019 -0700 +++ b/.hgtags Wed Mar 20 16:07:43 2019 +0530 @@ -546,3 +546,6 @@ 4ce47bc1fb92cf94c6e3d1f49d582f02dcb851ab jdk-12+32 c081f3ea6b9300265a4a34e38f970b1e3ddaae9f jdk-13+9 b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33 +8e069f7b4fabfe05d9f500783e6d56cb0196d25c jdk-13+10 +21ea4076a275a0f498afa517e9ee1b94a9cf0255 jdk-13+11 +1d7aec80147a6d92b101a76aef92f3ddc88bedf4 jdk-13+12
--- a/doc/building.html Mon Mar 18 14:55:41 2019 -0700 +++ b/doc/building.html Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ <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>
--- a/doc/building.md Mon Mar 18 14:55:41 2019 -0700 +++ b/doc/building.md Wed Mar 20 16:07:43 2019 +0530 @@ -295,9 +295,9 @@ ### 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 @@ ### 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
--- a/doc/testing.html Mon Mar 18 14:55:41 2019 -0700 +++ b/doc/testing.html Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ <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>
--- a/doc/testing.md Mon Mar 18 14:55:41 2019 -0700 +++ b/doc/testing.md Wed Mar 20 16:07:43 2019 +0530 @@ -252,8 +252,9 @@ 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`).
--- a/make/CompileJavaModules.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/CompileJavaModules.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ ################################################################################ # 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.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.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.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.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.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 @@ 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 @@ ################################################################################ # 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 @@ # 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
--- a/make/CreateJmods.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/CreateJmods.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include Modules.gmk ifeq ($(MODULE), ) @@ -37,7 +38,8 @@ ################################################################################ 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 @@ # 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)) ################################################################################
--- a/make/Docs.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/Docs.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include Modules.gmk include ModuleTools.gmk include ProcessMarkdown.gmk @@ -195,10 +196,13 @@ # 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 @@ $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 @@ $$(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)) \ )
--- a/make/ExplodedImageOptimize.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/ExplodedImageOptimize.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -29,19 +29,21 @@ 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) ################################################################################
--- a/make/Images.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/Images.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include Modules.gmk -TOOL_TARGETS := JDK_TARGETS := JRE_TARGETS := @@ -56,9 +56,6 @@ 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 @@ 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), \ +)) + +JLINK_JDK_TARGETS := $(jlink_jdk) + +$(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) -$(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) $@ +ifeq ($(BUILD_CDS_ARCHIVE), true) + ifeq ($(OPENJDK_TARGET_OS), windows) + CDS_ARCHIVE := bin/server/classes.jsa + else + CDS_ARCHIVE := lib/server/classes.jsa + endif -TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) -TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE) + $(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 @@ ################################################################################ -$(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
--- a/make/Main.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/Main.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -456,7 +456,7 @@ +($(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 @@ # 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-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
--- a/make/UpdateX11Wrappers.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/UpdateX11Wrappers.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include NativeCompilation.gmk include ToolsJdk.gmk @@ -47,17 +48,21 @@ 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 @@ $(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 @@ )) # 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 ################################################################################
--- a/make/autoconf/configure Mon Mar 18 14:55:41 2019 -0700 +++ b/make/autoconf/configure Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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"
--- a/make/autoconf/help.m4 Mon Mar 18 14:55:41 2019 -0700 +++ b/make/autoconf/help.m4 Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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 @@ 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)
--- a/make/autoconf/toolchain.m4 Mon Mar 18 14:55:41 2019 -0700 +++ b/make/autoconf/toolchain.m4 Wed Mar 20 16:07:43 2019 +0530 @@ -643,14 +643,21 @@ [ 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/common/Execute.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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
--- a/make/common/NativeCompilation.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/common/NativeCompilation.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -505,8 +505,9 @@ $$(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 @@ $$(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
--- a/make/common/ProcessMarkdown.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/common/ProcessMarkdown.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -65,10 +65,13 @@ 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 @@ $$(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 \
--- a/make/common/TestFilesCompilation.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/common/TestFilesCompilation.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -90,8 +90,7 @@ $$(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)), \
--- a/make/conf/jib-profiles.js Mon Mar 18 14:55:41 2019 -0700 +++ b/make/conf/jib-profiles.js Wed Mar 20 16:07:43 2019 +0530 @@ -939,21 +939,27 @@ 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 @@ 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"),
--- a/make/data/charsetmapping/charsets Mon Mar 18 14:55:41 2019 -0700 +++ b/make/data/charsetmapping/charsets Wed Mar 20 16:07:43 2019 +0530 @@ -440,6 +440,8 @@ 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 @@ alias cp833 alias ibm833 alias ibm-833 + alias 833 charset x-IBM834 IBM834 # EBCDIC DBCS-only Korean @@ -1590,6 +1593,8 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ alias cp01149 alias 1149 alias ebcdic-s-871+euro + alias ibm1149 + alias ibm-1149 charset IBM290 IBM290 package sun.nio.cs.ext
--- a/make/devkit/Makefile Mon Mar 18 14:55:41 2019 -0700 +++ b/make/devkit/Makefile Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ platforms := $(me) host_platforms := $(platforms) else - platforms := $(TARGETS) + platforms := $(subst $(COMMA), , $(TARGETS)) host_platforms := $(me) endif target_platforms := $(platforms) @@ -93,7 +99,7 @@ $(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 @@ $(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 @@ 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))
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/devkit/Tars.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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
--- a/make/devkit/Tools.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/devkit/Tools.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -51,9 +51,9 @@ $(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 @@ # 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 @@ # 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 @@ --disable-nls \ --program-prefix=$(TARGET)- \ --enable-multilib \ - --enable-gold \ + --enable-gold=default \ --enable-threads \ --enable-plugins \ ) > $(@D)/log.config 2>&1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make/devkit/createMacosxDevkit.sh Wed Mar 20 16:07:43 2019 +0530 @@ -0,0 +1,144 @@ +#!/bin/bash +# +# 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 +# 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 an Xcode installation into a devkit suitable +# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs +# to be either installed or extracted using for example Archive Utility. +# The easiest way to accomplish this is to right click the file in Finder +# and choose "Open With -> Archive Utility", or possible typing +# "open Xcode_9.2.xip" in a terminal. +# erik.joelsson@oracle.com + +USAGE="$0 <Xcode.app>" + +if [ "$1" = "" ]; then + echo $USAGE + exit 1 +fi + +XCODE_APP="$1" +XCODE_APP_DIR_NAME="${XCODE_APP##*/}" + +SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)" +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="$(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 + +################################################################################ +# Copy the relevant parts of Xcode.app, removing things that are both big and +# unecessary for our purposes, without building an impossibly long exclude list. +# +# Not including WatchSimulator.platform makes ibtool crashes in some situations. +# It doesn't seem to matter which extra platform is included, but that is the +# smallest one. + +EXCLUDE_DIRS=" \ + Contents/_CodeSignature \ + $XCODE_APP_DIR_NAME/Contents/Applications \ + $XCODE_APP_DIR_NAME/Contents/Resources \ + $XCODE_APP_DIR_NAME/Contents/Library \ + $XCODE_APP_DIR_NAME/Contents/XPCServices \ + $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \ + $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \ + $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \ + $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \ + $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \ + $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \ + $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \ + $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \ + Platforms/AppleTVSimulator.platform \ + Platforms/iPhoneSimulator.platform \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \ + $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \ + $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \ + | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \ +" + +for ex in $EXCLUDE_DIRS; do + EXCLUDE_ARGS+="--exclude=$ex " +done + +echo "Copying Xcode.app..." +echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/ +rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/ + +################################################################################ + +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=\"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/$SDK_VERSION.sdk\"" +echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\"" + +################################################################################ +# Copy this script + +echo "Copying this script..." +cp $0 $DEVKIT_ROOT/ + +################################################################################ +# Create bundle + +echo "Creating bundle..." +GZIP=$(command -v pigz) +if [ -z "$GZIP" ]; then + GZIP="gzip" +fi +(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createMacosxDevkit6.sh Mon Mar 18 14:55:41 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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")
--- a/make/devkit/createMacosxDevkit9.sh Mon Mar 18 14:55:41 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +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 an Xcode installation into a devkit suitable -# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs -# to be either installed or extracted using for example Archive Utility. -# The easiest way to accomplish this is to right click the file in Finder -# and choose "Open With -> Archive Utility", or possible typing -# "open Xcode_9.2.xip" in a terminal. -# erik.joelsson@oracle.com - -USAGE="$0 <Xcode.app>" - -if [ "$1" = "" ]; then - echo $USAGE - exit 1 -fi - -XCODE_APP="$1" -XCODE_APP_DIR_NAME="${XCODE_APP##*/}" - -SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)" -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 - -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" - -mkdir -p $DEVKIT_ROOT - -################################################################################ -# Copy the relevant parts of Xcode.app, removing things that are both big and -# unecessary for our purposes, without building an impossibly long exclude list. -# -# Not including WatchSimulator.platform makes ibtool crashes in some situations. -# It doesn't seem to matter which extra platform is included, but that is the -# smallest one. - -EXCLUDE_DIRS=" \ - Contents/_CodeSignature \ - $XCODE_APP_DIR_NAME/Contents/Applications \ - $XCODE_APP_DIR_NAME/Contents/Resources \ - $XCODE_APP_DIR_NAME/Contents/Library \ - $XCODE_APP_DIR_NAME/Contents/XPCServices \ - $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \ - $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \ - $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \ - $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \ - $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \ - $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \ - $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \ - $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \ - Platforms/AppleTVSimulator.platform \ - Platforms/iPhoneSimulator.platform \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \ - $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \ - $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \ - | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \ -" - -for ex in $EXCLUDE_DIRS; do - EXCLUDE_ARGS+="--exclude=$ex " -done - -echo "Copying Xcode.app..." -echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/ -rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/ - -################################################################################ - -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=\"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/$SDK_VERSION.sdk\"" -echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\"" - -################################################################################ -# Copy this script - -echo "Copying this script..." -cp $0 $DEVKIT_ROOT/ - -################################################################################ -# Create bundle - -echo "Creating bundle..." -GZIP=$(command -v pigz) -if [ -z "$GZIP" ]; then - GZIP="gzip" -fi -(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createWindowsDevkit2013.sh Mon Mar 18 14:55:41 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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" .)
--- a/make/devkit/createWindowsDevkit2015.sh Mon Mar 18 14:55:41 2019 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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" .)
--- a/make/devkit/createWindowsDevkit2017.sh Mon Mar 18 14:55:41 2019 -0700 +++ b/make/devkit/createWindowsDevkit2017.sh Wed Mar 20 16:07:43 2019 +0530 @@ -107,34 +107,37 @@ ################################################################################ # 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 @@ 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_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
--- a/make/gensrc/GensrcCommonJdk.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/gensrc/GensrcCommonJdk.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include JavaCompilation.gmk include NativeCompilation.gmk include TextFileProcessing.gmk
--- a/make/gensrc/GensrcX11Wrappers.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/gensrc/GensrcX11Wrappers.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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)
--- a/make/hotspot/gensrc/GenerateSources.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/gensrc/GenerateSources.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ include $(SPEC) include MakeBase.gmk +include Execute.gmk include JavaCompilation.gmk include NativeCompilation.gmk include TextFileProcessing.gmk @@ -35,10 +36,10 @@ # 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))
--- a/make/hotspot/gensrc/GensrcAdlc.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/gensrc/GensrcAdlc.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -166,18 +166,16 @@ ############################################################################## # 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 @@ 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 @@ {print}' \ < $(ADLC_SUPPORT_DIR)/$* > $@ - TARGETS := $(ADLC_GENERATED_FILES) + TARGETS += $(ADLC_GENERATED_FILES) endif
--- a/make/hotspot/gensrc/GensrcDtrace.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/gensrc/GensrcDtrace.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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 @@ # 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
--- a/make/hotspot/gensrc/GensrcJfr.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/gensrc/GensrcJfr.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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)
--- a/make/hotspot/gensrc/GensrcJvmti.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/gensrc/GensrcJvmti.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ ################################################################################ # 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 @@ # 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 ################################################################################
--- a/make/hotspot/ide/CreateVSProject.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/ide/CreateVSProject.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -30,6 +30,7 @@ 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 @@ 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)
--- a/make/hotspot/lib/CompileJvm.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/hotspot/lib/CompileJvm.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -166,6 +166,9 @@ # 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
--- a/make/launcher/Launcher-java.base.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/launcher/Launcher-java.base.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ $(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
--- a/make/launcher/LauncherCommon.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/launcher/LauncherCommon.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ -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
--- a/make/lib/CoreLibraries.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/lib/CoreLibraries.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -78,8 +78,6 @@ 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, \
--- a/make/test/JtregGraalUnit.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/test/JtregGraalUnit.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -41,115 +41,124 @@ 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_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 - 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_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 \ - ### Copy 3rd party libs - $(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \ - FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \ - DEST := $(LIB_OUTPUTDIR), \ - )) + ### Copy 3rd party libs + $(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \ + FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \ + DEST := $(LIB_OUTPUTDIR), \ + )) - TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS) + TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS) - ### 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), \ - )) + ### 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), \ + )) + + TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS) - TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS) + ### 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 \ + , \ + )) - ### 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_SET2) + TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2) - ### 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, \ - )) + ### 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_JAR) + TARGETS_BUILD += $(BUILD_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, \ - )) + ### 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 += $(BUILD_MXTOOL) + $(TARGETS_BUILD): $(TARGETS_EXTRA_LIB) + + endif # build-test-hotspot-jtreg-graal ################################################################################ # Targets for building test-image. @@ -168,7 +177,6 @@ endif endif -$(TARGETS_BUILD): $(TARGETS_EXTRA_LIB) build-test-hotspot-jtreg-graal: $(TARGETS_BUILD) test-image-hotspot-jtreg-graal: $(TARGETS_IMAGE)
--- a/make/test/JtregNativeHotspot.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/test/JtregNativeHotspot.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -1513,19 +1513,23 @@ 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 @@ $(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)
--- a/make/test/JtregNativeJdk.gmk Mon Mar 18 14:55:41 2019 -0700 +++ b/make/test/JtregNativeJdk.gmk Wed Mar 20 16:07:43 2019 +0530 @@ -82,19 +82,23 @@ 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 @@ $(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)
--- a/src/hotspot/cpu/aarch64/aarch64.ad Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/aarch64.ad Wed Mar 20 16:07:43 2019 +0530 @@ -4246,7 +4246,7 @@ %{ // 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 @@ 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 @@ 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.
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -2209,13 +2209,15 @@ 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 @@ 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 @@ 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
--- a/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -193,7 +193,6 @@ 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 @@ // 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 @@ 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;
--- a/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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 @@ 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;
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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 @@ } 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::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)) {
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ } // 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 @@ 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;
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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 @@ __ 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 @@ __ 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 @@ __ 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 @@ 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 @@ // 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) {
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -287,6 +287,11 @@ 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
--- a/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/stubRoutines_aarch64.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -186,6 +186,7 @@ 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[];
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ // 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 @@ // Call the native method. __ blrt(r10, rscratch1); + __ bind(native_return); __ maybe_isb(); __ get_method(rmethod); // result potentially in r0 or v0
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -194,6 +194,19 @@ // 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 @@ } } + // 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;
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -72,6 +72,7 @@ CPU_BROADCOM = 'B', CPU_CAVIUM = 'C', CPU_DEC = 'D', + CPU_HISILICON = 'H', CPU_INFINEON = 'I', CPU_MOTOROLA = 'M', CPU_NVIDIA = 'N',
--- a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ // 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));
--- a/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -47,7 +47,6 @@ 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 @@ 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 @@ 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);
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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::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 @@ } 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 @@ } __ bind(*failure); - - if (restore_obj) { - __ mr(op->object()->as_register(), dst); - // Fall through to failure case. - } } @@ -2590,10 +2605,11 @@ } 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;
--- a/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -213,7 +213,6 @@ 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 @@ 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;
--- a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -45,7 +45,6 @@ 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::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();
--- a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -34,7 +34,7 @@ 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);
--- a/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -269,7 +269,6 @@ 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 @@ 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 @@ 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 @@ 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);
--- a/src/hotspot/cpu/s390/gc/shared/cardTableBarrierSetAssembler_s390.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/s390/gc/shared/cardTableBarrierSetAssembler_s390.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -47,7 +47,6 @@ 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 @@ // 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);
--- a/src/hotspot/cpu/sparc/gc/g1/g1BarrierSetAssembler_sparc.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/sparc/gc/g1/g1BarrierSetAssembler_sparc.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -275,7 +275,7 @@ 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 @@ 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;
--- a/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -44,7 +44,6 @@ 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::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");
--- a/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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);
--- a/src/hotspot/cpu/x86/assembler_x86.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/assembler_x86.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ } } +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::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::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::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);
--- a/src/hotspot/cpu/x86/assembler_x86.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/assembler_x86.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -1934,6 +1934,11 @@ 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);
--- a/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -273,7 +273,6 @@ 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 @@ 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;
--- a/src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -46,7 +46,6 @@ 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 @@ 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);
--- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -165,6 +165,7 @@ // 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 @@ 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; } }
--- a/src/hotspot/cpu/x86/stubRoutines_x86.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/stubRoutines_x86.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -33,7 +33,7 @@ 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 {
--- a/src/hotspot/cpu/x86/x86.ad Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/x86.ad Wed Mar 20 16:07:43 2019 +0530 @@ -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 @@ 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.
--- a/src/hotspot/cpu/x86/x86_32.ad Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/x86_32.ad Wed Mar 20 16:07:43 2019 +0530 @@ -391,7 +391,7 @@ 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);
--- a/src/hotspot/cpu/x86/x86_64.ad Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/cpu/x86/x86_64.ad Wed Mar 20 16:07:43 2019 +0530 @@ -547,7 +547,7 @@ 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 @@ 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 @@ __ 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; @@ -3548,6 +3628,15 @@ %} // 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)); match(RegF); @@ -3566,6 +3655,15 @@ %} // 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)); match(RegD); @@ -5304,6 +5402,16 @@ %} // 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); format %{ "movss $dst,$src\t! load float (4 bytes)" %} @@ -5313,6 +5421,16 @@ 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) %{ @@ -5351,6 +5469,16 @@ %} // 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); format %{ "movsd $dst,$src\t! load double (8 bytes)" %} @@ -5360,6 +5488,167 @@ 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) %{
--- a/src/hotspot/os/aix/os_aix.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/os/aix/os_aix.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -2996,8 +2996,6 @@ 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 @@ } 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 @@ 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 @@ 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 @@ (*begin_signal_setting)(); } - ::sigemptyset(&sigs); set_signal_handler(SIGSEGV, true); set_signal_handler(SIGPIPE, true); set_signal_handler(SIGBUS, true);
--- a/src/hotspot/os/aix/os_aix.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/os/aix/os_aix.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -37,8 +37,6 @@ 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);
--- a/src/hotspot/os/bsd/os_bsd.cpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/os/bsd/os_bsd.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -2658,11 +2658,6 @@ 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 @@ } 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 @@ 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 @@ 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 {
--- a/src/hotspot/os/bsd/os_bsd.hpp Mon Mar 18 14:55:41 2019 -0700 +++ b/src/hotspot/os/bsd/os_bsd.hpp Wed Mar 20 16:07:43 2019 +0530 @@ -37,8 +37,6 @@ 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);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/os/linux/gc/z/zLargePages_linux.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2017, 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. + */ + +#include "precompiled.hpp" +#include "gc/z/zLargePages.hpp" +#include "runtime/globals.hpp" + +void ZLargePages::initialize_platform() { + if (UseLargePages) { + if (UseTransparentHugePages) { + _state = Transparent; + } else { + _state = Explicit; + } + } else { + _state = Disabled; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/hotspot/os/linux/gc/z/zNUMA_linux.cpp Wed Mar 20 16:07:43 2019 +0530 @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2016, 2017, 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. + */ + +#include "gc/z/zErrno.hpp" +#include "gc/z/zCPU.hpp" +#include "gc/z/zNUMA.hpp" +#include "runtime/os.hpp" +#include "utilities/debug.hpp" + +#include <unistd.h> +#include <sys/syscall.h> + +#ifndef MPOL_F_NODE +#define MPOL_F_NODE (1<<0) // Return next IL mode instead of node mask +#endif + +#ifndef MPOL_F_ADDR +#define MPOL_F_ADDR (1<<1) // Look up VMA using address +#endif + +static int z_get_mempolicy(uint32_t* mode, const unsigned long *nmask, unsigned long maxnode, uintptr_t addr, int flags) { + return syscall(__NR_get_mempolicy, mode, nmask, maxnode, addr, flags); +} + +void ZNUMA::initialize_platform() { + _enabled = UseNUMA; +} + +uint32_t ZNUMA::count() { + if (!_enabled) { + // NUMA support not enabled + return 1; + } + + return os::Linux::numa_max_node() + 1; +} + +uint32_t ZNUMA::id() { + if (!_enabled) { + // NUMA support not enabled + return 0; + } + + return os::Linux::get_node_by_cpu(ZCPU::id()); +} + +uint32_t ZNUMA::memory_id(uintptr_t addr) { + if (!_enabled) { + // NUMA support not enabled, assume everything belongs to node zero + return 0; + }