mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-26 02:10:49 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
345d4219eb | ||
|
|
12f60b2600 | ||
|
|
50a8c52267 |
68
.github/actions/build-jtreg/action.yml
vendored
68
.github/actions/build-jtreg/action.yml
vendored
@@ -1,68 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2023, 2024, 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.
|
||||
#
|
||||
|
||||
name: 'Build JTReg'
|
||||
description: 'Build JTReg'
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: 'Get JTReg version configuration'
|
||||
id: version
|
||||
uses: ./.github/actions/config
|
||||
with:
|
||||
var: JTREG_VERSION
|
||||
|
||||
- name: 'Check cache for already built JTReg'
|
||||
id: get-cached
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/src
|
||||
if: (steps.get-cached.outputs.cache-hit != 'true')
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JAVA_HOME_17_X64"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
shell: bash
|
||||
if: (steps.get-cached.outputs.cache-hit != 'true')
|
||||
|
||||
- name: 'Upload JTReg artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/installed
|
||||
retention-days: 1
|
||||
34
.github/actions/get-jtreg/action.yml
vendored
34
.github/actions/get-jtreg/action.yml
vendored
@@ -24,7 +24,7 @@
|
||||
#
|
||||
|
||||
name: 'Get JTReg'
|
||||
description: 'Get JTReg'
|
||||
description: 'Download JTReg from cache or source location'
|
||||
outputs:
|
||||
path:
|
||||
description: 'Path to the installed JTReg'
|
||||
@@ -39,12 +39,36 @@ runs:
|
||||
with:
|
||||
var: JTREG_VERSION
|
||||
|
||||
- name: 'Download JTReg artifact'
|
||||
id: download-jtreg
|
||||
uses: actions/download-artifact@v4
|
||||
- name: 'Check cache for JTReg'
|
||||
id: get-cached-jtreg
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/installed
|
||||
key: jtreg-${{ steps.version.outputs.value }}
|
||||
|
||||
- name: 'Checkout the JTReg source'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: openjdk/jtreg
|
||||
ref: jtreg-${{ steps.version.outputs.value }}
|
||||
path: jtreg/src
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Build JTReg'
|
||||
run: |
|
||||
# If runner architecture is x64 set JAVA_HOME_17_X64 otherwise set to JAVA_HOME_17_arm64
|
||||
if [[ '${{ runner.arch }}' == 'X64' ]]; then
|
||||
JDK="$JAVA_HOME_17_X64"
|
||||
else
|
||||
JDK="$JAVA_HOME_17_arm64"
|
||||
fi
|
||||
# Build JTReg and move files to the proper locations
|
||||
bash make/build.sh --jdk "$JDK"
|
||||
mkdir ../installed
|
||||
mv build/images/jtreg/* ../installed
|
||||
working-directory: jtreg/src
|
||||
shell: bash
|
||||
if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Export path to where JTReg is installed'
|
||||
id: path-name
|
||||
|
||||
21
.github/scripts/gen-build-failure-report.sh
vendored
21
.github/scripts/gen-build-failure-report.sh
vendored
@@ -24,19 +24,12 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Import common utils
|
||||
. .github/scripts/report-utils.sh
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
BUILD_DIR="$(ls -d build/*)"
|
||||
|
||||
# Send signal to the do-build action that we failed
|
||||
touch "$BUILD_DIR/build-failure"
|
||||
|
||||
# Collect hs_errs for build-time crashes, e.g. javac, jmod, jlink, CDS.
|
||||
# These usually land in make/
|
||||
hs_err_files=$(ls make/hs_err*.log 2> /dev/null || true)
|
||||
|
||||
(
|
||||
echo '### :boom: Build failure summary'
|
||||
echo ''
|
||||
@@ -53,20 +46,6 @@ hs_err_files=$(ls make/hs_err*.log 2> /dev/null || true)
|
||||
echo '</details>'
|
||||
echo ''
|
||||
|
||||
for hs_err in $hs_err_files; do
|
||||
echo "<details><summary><b>View HotSpot error log: "$hs_err"</b></summary>"
|
||||
echo ''
|
||||
echo '```'
|
||||
echo "$hs_err:"
|
||||
echo ''
|
||||
cat "$hs_err"
|
||||
echo '```'
|
||||
echo '</details>'
|
||||
echo ''
|
||||
done
|
||||
|
||||
echo ''
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
truncate_summary
|
||||
|
||||
19
.github/scripts/gen-test-results.sh
vendored
19
.github/scripts/gen-test-results.sh
vendored
@@ -24,9 +24,6 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Import common utils
|
||||
. .github/scripts/report-utils.sh
|
||||
|
||||
GITHUB_STEP_SUMMARY="$1"
|
||||
|
||||
test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
|
||||
@@ -92,6 +89,18 @@ for test in $failures $errors; do
|
||||
fi
|
||||
done >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
||||
# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
|
||||
# Trim it down if so.
|
||||
summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
|
||||
if [[ $summary_size -gt 1000000 ]]; then
|
||||
# Trim to below 1024 kB, and cut off after the last detail group
|
||||
head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
|
||||
mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
|
||||
(
|
||||
echo ''
|
||||
echo ':x: **WARNING: Summary is too large and has been truncated.**'
|
||||
echo ''
|
||||
) >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
truncate_summary
|
||||
echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
4
.github/workflows/build-cross-compile.yml
vendored
4
.github/workflows/build-cross-compile.yml
vendored
@@ -131,7 +131,6 @@ jobs:
|
||||
id: create-sysroot
|
||||
run: >
|
||||
sudo debootstrap
|
||||
--no-merged-usr
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype-dev,libpng-dev
|
||||
@@ -152,9 +151,6 @@ jobs:
|
||||
rm -rf sysroot/usr/{sbin,bin,share}
|
||||
rm -rf sysroot/usr/lib/{apt,gcc,udev,systemd}
|
||||
rm -rf sysroot/usr/libexec/gcc
|
||||
# /{bin,sbin,lib}/ are not symbolic links to /usr/{bin,sbin,lib}/ when debootstrap with --no-merged-usr
|
||||
rm -rf sysroot/{sbin,bin}
|
||||
rm -rf sysroot/lib/{udev,systemd}
|
||||
if: steps.create-sysroot.outcome == 'success' && steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Remove broken sysroot'
|
||||
|
||||
129
.github/workflows/main.yml
vendored
129
.github/workflows/main.yml
vendored
@@ -31,7 +31,7 @@ on:
|
||||
platforms:
|
||||
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
|
||||
required: true
|
||||
default: 'linux-x64, linux-x86-hs, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
|
||||
default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64, docs'
|
||||
configure-arguments:
|
||||
description: 'Additional configure arguments'
|
||||
required: false
|
||||
@@ -49,12 +49,12 @@ jobs:
|
||||
### Determine platforms to include
|
||||
###
|
||||
|
||||
prepare:
|
||||
name: 'Prepare the run'
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86-hs: ${{ steps.include.outputs.linux-x86-hs }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
# additional build options for linux-x64 are disabled
|
||||
# linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
|
||||
linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
|
||||
@@ -65,19 +65,7 @@ jobs:
|
||||
docs: ${{ steps.include.outputs.docs }}
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the scripts'
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: |
|
||||
.github
|
||||
make/conf/github-actions.conf
|
||||
|
||||
- name: 'Build JTReg'
|
||||
id: jtreg
|
||||
uses: ./.github/actions/build-jtreg
|
||||
|
||||
# TODO: Now that we are checking out the repo scripts, we can put the following code
|
||||
# into a separate file
|
||||
# This function must be inlined in main.yml, or we'd be forced to checkout the repo
|
||||
- name: 'Check what jobs to run'
|
||||
id: include
|
||||
run: |
|
||||
@@ -119,7 +107,7 @@ jobs:
|
||||
}
|
||||
|
||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x86-hs=$(check_platform linux-x86-hs linux x86)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
|
||||
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||
echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
|
||||
@@ -134,22 +122,21 @@ jobs:
|
||||
|
||||
build-linux-x64:
|
||||
name: linux-x64
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||
if: needs.select.outputs.linux-x64 == 'true'
|
||||
|
||||
build-linux-x86-hs:
|
||||
name: linux-x86-hs
|
||||
needs: prepare
|
||||
build-linux-x86:
|
||||
name: linux-x86
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
make-target: 'hotspot'
|
||||
gcc-major-version: '10'
|
||||
gcc-package-suffix: '-multilib'
|
||||
apt-architecture: 'i386'
|
||||
@@ -159,11 +146,11 @@ jobs:
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x86-hs == 'true'
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
build-linux-x64-hs-nopch:
|
||||
name: linux-x64-hs-nopch
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
@@ -173,11 +160,11 @@ jobs:
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-zero:
|
||||
name: linux-x64-hs-zero
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
@@ -187,11 +174,11 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-minimal:
|
||||
name: linux-x64-hs-minimal
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
@@ -201,11 +188,11 @@ jobs:
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-x64-hs-optimized:
|
||||
name: linux-x64-hs-optimized
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
@@ -216,21 +203,22 @@ jobs:
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
build-linux-cross-compile:
|
||||
name: linux-cross-compile
|
||||
needs: prepare
|
||||
needs:
|
||||
- select
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
with:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.linux-cross-compile == 'true'
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
name: macos-x64
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-x64
|
||||
@@ -238,23 +226,23 @@ jobs:
|
||||
xcode-toolset-version: '14.3.1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.macos-x64 == 'true'
|
||||
if: needs.select.outputs.macos-x64 == 'true'
|
||||
|
||||
build-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-macos.yml
|
||||
with:
|
||||
platform: macos-aarch64
|
||||
runs-on: 'macos-14'
|
||||
xcode-toolset-version: '15.4'
|
||||
xcode-toolset-version: '14.3.1'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.macos-aarch64 == 'true'
|
||||
if: needs.select.outputs.macos-aarch64 == 'true'
|
||||
|
||||
build-windows-x64:
|
||||
name: windows-x64
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
@@ -262,11 +250,11 @@ jobs:
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.windows-x64 == 'true'
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
build-windows-aarch64:
|
||||
name: windows-aarch64
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-aarch64
|
||||
@@ -276,11 +264,11 @@ jobs:
|
||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
||||
if: needs.select.outputs.windows-aarch64 == 'true'
|
||||
|
||||
build-docs:
|
||||
name: docs
|
||||
needs: prepare
|
||||
needs: select
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
@@ -292,7 +280,7 @@ jobs:
|
||||
gcc-major-version: '10'
|
||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||
if: needs.prepare.outputs.docs == 'true'
|
||||
if: needs.select.outputs.docs == 'true'
|
||||
|
||||
###
|
||||
### Test jobs
|
||||
@@ -308,6 +296,16 @@ jobs:
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-linux-x86:
|
||||
name: linux-x86
|
||||
needs:
|
||||
- build-linux-x86
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
needs:
|
||||
@@ -317,7 +315,6 @@ jobs:
|
||||
platform: macos-x64
|
||||
bootjdk-platform: macos-x64
|
||||
runs-on: macos-13
|
||||
xcode-toolset-version: '14.3.1'
|
||||
|
||||
test-macos-aarch64:
|
||||
name: macos-aarch64
|
||||
@@ -328,7 +325,6 @@ jobs:
|
||||
platform: macos-aarch64
|
||||
bootjdk-platform: macos-aarch64
|
||||
runs-on: macos-14
|
||||
xcode-toolset-version: '15.4'
|
||||
|
||||
test-windows-x64:
|
||||
name: windows-x64
|
||||
@@ -347,7 +343,7 @@ jobs:
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
- build-linux-x86-hs
|
||||
- build-linux-x86
|
||||
- build-linux-x64-hs-nopch
|
||||
- build-linux-x64-hs-zero
|
||||
- build-linux-x64-hs-minimal
|
||||
@@ -358,28 +354,31 @@ jobs:
|
||||
- build-windows-x64
|
||||
- build-windows-aarch64
|
||||
- test-linux-x64
|
||||
- test-linux-x86
|
||||
- test-macos-x64
|
||||
- test-macos-aarch64
|
||||
- test-windows-x64
|
||||
|
||||
steps:
|
||||
# Hack to get hold of the api environment variables that are only defined for actions
|
||||
- name: 'Get API configuration'
|
||||
id: api
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
|
||||
|
||||
- name: 'Remove bundle artifacts'
|
||||
run: |
|
||||
# Find and remove all bundle artifacts
|
||||
# See: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28
|
||||
ALL_ARTIFACT_IDS="$(curl -sL \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'Authorization: Bearer ${{ github.token }}' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
'${{ github.api_url }}/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts?per_page=100')"
|
||||
BUNDLE_ARTIFACT_IDS="$(echo "$ALL_ARTIFACT_IDS" | jq -r -c '.artifacts | map(select(.name|startswith("bundles-"))) | .[].id')"
|
||||
for id in $BUNDLE_ARTIFACT_IDS; do
|
||||
echo "Removing $id"
|
||||
curl -sL \
|
||||
-X DELETE \
|
||||
-H 'Accept: application/vnd.github+json' \
|
||||
-H 'Authorization: Bearer ${{ github.token }}' \
|
||||
-H 'X-GitHub-Api-Version: 2022-11-28' \
|
||||
"${{ github.api_url }}/repos/${{ github.repository }}/actions/artifacts/$id" \
|
||||
ALL_ARTIFACT_URLS="$(curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
'${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
|
||||
BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
|
||||
for url in $BUNDLE_ARTIFACT_URLS; do
|
||||
echo "Removing $url"
|
||||
curl -s \
|
||||
-H 'Accept: application/json;api-version=6.0-preview' \
|
||||
-H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
|
||||
-X DELETE "$url" \
|
||||
|| echo "Failed to remove bundle"
|
||||
done
|
||||
|
||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -37,9 +37,6 @@ on:
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
xcode-toolset-version:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
env:
|
||||
# These are needed to make the MSYS2 bash work properly
|
||||
@@ -150,7 +147,7 @@ jobs:
|
||||
run: |
|
||||
# On macOS we need to install some dependencies for testing
|
||||
brew install make
|
||||
sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
|
||||
sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
|
||||
# This will make GNU make available as 'make' and not only as 'gmake'
|
||||
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
|
||||
if: runner.os == 'macOS'
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
[general]
|
||||
project=jdk-updates
|
||||
jbs=JDK
|
||||
version=21.0.7
|
||||
version=21.0.4
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
warning=issuestitle,binary
|
||||
|
||||
[repository]
|
||||
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
|
||||
|
||||
67
README.md
67
README.md
@@ -39,21 +39,6 @@ can be found on the [releases page](https://github.com/JetBrains/JetBrainsRuntim
|
||||
| 2021.1 | [11.0.11+9-b1341.60](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1248891540)| 15-Jun-2021 |
|
||||
| 2020.3 | [11_0_10-b1145.115](https://github.com/JetBrains/JetBrainsRuntime/issues/171#issuecomment-1249243977) | 21-Jun-2021 |
|
||||
|
||||
## Release Flavours
|
||||
|
||||
There are many kinds of JBR bundles available on the [Releases page](https://github.com/JetBrains/JetBrainsRuntime/releases):
|
||||
|
||||
| Flavour | Description |
|
||||
|---------------|---------------------------------------------------------------------------------------------------------------|
|
||||
| JBR | Contains the Java Runtime Environment (JRE) suitable to _run_ JVM-based programs. |
|
||||
| JBRSDK | Contains the Software Developmet Kit (SDK) suitable to _develop_ and _run_ JVM-based programs. |
|
||||
| JBR with JCEF | Contains both JBR and JCEF; this flavour is bundled by default with all IntelliJ IDEs. |
|
||||
| vanilla | Contains just JBR. |
|
||||
| fastdebug | The native binaries in this bundle are less optimized and are easier to debug. They also run much slower. |
|
||||
| FreeType | The bundle includes the freetype library built from sources; normally, the library is provided by the system. |
|
||||
| Vulkan | The bundle includes experimental Vulkan support. | |
|
||||
| debug symbols | In addition to the usual contents of the bundle the debug information is also included. |
|
||||
|
||||
## Contents
|
||||
- [Welcome to JetBrains Runtime](#welcome-to-jetbrains-runtime)
|
||||
- [Why Use JetBrains Runtime?](#why-use-jetbrains-runtime)
|
||||
@@ -123,42 +108,36 @@ coverage of all the details.
|
||||
> It would usually have meaningful advice on how to solve the problem.
|
||||
|
||||
### Linux (Docker)
|
||||
Download an image from [Docker Hub](https://hub.docker.com/repository/docker/jetbrains/runtime/general) related to your architecture:
|
||||
Create a container:
|
||||
```
|
||||
$ docker pull jetbrains/runtime:oraclelinux8_aarch64
|
||||
$ cd jb/project/docker
|
||||
$ docker build .
|
||||
...
|
||||
Successfully built 942ea9900054
|
||||
```
|
||||
or
|
||||
Run these commands in the new container:
|
||||
```
|
||||
$ docker pull jetbrains/runtime:oraclelinux8_x64
|
||||
```
|
||||
Create and run a new container from the downloaded image
|
||||
```
|
||||
$ docker run -v $JetBrainsRuntime:/JetBrainsRuntime -it jetbrains/runtime:oraclelinux8_[arch]
|
||||
```
|
||||
where `$JetBrainsRuntime` is a full path to the directory where the repository was cloned to.
|
||||
|
||||
Run these commands in the container:
|
||||
```
|
||||
# yum install java-21-openjdk-devel
|
||||
$ docker run -v `pwd`../../../../:/JetBrainsRuntime -it 942ea9900054
|
||||
# cd /JetBrainsRuntime
|
||||
# BOOT_JDK=/usr/lib/jvm/java-21/ ./jb/project/tools/linux/scripts/mkimages_x64.sh 99 nomod
|
||||
# sh ./configure
|
||||
# make images CONF=linux-x86_64-normal-server-release
|
||||
```
|
||||
|
||||
### Ubuntu Linux
|
||||
Install the necessary tools, libraries, and headers with:
|
||||
```
|
||||
$ sudo wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
|
||||
$ sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
|
||||
$ sudo apt update
|
||||
$ sudo apt-get -y install openjdk-21-jdk file zip unzip autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
|
||||
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libspeechd-dev libwayland-dev \
|
||||
libxkbcommon-x11-0 vulkan-sdk vulkan-utility-libraries-dev
|
||||
$ sudo apt-get install autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
|
||||
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libwayland-dev \
|
||||
libxkbcommon-x11-0
|
||||
```
|
||||
Get Java 19 (for instance, [Azul Zulu Builds of OpenJDK 19](https://www.azul.com/downloads/?version=java-19-sts&os=linux&package=jdk)).
|
||||
|
||||
Then run the following:
|
||||
```
|
||||
$ cd /JetBrainsRuntime
|
||||
$ BOOT_JDK=/usr/lib/jvm/java-21-openjdk-amd64 ./jb/project/tools/linux/scripts/mkimages_x64.sh 99 nomod
|
||||
$ cd JetBrainsRuntime
|
||||
$ git checkout main
|
||||
$ sh ./configure
|
||||
$ make images
|
||||
```
|
||||
This will build the release configuration under `./build/linux-x86_64-server-release/`.
|
||||
|
||||
@@ -190,18 +169,6 @@ $ make images
|
||||
```
|
||||
This will build the release configuration under `./build/windows-x86_64-server-release/`.
|
||||
|
||||
#### Enable optional NVDA screen reader support
|
||||
If you want to add support of a11y announcing via [NVDA screen reader](https://www.nvaccess.org/about-nvda/),
|
||||
you will need to bundle the NVDA Controller Client library.
|
||||
You can do it with the following steps:
|
||||
1. Download the NVDA Controller Client library. You can find the link in its official README [here](https://github.com/nvaccess/nvda/blob/master/extras/controllerClient/readme.md)
|
||||
2. Pass the path to the unpacked package to `configure` via an additional flag `--with-nvdacontrollerclient=<path>`.
|
||||
The build system will search the required library files under `<path>/<target-arch>`.
|
||||
|
||||
#### Disable optional JAWS screen reader support
|
||||
JBR is built with built-in support of JAWS screen reader.
|
||||
If you want to disable it, run `configure` with the additional flag `--disable-jaws-client`.
|
||||
|
||||
### macOS
|
||||
Install the following:
|
||||
* Xcode command line developer tools and `autoconf` via [Homebrew](https://brew.sh/).
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# JDK Vulnerabilities
|
||||
|
||||
Please follow the process outlined in the [OpenJDK Vulnerability Policy](https://openjdk.org/groups/vulnerability/report) to disclose vulnerabilities in the JDK.
|
||||
@@ -569,9 +569,10 @@ be accepted by <code>configure</code>.</p>
|
||||
<code>--with-toolchain-type=clang</code>.</p>
|
||||
<h3 id="apple-xcode">Apple Xcode</h3>
|
||||
<p>The oldest supported version of Xcode is 8.</p>
|
||||
<p>You will need to download Xcode either from the App Store or specific
|
||||
versions can be easily located via the <a
|
||||
href="https://xcodereleases.com">Xcode Releases</a> website.</p>
|
||||
<p>You will need the Xcode command line developer tools to be able to
|
||||
build the JDK. (Actually, <em>only</em> the command line tools are
|
||||
needed, not the IDE.) The simplest way to install these is to run:</p>
|
||||
<pre><code>xcode-select --install</code></pre>
|
||||
<p>When updating Xcode, it is advisable to keep an older version for
|
||||
building the JDK. To use a specific version of Xcode you have multiple
|
||||
options:</p>
|
||||
|
||||
@@ -366,9 +366,12 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
|
||||
|
||||
The oldest supported version of Xcode is 8.
|
||||
|
||||
You will need to download Xcode either from the App Store or specific versions
|
||||
can be easily located via the [Xcode Releases](https://xcodereleases.com)
|
||||
website.
|
||||
You will need the Xcode command line developer tools to be able to build
|
||||
the JDK. (Actually, *only* the command line tools are needed, not the IDE.)
|
||||
The simplest way to install these is to run:
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
When updating Xcode, it is advisable to keep an older version for building the JDK.
|
||||
To use a specific version of Xcode you have multiple options:
|
||||
|
||||
@@ -72,9 +72,6 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
|
||||
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
|
||||
locale</a></li>
|
||||
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
|
||||
<li><a href="#testing-with-alternative-security-providers"
|
||||
id="toc-testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</a></li>
|
||||
<li><a href="#client-ui-tests" id="toc-client-ui-tests">Client UI
|
||||
Tests</a></li>
|
||||
</ul></li>
|
||||
@@ -592,18 +589,6 @@ element of the appropriate <code>@Artifact</code> class. (See
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
||||
<p>For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.</p>
|
||||
<h3 id="testing-with-alternative-security-providers">Testing with
|
||||
alternative security providers</h3>
|
||||
<p>Some security tests use a hardcoded provider for
|
||||
<code>KeyFactory</code>, <code>Cipher</code>,
|
||||
<code>KeyPairGenerator</code>, <code>KeyGenerator</code>,
|
||||
<code>AlgorithmParameterGenerator</code>, <code>KeyAgreement</code>,
|
||||
<code>Mac</code>, <code>MessageDigest</code>, <code>SecureRandom</code>,
|
||||
<code>Signature</code>, <code>AlgorithmParameters</code>,
|
||||
<code>Configuration</code>, <code>Policy</code>, or
|
||||
<code>SecretKeyFactory</code> objects. Specify the
|
||||
<code>-Dtest.provider.name=NAME</code> property to use a different
|
||||
provider for the service(s).</p>
|
||||
<h3 id="client-ui-tests">Client UI Tests</h3>
|
||||
<h4 id="system-key-shortcuts">System key shortcuts</h4>
|
||||
<p>Some Client UI tests use key sequences which may be reserved by the
|
||||
|
||||
@@ -615,15 +615,6 @@ $ make test TEST="jtreg:sun/security/pkcs11/Secmod/AddTrustedCert.java" \
|
||||
For more notes about the PKCS11 tests, please refer to
|
||||
test/jdk/sun/security/pkcs11/README.
|
||||
|
||||
### Testing with alternative security providers
|
||||
|
||||
Some security tests use a hardcoded provider for `KeyFactory`, `Cipher`,
|
||||
`KeyPairGenerator`, `KeyGenerator`, `AlgorithmParameterGenerator`,
|
||||
`KeyAgreement`, `Mac`, `MessageDigest`, `SecureRandom`, `Signature`,
|
||||
`AlgorithmParameters`, `Configuration`, `Policy`, or `SecretKeyFactory` objects.
|
||||
Specify the `-Dtest.provider.name=NAME` property to use a different provider for
|
||||
the service(s).
|
||||
|
||||
### Client UI Tests
|
||||
|
||||
#### System key shortcuts
|
||||
|
||||
46
jb/project/docker/Dockerfile.aarch64
Normal file
46
jb/project/docker/Dockerfile.aarch64
Normal file
@@ -0,0 +1,46 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
|
||||
# jetbrains/runtime:jbr17env_aarch64
|
||||
FROM arm64v8/centos:7
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN yum -y update; \
|
||||
yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7.aarch64 \
|
||||
autoconf-2.69-11.el7.noarch \
|
||||
automake-1.13.4-3.el7.noarch \
|
||||
bzip2-1.0.6-13.el7.aarch64 \
|
||||
cups-devel-1.6.3-51.el7.aarch64 \
|
||||
file-5.11-37.el7.aarch64 \
|
||||
fontconfig-devel-2.13.0-4.3.el7.aarch64 \
|
||||
freetype-devel-2.8-14.el7_9.1.aarch64 \
|
||||
giflib-devel-4.1.6-9.el7.aarch64 \
|
||||
git-1.8.3.1-24.el7_9.aarch64 \
|
||||
libtool-2.4.2-22.el7_3.aarch64 \
|
||||
libXi-devel-1.7.9-1.el7.aarch64 \
|
||||
libXrandr-devel-1.5.1-2.el7.aarch64 \
|
||||
libXrender-devel-0.9.10-1.el7.aarch64 \
|
||||
libXt-devel-1.1.5-3.el7.aarch64 \
|
||||
libXtst-devel-1.2.3-1.el7.aarch64 \
|
||||
make-3.82-24.el7.aarch64 \
|
||||
rsync-3.1.2-12.el7_9.aarch64 \
|
||||
tar-1.26-35.el7.aarch64 \
|
||||
unzip-6.0-24.el7_9.aarch64 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
zip-3.0-11.el7.aarch64; \
|
||||
yum -y clean all
|
||||
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}"
|
||||
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
43
jb/project/docker/Dockerfile.musl_aarch64
Normal file
43
jb/project/docker/Dockerfile.musl_aarch64
Normal file
@@ -0,0 +1,43 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_aarch64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM arm64v8/alpine:3.14
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update \
|
||||
alsa-lib-dev=1.2.5-r2 \
|
||||
autoconf=2.71-r0 \
|
||||
bash=5.1.16-r0 \
|
||||
build-base=0.5-r3 \
|
||||
bzip2=1.0.8-r1 \
|
||||
cups-dev=2.3.3-r3 \
|
||||
file=5.40-r1 \
|
||||
fontconfig=2.13.1-r4 \
|
||||
fontconfig-dev=2.13.1-r4 \
|
||||
freetype-dev=2.10.4-r3 \
|
||||
git=2.32.7-r0 \
|
||||
grep=3.7-r0 \
|
||||
libx11-dev=1.7.3.1-r0 \
|
||||
libxext-dev=1.3.4-r0 \
|
||||
libxrandr-dev=1.5.2-r1 \
|
||||
libxrender-dev=0.9.10-r3 \
|
||||
libxt-dev=1.2.1-r0 \
|
||||
libxtst-dev=1.2.3-r3 \
|
||||
linux-headers=5.10.41-r0 \
|
||||
rsync=3.2.5-r0 \
|
||||
tar=1.34-r1 \
|
||||
wayland-dev=1.19.0-r0 \
|
||||
zip=3.0-r9
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_aarch64.tar.gz /jdk20/
|
||||
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_aarch64.tar.gz && rm /jdk20/boot_jdk_musl_aarch64.tar.gz
|
||||
ENV BOOT_JDK=/jdk20
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser" && \
|
||||
git config --global --add safe.directory '*'
|
||||
42
jb/project/docker/Dockerfile.musl_x64
Normal file
42
jb/project/docker/Dockerfile.musl_x64
Normal file
@@ -0,0 +1,42 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_musl_x64.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT recieve updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
FROM alpine:3.14
|
||||
|
||||
# Install the necessary build tools
|
||||
RUN apk --no-cache add --update \
|
||||
alsa-lib-dev=1.2.5-r2 \
|
||||
autoconf=2.71-r0 \
|
||||
bash=5.1.16-r0 \
|
||||
build-base=0.5-r3 \
|
||||
bzip2=1.0.8-r1 \
|
||||
cups-dev=2.3.3-r3 \
|
||||
file=5.40-r1 \
|
||||
fontconfig=2.13.1-r4 \
|
||||
fontconfig-dev=2.13.1-r4 \
|
||||
freetype-dev=2.10.4-r3 \
|
||||
git=2.32.7-r0 \
|
||||
grep=3.7-r0 \
|
||||
libx11-dev=1.7.3.1-r0 \
|
||||
libxext-dev=1.3.4-r0 \
|
||||
libxrandr-dev=1.5.2-r1 \
|
||||
libxrender-dev=0.9.10-r3 \
|
||||
libxt-dev=1.2.1-r0 \
|
||||
libxtst-dev=1.2.3-r3 \
|
||||
linux-headers=5.10.41-r0 \
|
||||
rsync=3.2.5-r0 \
|
||||
tar=1.34-r1 \
|
||||
wayland-dev=1.19.0-r0 \
|
||||
zip=3.0-r9
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_musl_amd64.tar.gz /jdk20/
|
||||
RUN cd /jdk20 && tar --strip-components=1 -xzf boot_jdk_musl_amd64.tar.gz && rm /jdk20/boot_jdk_musl_amd64.tar.gz
|
||||
ENV BOOT_JDK=/jdk20
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
55
jb/project/docker/Dockerfile.x86
Normal file
55
jb/project/docker/Dockerfile.x86
Normal file
@@ -0,0 +1,55 @@
|
||||
# NOTE: This Dockerfile is meant to be used from the mkdocker_x86.sh script.
|
||||
|
||||
# Pull a concrete version of Linux that does NOT receive updates after it's
|
||||
# been created. This is so that the image is as stable as possible to make
|
||||
# image creation reproducible.
|
||||
# NB: this also means there may be no security-related fixes there, need to
|
||||
# move the version to the next manually.
|
||||
#FROM i386/ubuntu:xenial
|
||||
#FROM i386/ubuntu:bionic
|
||||
FROM i386/ubuntu:focal
|
||||
|
||||
RUN linux32 \
|
||||
apt-get update && apt-get install -y --no-install-recommends apt-utils
|
||||
RUN export DEBIAN_FRONTEND=noninteractive \
|
||||
export DEBCONF_NONINTERACTIVE_SEEN=true && \
|
||||
echo 'tzdata tzdata/Areas select Etc' | debconf-set-selections; \
|
||||
echo 'tzdata tzdata/Zones/Etc select UTC' | debconf-set-selections; \
|
||||
linux32 \
|
||||
apt-get -y install \
|
||||
autoconf \
|
||||
build-essential \
|
||||
curl \
|
||||
file \
|
||||
git \
|
||||
libx11-dev \
|
||||
libxext-dev \
|
||||
libxrender-dev \
|
||||
libxrandr-dev \
|
||||
libxtst-dev \
|
||||
libxt-dev \
|
||||
libcups2-dev \
|
||||
libasound2-data \
|
||||
# libpng12-0 \
|
||||
libasound2 \
|
||||
libfreetype6 \
|
||||
libfontconfig1-dev \
|
||||
libasound2-dev \
|
||||
rsync \
|
||||
unzip \
|
||||
zip
|
||||
RUN linux32 \
|
||||
apt-get -y install \
|
||||
g++-10 \
|
||||
gcc-10 && \
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
|
||||
apt-get clean -qy && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Set up boot JDK for building
|
||||
COPY boot_jdk_x86.tar.gz /jdk17/
|
||||
RUN cd /jdk17 && tar --strip-components=1 -xzf boot_jdk_x86.tar.gz && rm /jdk17/boot_jdk_x86.tar.gz
|
||||
ENV BOOT_JDK=/jdk17
|
||||
|
||||
RUN git config --global user.email "teamcity@jetbrains.com" && \
|
||||
git config --global user.name "builduser"
|
||||
73
jb/project/docker/Dockerfile.x86_64
Normal file
73
jb/project/docker/Dockerfile.x86_64
Normal file
@@ -0,0 +1,73 @@
|
||||
# jetbrains/runtime:jbr17env_x86_64
|
||||
FROM centos:7
|
||||
RUN yum -y install centos-release-scl; \
|
||||
yum -y install devtoolset-10-10.1-0.el7; \
|
||||
yum -y install \
|
||||
alsa-lib-devel-1.1.8-1.el7 \
|
||||
autoconf-2.69-11.el7 \
|
||||
automake-1.13.4-3.el7 \
|
||||
bzip2-1.0.6-13.el7 \
|
||||
cups-devel-1.6.3-51.el7 \
|
||||
file-5.11-37.el7 \
|
||||
fontconfig-devel-2.13.0-4.3.el7 \
|
||||
freetype-devel-2.8-14.el7_9.1 \
|
||||
giflib-devel-4.1.6-9.el7 \
|
||||
git-1.8.3.1-24.el7_9 \
|
||||
libtool-2.4.2-22.el7_3 \
|
||||
libXi-devel-1.7.9-1.el7 \
|
||||
libXrandr-devel-1.5.1-2.el7 \
|
||||
libXrender-devel-0.9.10-1.el7 \
|
||||
libXt-devel-1.1.5-3.el7 \
|
||||
libXtst-devel-1.2.3-1.el7 \
|
||||
make-3.82-24.el7 \
|
||||
tar-1.26-35.el7 \
|
||||
unzip-6.0-24.el7_9 \
|
||||
wayland-devel-1.15.0-1.el7 \
|
||||
wget-1.14-18.el7_6.1 \
|
||||
which-2.20-7.el7 \
|
||||
zip-3.0-11.el7 \
|
||||
python3-3.6.8-17.el7
|
||||
|
||||
RUN mkdir .git && \
|
||||
git config user.email "teamcity@jetbrains.com" && \
|
||||
git config user.name "builduser"
|
||||
|
||||
ENV LD_LIBRARY_PATH="/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib:/opt/rh/devtoolset-10/root/usr/lib64/dyninst:/opt/rh/devtoolset-10/root/usr/lib/dyninst:/opt/rh/devtoolset-10/root/usr/lib64:/opt/rh/devtoolset-10/root/usr/lib"
|
||||
ENV PATH="/opt/rh/devtoolset-10/root/usr/bin::${PATH}"
|
||||
ENV PKG_CONFIG_PATH="/opt/rh/devtoolset-10/root/usr/lib64/pkgconfig"
|
||||
|
||||
# Build GLSLC
|
||||
RUN curl -OL https://github.com/Kitware/CMake/releases/download/v3.27.5/cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& echo 138c68addae825b16ed78d792dafef5e0960194833f48bd77e7e0429c6bc081c *cmake-3.27.5-linux-x86_64.tar.gz | sha256sum -c - \
|
||||
&& tar -xzf cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& rm cmake-3.27.5-linux-x86_64.tar.gz \
|
||||
&& git clone https://github.com/google/shaderc --branch v2023.6 \
|
||||
&& cd shaderc \
|
||||
&& ./utils/git-sync-deps \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& /cmake-3.27.5-linux-x86_64/bin/cmake \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
||||
-DSHADERC_SKIP_TESTS=ON \
|
||||
-DSHADERC_SKIP_EXAMPLES=ON \
|
||||
-DSHADERC_SKIP_COPYRIGHT_CHECK=ON \
|
||||
.. \
|
||||
&& make install
|
||||
ENV PATH="/cmake-3.27.5-linux-x86_64/bin::${PATH}"
|
||||
|
||||
# Checkout Vulkan headers
|
||||
RUN mkdir /vulkan \
|
||||
&& cd /vulkan \
|
||||
&& git init \
|
||||
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Headers.git \
|
||||
&& git fetch origin \
|
||||
&& git checkout v1.3.265 -- include \
|
||||
&& rm -r .git \
|
||||
&& mkdir /vulkan_hpp \
|
||||
&& cd /vulkan_hpp \
|
||||
&& git init \
|
||||
&& git remote add -f origin https://github.com/KhronosGroup/Vulkan-Hpp.git \
|
||||
&& git fetch origin \
|
||||
&& git checkout v1.3.265 -- vulkan \
|
||||
&& rm -r .git
|
||||
29
jb/project/docker/mkdocker_aarch64.sh
Executable file
29
jb/project/docker/mkdocker_aarch64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building AArch64 variant
|
||||
# of the JetBrains Runtime "dev" version.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.30.15-ca-jdk17.0.1-linux_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=4d9c9116eb0cdd2d7fb220d6d27059f4bf1b7e95cc93d5512bd8ce3791af86c7
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jbrdevenv_arm64v8 -f Dockerfile.aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
29
jb/project/docker/mkdocker_musl_aarch64.sh
Executable file
29
jb/project/docker/mkdocker_musl_aarch64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl AArch64 variant
|
||||
# of the JetBrains Runtime version 21.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_aarch64.tar.gz
|
||||
BOOT_JDK_SHA=eec57cf744c2438f695221f041d4804de3033ad33b6dba769d3359813ba3f90d
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_aarch64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr21env_musl_aarch64 -f Dockerfile.musl_aarch64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
29
jb/project/docker/mkdocker_musl_x64.sh
Executable file
29
jb/project/docker/mkdocker_musl_x64.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
# This script creates a Docker image suitable for building musl-x64 variant
|
||||
# of the JetBrains Runtime version 21.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu20.32.11-ca-jdk20.0.2-linux_musl_x64.tar.gz
|
||||
BOOT_JDK_SHA=fca5081dd6da847fcd06f5b755e58edae22d6784f21b81bf73da2b538f842c07
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_musl_amd64.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr21env_musl_x64 -f Dockerfile.musl_x64 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
26
jb/project/docker/mkdocker_x86.sh
Executable file
26
jb/project/docker/mkdocker_x86.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# This script creates a Docker image suitable for building x86 variant
|
||||
# of the JetBrains Runtime version 17.
|
||||
|
||||
BOOT_JDK_REMOTE_FILE=zulu17.34.19-ca-jdk17.0.3-linux_i686.tar.gz
|
||||
BOOT_JDK_SHA=1c35c374ba0001e675d6e80819d5be900c4e141636d5e484992a8c550be14481
|
||||
BOOT_JDK_LOCAL_FILE=boot_jdk_x86.tar.gz
|
||||
|
||||
if [ ! -f $BOOT_JDK_LOCAL_FILE ]; then
|
||||
# Obtain "boot JDK" from outside of the container.
|
||||
wget -nc https://cdn.azul.com/zulu/bin/${BOOT_JDK_REMOTE_FILE} -O $BOOT_JDK_LOCAL_FILE
|
||||
else
|
||||
echo "boot JDK \"$BOOT_JDK_LOCAL_FILE\" present, skipping download"
|
||||
fi
|
||||
|
||||
# Verify that what we've downloaded can be trusted.
|
||||
sha256sum -c - <<EOF
|
||||
$BOOT_JDK_SHA *$BOOT_JDK_LOCAL_FILE
|
||||
EOF
|
||||
|
||||
docker build -t jetbrains/runtime:jbr17env_x86 -f Dockerfile.x86 .
|
||||
|
||||
# NB: the resulting container can (and should) be used without the network
|
||||
# connection (--network none) during build in order to reduce the chance
|
||||
# of build contamination.
|
||||
@@ -18,12 +18,10 @@ function getVersionProp() {
|
||||
}
|
||||
|
||||
DISABLE_WARNINGS_AS_ERRORS=""
|
||||
CONTINUOUS_INTEGRATION=""
|
||||
while getopts ":iwc?" o; do
|
||||
while getopts ":iw?" o; do
|
||||
case "${o}" in
|
||||
i) INC_BUILD=1 ;;
|
||||
w) DISABLE_WARNINGS_AS_ERRORS="--disable-warnings-as-errors" ;;
|
||||
c) CONTINUOUS_INTEGRATION=1 ;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
@@ -104,12 +102,6 @@ else
|
||||
WITH_BUNDLED_FREETYPE=""
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "lb" ]; then
|
||||
WITH_VULKAN=""
|
||||
else
|
||||
WITH_VULKAN="--with-vulkan"
|
||||
fi
|
||||
|
||||
REPRODUCIBLE_BUILD_OPTS="--with-source-date=$SOURCE_DATE_EPOCH
|
||||
--with-hotspot-build-time=$BUILD_TIME
|
||||
--with-copyright-year=$COPYRIGHT_YEAR
|
||||
|
||||
@@ -35,7 +35,6 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$WITH_VULKAN \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
@@ -113,11 +112,6 @@ case "$bundle_type" in
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"lb")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
@@ -146,7 +140,7 @@ JBRSDK_BUNDLE=jbrsdk
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
@@ -159,7 +153,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
@@ -42,7 +42,6 @@ function do_configure {
|
||||
--with-version-opt=b"$build_number" \
|
||||
--with-boot-jdk="$BOOT_JDK" \
|
||||
--enable-cds=yes \
|
||||
$WITH_VULKAN \
|
||||
$LINUX_TARGET \
|
||||
$DISABLE_WARNINGS_AS_ERRORS \
|
||||
$STATIC_CONF_ARGS \
|
||||
@@ -121,11 +120,6 @@ case "$bundle_type" in
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"lb")
|
||||
do_reset_changes=1
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
do_maketest=1
|
||||
;;
|
||||
"nomod" | "")
|
||||
bundle_type=""
|
||||
;;
|
||||
@@ -154,7 +148,7 @@ JBRSDK_BUNDLE=jbrsdk
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
@@ -167,7 +161,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "lb" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||
|
||||
@@ -92,7 +92,7 @@ WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||
RELEASE_NAME=linux-x86-server-release
|
||||
|
||||
case "$bundle_type" in
|
||||
"jcef" | "lb")
|
||||
"jcef")
|
||||
echo "not implemented" && do_exit 1
|
||||
;;
|
||||
"nomod" | "")
|
||||
@@ -119,7 +119,7 @@ JBRSDK_BUNDLE=jbrsdk
|
||||
echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "lb" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
|
||||
@@ -34,23 +34,7 @@ else
|
||||
contentType=$(jetSignContentType "$pathToBeSigned")
|
||||
(
|
||||
cd "$workDir" || exit 1
|
||||
|
||||
max_attempts=3
|
||||
attempt=1
|
||||
while [ $attempt -le $max_attempts ]; do
|
||||
if "$JETSIGN_CLIENT" -log-format text -max-wait 1m -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"; then
|
||||
break
|
||||
else
|
||||
if [ $attempt -eq $max_attempts ]; then
|
||||
echo "Failed to sign after $max_attempts attempts"
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $attempt failed, retrying in 5 seconds..."
|
||||
sleep 5
|
||||
((attempt++))
|
||||
fi
|
||||
done
|
||||
|
||||
"$JETSIGN_CLIENT" -log-format text -denoted-content-type "$contentType" -extensions "$jetSignExtensions" "$pathToBeSigned"
|
||||
# SRE-1223 (Codesign removes execute bits in executable files) workaround
|
||||
chmod "$(stat -f %A "$pathToBeSigned")" "$pathSigned"
|
||||
if isMacOsBinary "$pathSigned"; then
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<true/>
|
||||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||
<false/>
|
||||
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||
<false/>
|
||||
<key>com.apple.security.cs.disable-library-validation</key>
|
||||
<false/>
|
||||
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -24,25 +24,6 @@ source jb/project/tools/common/scripts/common.sh
|
||||
|
||||
JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 17)}
|
||||
XCODE_PATH=${XCODE_PATH:-}
|
||||
if [ -d "$XCODE_PATH" ]; then
|
||||
WITH_XCODE_PATH="--with-xcode-path=$XCODE_PATH"
|
||||
else
|
||||
if [ -z "${CONTINUOUS_INTEGRATION:-}" ]; then
|
||||
WITH_XCODE_PATH=""
|
||||
if [ -n "${XCODE_PATH}" ]; then
|
||||
echo "XCode not found in the directory: ${XCODE_PATH}"
|
||||
echo "default XCode will be used"
|
||||
fi
|
||||
else
|
||||
if [ -z "${XCODE_PATH}" ]; then
|
||||
echo "specify XCode via setting XCODE_PATH"
|
||||
else
|
||||
echo "XCode not found in the directory: ${XCODE_PATH}"
|
||||
fi
|
||||
do_exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
function do_configure {
|
||||
sh configure \
|
||||
@@ -61,7 +42,6 @@ function do_configure {
|
||||
$STATIC_CONF_ARGS \
|
||||
$REPRODUCIBLE_BUILD_OPTS \
|
||||
$WITH_ZIPPED_NATIVE_DEBUG_SYMBOLS \
|
||||
$WITH_XCODE_PATH \
|
||||
|| do_exit $?
|
||||
}
|
||||
|
||||
@@ -156,11 +136,9 @@ JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
fi
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
@@ -173,7 +151,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat "$JSDK"/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
@@ -30,34 +30,11 @@ trap "rm -f \"$PWD/tmp_key\"" INT EXIT RETURN
|
||||
echo -n "${APPLE_PRIVATE_KEY}" > tmp_key
|
||||
|
||||
log "Notarizing $APP_PATH..."
|
||||
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 --wait| tee "notarytool.submit.out"
|
||||
xcrun notarytool submit --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" "$APP_PATH" 2>&1 | tee "notarytool.submit.out"
|
||||
REQUEST_ID="$(grep -e " id: " "notarytool.submit.out" | grep -oE '([0-9a-f-]{36})'| head -n1)"
|
||||
|
||||
waitOutput=$(xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h)
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (wait command)"
|
||||
echo "$waitOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$waitOutput"
|
||||
fi
|
||||
|
||||
logOutout=$(xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json)
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (log command)"
|
||||
echo "$logOutout"
|
||||
exit 1
|
||||
else
|
||||
echo "$logOutout"
|
||||
fi
|
||||
|
||||
infoOUtput=$(xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Notarizing failed (info command)"
|
||||
echo "$infoOUtput"
|
||||
exit 1
|
||||
else
|
||||
echo "$infoOUtput"
|
||||
fi
|
||||
xcrun notarytool wait "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" --timeout 6h ||:
|
||||
xcrun notarytool log "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}" developer_log.json ||:
|
||||
xcrun notarytool info "$REQUEST_ID" --key tmp_key --key-id "${APPLE_KEY_ID}" --issuer "${APPLE_ISSUER_ID}"
|
||||
|
||||
log "Notarizing finished"
|
||||
|
||||
@@ -43,104 +43,18 @@ find "$APPLICATION_PATH" -name '*.cstemp' -exec rm '{}' \;
|
||||
log "Signing libraries and executables..."
|
||||
# -perm +111 searches for executables
|
||||
for f in \
|
||||
"Contents/Home/lib" "Contents/MacOS"; do
|
||||
"Contents/Home/lib" "Contents/MacOS" \
|
||||
"Contents/Home/Frameworks" \
|
||||
"Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "*.node" -o -perm +111 \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing JCEF libraries and executables..."
|
||||
if [ -d "$APPLICATION_PATH/Contents/Frameworks" ]; then
|
||||
find "$APPLICATION_PATH/Contents/Frameworks" \
|
||||
-type f \( -name "*.dylib" -o -perm +111 \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements_jcef.xml" {} \;
|
||||
fi
|
||||
|
||||
log "Signing jmod files"
|
||||
JMODS_DIR="$APPLICATION_PATH/Contents/Home/jmods"
|
||||
JMOD_EXE="$BOOT_JDK/bin/jmod"
|
||||
if [ -d "$JMODS_DIR" ]; then
|
||||
log "processing jmods"
|
||||
|
||||
for jmod_file in "$JMODS_DIR"/*.jmod; do
|
||||
log "Processing $jmod_file"
|
||||
|
||||
TMP_DIR="$JMODS_DIR/tmp"
|
||||
rm -rf "$TMP_DIR"
|
||||
mkdir "$TMP_DIR"
|
||||
|
||||
log "Unzipping $jmod_file"
|
||||
$JMOD_EXE extract --dir "$TMP_DIR" "$jmod_file" >/dev/null
|
||||
|
||||
log "Signing dylibs in $TMP_DIR"
|
||||
find "$TMP_DIR" \
|
||||
-type f \( -name "*.dylib" -o -name "*.so" -o -perm +111 -o -name jarsigner -o -name jdeps -o -name jpackageapplauncher -o -name jspawnhelper -o -name jar -o -name javap -o -name jdeprscan -o -name jfr -o -name rmiregistry -o -name java -o -name jhsdb -o -name jstatd -o -name jstatd -o -name jpackage -o -name keytool -o -name jmod -o -name jlink -o -name jimage -o -name jstack -o -name jcmd -o -name jps -o -name jmap -o -name jstat -o -name jinfo -o -name jshell -o -name jwebserver -o -name javac -o -name serialver -o -name jrunscript -o -name jdb -o -name jconsole -o -name javadoc \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
|
||||
log "Removing $jmod_file"
|
||||
rm -f "$jmod_file"
|
||||
cmd="$JMOD_EXE create --class-path $TMP_DIR/classes"
|
||||
|
||||
# Check each directory and add to the command if it exists
|
||||
[ -d "$TMP_DIR/bin" ] && cmd="$cmd --cmds $TMP_DIR/bin"
|
||||
[ -d "$TMP_DIR/conf" ] && cmd="$cmd --config $TMP_DIR/conf"
|
||||
[ -d "$TMP_DIR/lib" ] && cmd="$cmd --libs $TMP_DIR/lib"
|
||||
[ -d "$TMP_DIR/include" ] && cmd="$cmd --header-files $TMP_DIR/include"
|
||||
[ -d "$TMP_DIR/legal" ] && cmd="$cmd --legal-notices $TMP_DIR/legal"
|
||||
[ -d "$TMP_DIR/man" ] && cmd="$cmd --man-pages $TMP_DIR/man"
|
||||
|
||||
log "Creating jmod file"
|
||||
log "$cmd"
|
||||
# Add the output file
|
||||
cmd="$cmd $jmod_file"
|
||||
|
||||
# Execute the command
|
||||
eval $cmd
|
||||
|
||||
log "Removing $TMP_DIR"
|
||||
rm -rf "$TMP_DIR"
|
||||
done
|
||||
|
||||
log "Repack java.base.jmod with new hashes of modules"
|
||||
hash_modules=$($JMOD_EXE describe $JMODS_DIR/java.base.jmod | grep hashes | awk '{print $2}' | tr '\n' '|' | sed s/\|$//) || exit $?
|
||||
|
||||
TMP_DIR="$JMODS_DIR/tmp"
|
||||
rm -rf "$TMP_DIR"
|
||||
mkdir "$TMP_DIR"
|
||||
|
||||
jmod_file="$JMODS_DIR/java.base.jmod"
|
||||
log "Unzipping $jmod_file"
|
||||
$JMOD_EXE extract --dir "$TMP_DIR" "$jmod_file" >/dev/null
|
||||
|
||||
log "Removing java.base.jmod"
|
||||
rm -f "$jmod_file"
|
||||
|
||||
cmd="$JMOD_EXE create --class-path $TMP_DIR/classes --hash-modules \"$hash_modules\" --module-path $JMODS_DIR"
|
||||
|
||||
# Check each directory and add to the command if it exists
|
||||
[ -d "$TMP_DIR/bin" ] && cmd="$cmd --cmds $TMP_DIR/bin"
|
||||
[ -d "$TMP_DIR/conf" ] && cmd="$cmd --config $TMP_DIR/conf"
|
||||
[ -d "$TMP_DIR/lib" ] && cmd="$cmd --libs $TMP_DIR/lib"
|
||||
[ -d "$TMP_DIR/include" ] && cmd="$cmd --header-files $TMP_DIR/include"
|
||||
[ -d "$TMP_DIR/legal" ] && cmd="$cmd --legal-notices $TMP_DIR/legal"
|
||||
[ -d "$TMP_DIR/man" ] && cmd="$cmd --man-pages $TMP_DIR/man"
|
||||
|
||||
log "Creating jmod file"
|
||||
log "$cmd"
|
||||
# Add the output file
|
||||
cmd="$cmd $jmod_file"
|
||||
|
||||
# Execute the command
|
||||
eval $cmd
|
||||
|
||||
log "Removing $TMP_DIR"
|
||||
rm -rf "$TMP_DIR"
|
||||
else
|
||||
echo "Directory '$JMODS_DIR' does not exist. Skipping signing of jmod files."
|
||||
fi
|
||||
|
||||
log "Signing libraries in jars in $APPLICATION_PATH"
|
||||
|
||||
# todo: add set -euo pipefail; into the inner sh -c
|
||||
@@ -159,7 +73,10 @@ find "$APPLICATION_PATH" -name '*.jar' \
|
||||
|
||||
find jarfolder \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -name "jattach" \) \
|
||||
-exec sh -c '"$1" --timestamp --force -v -s "$2" --options=runtime --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
--force \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
|
||||
(cd jarfolder; zip -q -r -o -0 ../jar.jar .)
|
||||
mv jar.jar "$file"
|
||||
@@ -174,14 +91,16 @@ for f in \
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \
|
||||
-type f \( -name "*.jnilib" -o -name "*.dylib" -o -name "*.so" -o -name "*.tbd" -o -perm +111 \) \
|
||||
-exec sh -c '"$1" --timestamp -v -s "$2" --options=runtime --force --entitlements "$3" "$4" || exit 1' sh "$SIGN_UTILITY" "$JB_DEVELOPER_CERT" "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
-exec "$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime --force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" {} \;
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole frameworks..."
|
||||
# shellcheck disable=SC2043
|
||||
if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"Contents/Frameworks/cef_server.app/Contents/Frameworks" "Contents/Frameworks"; do
|
||||
"Contents/Frameworks/cef_server.app/Contents/Frameworks" "Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" \( -name '*.framework' -o -name '*.app' \) -maxdepth 1 | while read -r line
|
||||
do
|
||||
@@ -190,7 +109,7 @@ if [ "$JB_SIGN" = true ]; then for f in \
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements_jcef.xml" tmp-to-sign.tar.gz || exit 1
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$line"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$line")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
@@ -199,14 +118,16 @@ if [ "$JB_SIGN" = true ]; then for f in \
|
||||
done; fi
|
||||
|
||||
log "Checking framework signatures..."
|
||||
|
||||
if [ -d "$APPLICATION_PATH/Contents/Frameworks" ]; then
|
||||
find "$APPLICATION_PATH/Contents/Frameworks" -name '*.framework' -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Checking '$line':"
|
||||
codesign --verify --deep --strict --verbose=4 "$line"
|
||||
done
|
||||
fi
|
||||
for f in \
|
||||
"Contents/Home/Frameworks" "Contents/Frameworks"; do
|
||||
if [ -d "$APPLICATION_PATH/$f" ]; then
|
||||
find "$APPLICATION_PATH/$f" -name '*.framework' -maxdepth 1 | while read -r line
|
||||
do
|
||||
log "Checking '$line':"
|
||||
codesign --verify --deep --strict --verbose=4 "$line"
|
||||
done
|
||||
fi
|
||||
done
|
||||
|
||||
log "Signing whole app..."
|
||||
if [ "$JB_SIGN" = true ]; then
|
||||
@@ -214,7 +135,7 @@ if [ "$JB_SIGN" = true ]; then
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz || exit 1
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" tmp-to-sign.tar.gz
|
||||
rm -rf "$APPLICATION_PATH"
|
||||
tar -xzf tmp-to-sign.tar.gz --directory "$(dirname "$APPLICATION_PATH")"
|
||||
rm -f tmp-to-sign.tar.gz
|
||||
@@ -222,7 +143,7 @@ else
|
||||
"$SIGN_UTILITY" --timestamp \
|
||||
-v -s "$JB_DEVELOPER_CERT" --options=runtime \
|
||||
--force \
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH" || exit 1
|
||||
--entitlements "$SCRIPT_DIR/entitlements.xml" "$APPLICATION_PATH"
|
||||
fi
|
||||
|
||||
BUILD_NAME="$(basename "$APPLICATION_PATH")"
|
||||
|
||||
@@ -38,6 +38,9 @@ BUILD_NAME="$(ls "$EXPLODED")"
|
||||
#sed -i '' s/BNDL/APPL/ $EXPLODED/$BUILD_NAME/Contents/Info.plist
|
||||
rm -f $EXPLODED/$BUILD_NAME/Contents/CodeResources
|
||||
rm "$INPUT_FILE"
|
||||
if test -d $EXPLODED/$BUILD_NAME/Contents/Home/jmods; then
|
||||
mv $EXPLODED/$BUILD_NAME/Contents/Home/jmods $BACKUP_JMODS
|
||||
fi
|
||||
|
||||
log "$INPUT_FILE extracted and removed"
|
||||
|
||||
@@ -105,37 +108,9 @@ set -e
|
||||
if [ "$NOTARIZE" = "yes" ]; then
|
||||
log "Notarizing..."
|
||||
"$SCRIPT_DIR/notarize.sh" "$PKG_NAME"
|
||||
|
||||
log "Stapling..."
|
||||
appStaplerOutput=$(xcrun stapler staple "$APPLICATION_PATH")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Stapling application failed"
|
||||
echo "$appStaplerOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$appStaplerOutput"
|
||||
fi
|
||||
|
||||
log "Stapling package..."
|
||||
pkgStaplerOutput=$(xcrun stapler staple "$PKG_NAME")
|
||||
if [ $? -ne 0 ]; then
|
||||
log "Stapling package failed"
|
||||
echo "$pkgStaplerOutput"
|
||||
exit 1
|
||||
else
|
||||
echo "$pkgStaplerOutput"
|
||||
fi
|
||||
|
||||
# Verify stapling
|
||||
log "Verifying stapling..."
|
||||
if ! stapler validate "$APPLICATION_PATH"; then
|
||||
log "Stapling verification failed for application"
|
||||
exit 1
|
||||
fi
|
||||
if ! stapler validate "$PKG_NAME"; then
|
||||
log "Stapling verification failed for package"
|
||||
exit 1
|
||||
fi
|
||||
xcrun stapler staple "$APPLICATION_PATH" ||:
|
||||
xcrun stapler staple "$PKG_NAME" ||:
|
||||
else
|
||||
log "Notarization disabled"
|
||||
log "Stapling disabled"
|
||||
@@ -143,6 +118,11 @@ fi
|
||||
|
||||
log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
(
|
||||
#cd "$EXPLODED"
|
||||
#ditto -c -k --sequesterRsrc --keepParent "$BUILD_NAME" "../$INPUT_FILE"
|
||||
if test -d $BACKUP_JMODS/jmods; then
|
||||
mv $BACKUP_JMODS/jmods $APPLICATION_PATH/Contents/Home
|
||||
fi
|
||||
if [[ "$APPLICATION_PATH" != "$EXPLODED/$BUILD_NAME" ]]; then
|
||||
mv $APPLICATION_PATH $EXPLODED/$BUILD_NAME
|
||||
else
|
||||
@@ -153,4 +133,4 @@ log "Zipping $BUILD_NAME to $INPUT_FILE ..."
|
||||
log "Finished zipping"
|
||||
)
|
||||
rm -rf "$EXPLODED"
|
||||
log "Done"
|
||||
log "Done"
|
||||
@@ -127,13 +127,12 @@ if [ $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
@@ -145,7 +144,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g) || do_exit $?
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
@@ -120,13 +120,12 @@ if [ $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
fi
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
@@ -138,7 +137,7 @@ create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" ||
|
||||
|
||||
# create sdk image bundle
|
||||
modules=$(cat ${JSDK}/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\r//g | sed s/\\n//g)
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||
fi
|
||||
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" "$JBRSDK_BUNDLE" "$JSDK_MODS_DIR" "$modules" || do_exit $?
|
||||
|
||||
@@ -110,11 +110,9 @@ JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
fi
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
|
||||
@@ -29,11 +29,8 @@ function pack_jbr {
|
||||
__root_dir=${__bundle_name}-${JBSDK_VERSION}-windows-aarch64-${fastdebug_infix}b${build_number}
|
||||
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
@@ -31,9 +31,6 @@ function pack_jbr {
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
@@ -27,9 +27,6 @@ function pack_jbr {
|
||||
echo Creating $JBR.tar.gz ...
|
||||
chmod -R ug+rwx,o+rx ${BASE_DIR}/$__root_dir
|
||||
/usr/bin/tar -czf $JBR.tar.gz -C $BASE_DIR $__root_dir || do_exit $?
|
||||
|
||||
echo Creating $JBR.zip ...
|
||||
/usr/bin/zip -r $JBR.zip $__root_dir || do_exit $?
|
||||
}
|
||||
|
||||
[ "$bundle_type" == "nomod" ] && bundle_type=""
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2023, 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
|
||||
@@ -743,6 +743,8 @@ define SetupRunJtregTestBody
|
||||
# we may end up with a lot of JVM's
|
||||
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
|
||||
|
||||
JTREG_TIMEOUT_FACTOR ?= 4
|
||||
|
||||
JTREG_VERBOSE ?= fail,error,summary
|
||||
JTREG_RETAIN ?= fail,error
|
||||
JTREG_TEST_THREAD_FACTORY ?=
|
||||
@@ -830,24 +832,6 @@ define SetupRunJtregTestBody
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
|
||||
endif
|
||||
|
||||
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
|
||||
|
||||
JTREG_AUTO_PROBLEM_LISTS :=
|
||||
JTREG_AUTO_TIMEOUT_FACTOR := 4
|
||||
|
||||
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
|
||||
JTREG_AUTO_TIMEOUT_FACTOR := 10
|
||||
endif
|
||||
|
||||
ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
|
||||
ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
|
||||
else
|
||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
@@ -879,18 +863,6 @@ define SetupRunJtregTestBody
|
||||
|
||||
$$(eval $$(call SetupRunJtregTestCustom, $1))
|
||||
|
||||
# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
|
||||
# so set the final results after setting values from custom setup
|
||||
ifneq ($$(JTREG_AUTO_PROBLEM_LISTS), )
|
||||
# Accept both absolute paths as well as relative to the current test root.
|
||||
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||
$$(JTREG_AUTO_PROBLEM_LISTS) \
|
||||
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_AUTO_PROBLEM_LISTS)) \
|
||||
))
|
||||
endif
|
||||
|
||||
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
|
||||
|
||||
clean-outputdirs-$1:
|
||||
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
|
||||
$$(RM) -r $$($1_TEST_RESULTS_DIR)
|
||||
|
||||
@@ -313,11 +313,9 @@ AC_OUTPUT
|
||||
|
||||
# After AC_OUTPUT, we need to do final work
|
||||
CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK
|
||||
BASIC_POST_CONFIG_OUTPUT
|
||||
|
||||
# Finally output some useful information to the user
|
||||
HELP_PRINT_SUMMARY_AND_WARNINGS
|
||||
CUSTOM_SUMMARY_AND_WARNINGS_HOOK
|
||||
HELP_REPEAT_WARNINGS
|
||||
|
||||
# All output is done. Do the post-config output management.
|
||||
BASIC_POST_CONFIG_OUTPUT
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2024, 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
|
||||
@@ -835,11 +835,6 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
# for all archs except arm and ppc, prevent gcc to omit frame pointer
|
||||
$1_CFLAGS_CPU_JDK="${$1_CFLAGS_CPU_JDK} -fno-omit-frame-pointer"
|
||||
fi
|
||||
if test "x$FLAGS_CPU" = xppc64le; then
|
||||
# Little endian machine uses ELFv2 ABI.
|
||||
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2 -mcpu=power8 -mtune=power8"
|
||||
fi
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
$1_CFLAGS_CPU="-mcpu=pwr8"
|
||||
@@ -867,6 +862,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_TOOLCHAIN_CFLAGS="${$1_GCC6_CFLAGS}"
|
||||
|
||||
$1_WARNING_CFLAGS_JVM="-Wno-format-zero-length -Wtype-limits -Wuninitialized"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG=
|
||||
]
|
||||
)
|
||||
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
@@ -1004,12 +1008,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
|
||||
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
[
|
||||
# This flag is required for GCC 6 builds as undefined behavior in OpenJDK code
|
||||
# runs afoul of the more aggressive versions of this optimization.
|
||||
# These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
|
||||
# runs afoul of the more aggressive versions of these optimizations.
|
||||
# Notably, value range propagation now assumes that the this pointer of C++
|
||||
# member functions is non-null.
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_DELETE_NULL_POINTER_CHECKS_CFLAG],
|
||||
PREFIX: $2, IF_FALSE: [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""])
|
||||
NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$NO_LIFETIME_DSE_CFLAG],
|
||||
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
|
||||
$1_GCC6_CFLAGS="${NO_LIFETIME_DSE_CFLAG}"
|
||||
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
|
||||
|
||||
@@ -525,15 +525,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_LEAK_SANITIZER],
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER],
|
||||
[
|
||||
UTIL_ARG_WITH(NAME: additional-ubsan-checks, TYPE: string,
|
||||
DEFAULT: [],
|
||||
DESC: [Customizes the ubsan checks],
|
||||
OPTIONAL: true)
|
||||
|
||||
# GCC reports lots of likely false positives for stringop-truncation and format-overflow.
|
||||
# Silence them for now.
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment \
|
||||
$ADDITIONAL_UBSAN_CHECKS"
|
||||
UBSAN_CHECKS="-fsanitize=undefined -fsanitize=float-divide-by-zero -fno-sanitize=shift-base -fno-sanitize=alignment"
|
||||
UBSAN_CFLAGS="$UBSAN_CHECKS -Wno-stringop-truncation -Wno-format-overflow -fno-omit-frame-pointer -DUNDEFINED_BEHAVIOR_SANITIZER"
|
||||
UBSAN_LDFLAGS="$UBSAN_CHECKS"
|
||||
UTIL_ARG_ENABLE(NAME: ubsan, DEFAULT: false, RESULT: UBSAN_ENABLED,
|
||||
|
||||
@@ -70,25 +70,6 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
|
||||
fi
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
# If we have sysroot set, and no explicit library location is set,
|
||||
# look at known locations in sysroot.
|
||||
if test "x$SYSROOT" != "x" && test "x${with_alsa_lib}" == x; then
|
||||
if test -f "$SYSROOT/usr/lib64/libasound.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
ALSA_LIBS="-L$SYSROOT/usr/lib64 -lasound"
|
||||
ALSA_FOUND=yes
|
||||
elif test -f "$SYSROOT/usr/lib/libasound.so"; then
|
||||
ALSA_LIBS="-L$SYSROOT/usr/lib -lasound"
|
||||
ALSA_FOUND=yes
|
||||
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
|
||||
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
|
||||
ALSA_FOUND=yes
|
||||
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libasound.so"; then
|
||||
ALSA_LIBS="-L$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI -lasound"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
AC_CHECK_HEADERS([alsa/asoundlib.h],
|
||||
[
|
||||
|
||||
@@ -127,7 +127,7 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
VULKAN_FOUND=no
|
||||
|
||||
if test "x${with_vulkan_include}" != x; then
|
||||
AC_MSG_CHECKING([for ${with_vulkan_include}/vulkan/vulkan.h])
|
||||
AC_MSG_CHECKING([for vulkan.h])
|
||||
if test -s "${with_vulkan_include}/vulkan/vulkan.h"; then
|
||||
VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${with_vulkan_include} -DVULKAN_ENABLED"
|
||||
@@ -138,15 +138,14 @@ AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno && test "x${VULKAN_SDK}" != x; then
|
||||
AC_MSG_CHECKING([for ${VULKAN_SDK}/include/vulkan/vulkan.h])
|
||||
if test -s "${VULKAN_SDK}/include/vulkan/vulkan.h"; then
|
||||
VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${VULKAN_SDK}/include -DVULKAN_ENABLED"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
# Check vulkan sdk location
|
||||
AC_CHECK_HEADERS([$VULKAN_SDK/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${VULKAN_SDK}/include -DVULKAN_ENABLED"
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
|
||||
@@ -71,9 +71,9 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
|
||||
elif test -f "$SYSROOT/usr/lib/libX11.so"; then
|
||||
x_libraries="$SYSROOT/usr/lib"
|
||||
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
|
||||
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
|
||||
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
|
||||
elif test -f "$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"; then
|
||||
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI"
|
||||
x_libraries="$SYSROOT/usr/lib/$OPENJDK_TARGET_CPU_AUTOCONF-$OPENJDK_TARGET_OS-$OPENJDK_TARGET_ABI/libX11.so"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -33,6 +33,7 @@ m4_include([lib-freetype.m4])
|
||||
m4_include([lib-hsdis.m4])
|
||||
m4_include([lib-std.m4])
|
||||
m4_include([lib-x11.m4])
|
||||
m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-speechd.m4])
|
||||
m4_include([lib-nvdacontrollerclient.m4])
|
||||
m4_include([lib-wayland.m4])
|
||||
@@ -52,9 +53,8 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# All other instances need X11, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
NEEDS_LIB_X11=true
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_SPEECHD=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
|
||||
@@ -449,11 +449,6 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
|
||||
# Copyright (C) 2013 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# or look like
|
||||
# gcc (GCC) 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32)
|
||||
# Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
# This is free software; see the source for copying conditions. There is NO
|
||||
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
|
||||
# Check that this is likely to be GCC.
|
||||
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
|
||||
@@ -467,8 +462,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
|
||||
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
|
||||
$SED -e 's/ *Copyright .*//'`
|
||||
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
|
||||
$AWK -F ')' '{print [$]2}' | \
|
||||
$AWK '{print [$]1}'`
|
||||
$SED -e 's/^.* \(@<:@1-9@:>@<:@0-9@:>@*\.@<:@0-9.@:>@*\)@<:@^0-9.@:>@.*$/\1/'`
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# clang --version output typically looks like
|
||||
# Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
|
||||
|
||||
@@ -289,7 +289,6 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
$(CP) -fRP '$(call DecodeSpace, $<)' '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
if [ -n "`$(XATTR) -ls '$(call DecodeSpace, $@)'`" ]; then \
|
||||
$(CHMOD) -h u+w '$(call DecodeSpace, $@)'; \
|
||||
$(XATTR) -cs '$(call DecodeSpace, $@)'; \
|
||||
fi
|
||||
endef
|
||||
|
||||
@@ -215,21 +215,7 @@ DEPENDENCY_TARGET_SED_PATTERN := \
|
||||
# The fix-deps-file macro is used to adjust the contents of the generated make
|
||||
# dependency files to contain paths compatible with make.
|
||||
#
|
||||
REWRITE_PATHS_RELATIVE = false
|
||||
ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
|
||||
REWRITE_PATHS_RELATIVE = true
|
||||
endif
|
||||
|
||||
# CCACHE_BASEDIR needs fix-deps-file as makefiles use absolute filenames for
|
||||
# object files while CCACHE_BASEDIR will make ccache relativize all paths for
|
||||
# its compiler. The compiler then produces relative dependency files.
|
||||
# make does not know a relative and absolute filename is the same so it will
|
||||
# ignore such dependencies.
|
||||
ifneq ($(CCACHE), )
|
||||
REWRITE_PATHS_RELATIVE = true
|
||||
endif
|
||||
|
||||
ifeq ($(REWRITE_PATHS_RELATIVE), true)
|
||||
# Need to handle -I flags as both '-Ifoo' and '-I foo'.
|
||||
MakeCommandRelative = \
|
||||
$(CD) $(WORKSPACE_ROOT) && \
|
||||
|
||||
@@ -56,32 +56,22 @@ define SetupTestFilesCompilationBody
|
||||
$$(error There are duplicate test file names for $1: $$($1_DUPLICATED_NAMES))
|
||||
endif
|
||||
|
||||
# Always include common test functionality
|
||||
TEST_CFLAGS := -I$(TOPDIR)/test/lib/native
|
||||
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
TEST_CFLAGS += -fvisibility=hidden
|
||||
TEST_LDFLAGS += -Wl,--exclude-libs,ALL
|
||||
else ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
TEST_CFLAGS += -fvisibility=hidden
|
||||
endif
|
||||
|
||||
# The list to depend on starts out empty
|
||||
$1 :=
|
||||
ifeq ($$($1_TYPE), LIBRARY)
|
||||
$1_PREFIX = lib
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB) $$(TEST_CFLAGS)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB) $$(TEST_CFLAGS)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(TEST_LDFLAGS) $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
$1_LOG_TYPE := library
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
$1_OUTPUT_SUBDIR := bin
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKEXE) $$(TEST_CFLAGS)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKEXE) $$(TEST_CFLAGS)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKEXE) $$(TEST_LDFLAGS) $(LDFLAGS_TESTEXE)
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKEXE)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKEXE)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKEXE) $(LDFLAGS_TESTEXE)
|
||||
$1_COMPILATION_TYPE := EXECUTABLE
|
||||
$1_LOG_TYPE := executable
|
||||
else
|
||||
|
||||
@@ -29,17 +29,17 @@ GTEST_VERSION=1.13.0
|
||||
JTREG_VERSION=7.3.1+1
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_x64_linux_hotspot_21.0.6_7.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=a2650fba422283fbed20d936ce5d2a52906a5414ec17b2f7676dddb87201dbae
|
||||
|
||||
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.6_7.tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_SHA256=4ef4083919126a3d93e603284b405c7493905497485a92b375f5d6c3e8f7e8f2
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_x64_mac_hotspot_21.0.6_7.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=7aacfc400078ad65b7c7de3ec75ff74bf5c2077d6740b350f85ae10be4f71e76
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_mac_hotspot_21.0.3_9.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=f777103aab94330d14a29bd99f3a26d60abbab8e2c375cec9602746096721a7c
|
||||
|
||||
MACOS_AARCH64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.3_9.tar.gz
|
||||
MACOS_AARCH64_BOOT_JDK_SHA256=b6be6a9568be83695ec6b7cb977f4902f7be47d74494c290bc2a5c3c951e254f
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.6%2B7/OpenJDK21U-jdk_x64_windows_hotspot_21.0.6_7.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=897c8eebb0f85a99ccecbd482ebae9a45d88c19d6077054f6529ebab49b6d259
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_windows_hotspot_21.0.3_9.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=c43a66cff7a403d56c5c5e1ff10d3d5f95961abf80f97f0e35380594909f0e4d
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
DEFAULT_VERSION_FEATURE=21
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=7
|
||||
DEFAULT_VERSION_UPDATE=4
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2025-04-15
|
||||
DEFAULT_VERSION_DATE=2024-07-16
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=65 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
|
||||
@@ -708,7 +708,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
|
||||
<territory type="BS">𞤄𞤢𞤸𞤢𞤥𞤢𞥄𞤧</territory>
|
||||
<territory type="BT">𞤄𞤵𞥅𞤼𞤢𞥄𞤲</territory>
|
||||
<territory type="BV">𞤅𞤵𞤪𞤭𞥅𞤪𞤫 𞤄𞤵𞥅𞤾𞤫𞥅</territory>
|
||||
<territory type="BW">𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢</territory>
|
||||
<territory type="BW">𞤄𞤮𞤼𞤧𞤵𞤱𞤢𞥄𞤲𞤢</territory>
|
||||
<territory type="BY">𞤄𞤫𞤤𞤢𞤪𞤵𞥅𞤧</territory>
|
||||
<territory type="BZ">𞤄𞤫𞤤𞤭𞥅𞥁</territory>
|
||||
<territory type="CA">𞤑𞤢𞤲𞤢𞤣𞤢𞥄</territory>
|
||||
@@ -8278,7 +8278,7 @@ CLDR data files are interpreted according to the LDML specification (http://unic
|
||||
<exemplarCity>𞤐𞤵𞥅𞤳</exemplarCity>
|
||||
</zone>
|
||||
<zone type="America/Scoresbysund">
|
||||
<exemplarCity>𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼</exemplarCity>
|
||||
<exemplarCity>𞤋𞤼𞥆𞤮𞤳𞤮𞤪𞤼𞤮𞥅𞤪𞤥𞤭𞥅𞤼</exemplarCity>
|
||||
</zone>
|
||||
<zone type="America/Danmarkshavn">
|
||||
<exemplarCity>𞤁𞤢𞥄𞤲𞤥𞤢𞤪𞤳𞥃𞤢𞥄𞤾𞤲</exemplarCity>
|
||||
|
||||
@@ -44,7 +44,7 @@ rm -f *
|
||||
fetchJar() {
|
||||
url="${MAVEN_MIRROR}/$1/$2/$3/$2-$3.jar"
|
||||
if command -v curl > /dev/null; then
|
||||
curl -OL --fail $url
|
||||
curl -O --fail $url
|
||||
elif command -v wget > /dev/null; then
|
||||
wget $url
|
||||
else
|
||||
|
||||
@@ -157,13 +157,8 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
|
||||
DISABLED_WARNINGS_gcc_ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp := nonnull, \
|
||||
DISABLED_WARNINGS_gcc_cgroupV1Subsystem_linux.cpp := address, \
|
||||
DISABLED_WARNINGS_gcc_cgroupV2Subsystem_linux.cpp := address, \
|
||||
DISABLED_WARNINGS_gcc_handshake.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_interp_masm_x86.cpp := uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_jvmciCodeInstaller.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_jvmtiTagMap.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_postaloc.cpp := address, \
|
||||
DISABLED_WARNINGS_gcc_shenandoahLock.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_gcc_synchronizer.cpp := stringop-overflow, \
|
||||
DISABLED_WARNINGS_clang := $(DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_clang_arguments.cpp := missing-field-initializers, \
|
||||
DISABLED_WARNINGS_clang_codeBuffer.cpp := tautological-undefined-compare, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2024, 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
|
||||
@@ -273,7 +273,7 @@ public final class TzdbZoneRulesCompiler {
|
||||
// link version-region-rules
|
||||
out.writeShort(builtZones.size());
|
||||
for (Map.Entry<String, ZoneRules> entry : builtZones.entrySet()) {
|
||||
int regionIndex = findRegionIndex(regionArray, entry.getKey());
|
||||
int regionIndex = Arrays.binarySearch(regionArray, entry.getKey());
|
||||
int rulesIndex = rulesList.indexOf(entry.getValue());
|
||||
out.writeShort(regionIndex);
|
||||
out.writeShort(rulesIndex);
|
||||
@@ -281,8 +281,8 @@ public final class TzdbZoneRulesCompiler {
|
||||
// alias-region
|
||||
out.writeShort(links.size());
|
||||
for (Map.Entry<String, String> entry : links.entrySet()) {
|
||||
int aliasIndex = findRegionIndex(regionArray, entry.getKey());
|
||||
int regionIndex = findRegionIndex(regionArray, entry.getValue());
|
||||
int aliasIndex = Arrays.binarySearch(regionArray, entry.getKey());
|
||||
int regionIndex = Arrays.binarySearch(regionArray, entry.getValue());
|
||||
out.writeShort(aliasIndex);
|
||||
out.writeShort(regionIndex);
|
||||
}
|
||||
@@ -294,14 +294,6 @@ public final class TzdbZoneRulesCompiler {
|
||||
}
|
||||
}
|
||||
|
||||
private static int findRegionIndex(String[] regionArray, String region) {
|
||||
int index = Arrays.binarySearch(regionArray, region);
|
||||
if (index < 0) {
|
||||
throw new IllegalArgumentException("Unknown region: " + region);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
/** Whether to output verbose messages. */
|
||||
private boolean verbose;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, 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
|
||||
@@ -164,8 +164,7 @@ class TzdbZoneRulesProvider {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
int token0len = tokens.length > 0 ? tokens[0].length() : line.length();
|
||||
if (line.regionMatches(true, 0, "Zone", 0, token0len)) { // parse Zone line
|
||||
if (line.startsWith("Zone")) { // parse Zone line
|
||||
String name = tokens[1];
|
||||
if (excludedZones.contains(name)){
|
||||
continue;
|
||||
@@ -183,13 +182,13 @@ class TzdbZoneRulesProvider {
|
||||
if (zLine.parse(tokens, 2)) {
|
||||
openZone = null;
|
||||
}
|
||||
} else if (line.regionMatches(true, 0, "Rule", 0, token0len)) { // parse Rule line
|
||||
} else if (line.startsWith("Rule")) { // parse Rule line
|
||||
String name = tokens[1];
|
||||
if (!rules.containsKey(name)) {
|
||||
rules.put(name, new ArrayList<RuleLine>(10));
|
||||
}
|
||||
rules.get(name).add(new RuleLine().parse(tokens));
|
||||
} else if (line.regionMatches(true, 0, "Link", 0, token0len)) { // parse link line
|
||||
} else if (line.startsWith("Link")) { // parse link line
|
||||
if (tokens.length >= 3) {
|
||||
String realId = tokens[1];
|
||||
String aliasId = tokens[2];
|
||||
@@ -305,7 +304,7 @@ class TzdbZoneRulesProvider {
|
||||
month = parseMonth(tokens[off++]);
|
||||
if (off < tokens.length) {
|
||||
String dayRule = tokens[off++];
|
||||
if (dayRule.regionMatches(true, 0, "last", 0, 4)) {
|
||||
if (dayRule.startsWith("last")) {
|
||||
dayOfMonth = -1;
|
||||
dayOfWeek = parseDayOfWeek(dayRule.substring(4));
|
||||
adjustForwards = false;
|
||||
@@ -356,45 +355,42 @@ class TzdbZoneRulesProvider {
|
||||
}
|
||||
|
||||
int parseYear(String year, int defaultYear) {
|
||||
int len = year.length();
|
||||
|
||||
if (year.regionMatches(true, 0, "minimum", 0, len)) return 1900;
|
||||
if (year.regionMatches(true, 0, "maximum", 0, len)) return Year.MAX_VALUE;
|
||||
if (year.regionMatches(true, 0, "only", 0, len)) return defaultYear;
|
||||
|
||||
switch (year.toLowerCase()) {
|
||||
case "min": return 1900;
|
||||
case "max": return Year.MAX_VALUE;
|
||||
case "only": return defaultYear;
|
||||
}
|
||||
return Integer.parseInt(year);
|
||||
}
|
||||
|
||||
Month parseMonth(String mon) {
|
||||
int len = mon.length();
|
||||
|
||||
if (mon.regionMatches(true, 0, "January", 0, len)) return Month.JANUARY;
|
||||
if (mon.regionMatches(true, 0, "February", 0, len)) return Month.FEBRUARY;
|
||||
if (mon.regionMatches(true, 0, "March", 0, len)) return Month.MARCH;
|
||||
if (mon.regionMatches(true, 0, "April", 0, len)) return Month.APRIL;
|
||||
if (mon.regionMatches(true, 0, "May", 0, len)) return Month.MAY;
|
||||
if (mon.regionMatches(true, 0, "June", 0, len)) return Month.JUNE;
|
||||
if (mon.regionMatches(true, 0, "July", 0, len)) return Month.JULY;
|
||||
if (mon.regionMatches(true, 0, "August", 0, len)) return Month.AUGUST;
|
||||
if (mon.regionMatches(true, 0, "September", 0, len)) return Month.SEPTEMBER;
|
||||
if (mon.regionMatches(true, 0, "October", 0, len)) return Month.OCTOBER;
|
||||
if (mon.regionMatches(true, 0, "November", 0, len)) return Month.NOVEMBER;
|
||||
if (mon.regionMatches(true, 0, "December", 0, len)) return Month.DECEMBER;
|
||||
|
||||
switch (mon) {
|
||||
case "Jan": return Month.JANUARY;
|
||||
case "Feb": return Month.FEBRUARY;
|
||||
case "Mar": return Month.MARCH;
|
||||
case "Apr": return Month.APRIL;
|
||||
case "May": return Month.MAY;
|
||||
case "Jun": return Month.JUNE;
|
||||
case "Jul": return Month.JULY;
|
||||
case "Aug": return Month.AUGUST;
|
||||
case "Sep": return Month.SEPTEMBER;
|
||||
case "Oct": return Month.OCTOBER;
|
||||
case "Nov": return Month.NOVEMBER;
|
||||
case "Dec": return Month.DECEMBER;
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown month: " + mon);
|
||||
}
|
||||
|
||||
DayOfWeek parseDayOfWeek(String dow) {
|
||||
int len = dow.length();
|
||||
|
||||
if (dow.regionMatches(true, 0, "Monday", 0, len)) return DayOfWeek.MONDAY;
|
||||
if (dow.regionMatches(true, 0, "Tuesday", 0, len)) return DayOfWeek.TUESDAY;
|
||||
if (dow.regionMatches(true, 0, "Wednesday", 0, len)) return DayOfWeek.WEDNESDAY;
|
||||
if (dow.regionMatches(true, 0, "Thursday", 0, len)) return DayOfWeek.THURSDAY;
|
||||
if (dow.regionMatches(true, 0, "Friday", 0, len)) return DayOfWeek.FRIDAY;
|
||||
if (dow.regionMatches(true, 0, "Saturday", 0, len)) return DayOfWeek.SATURDAY;
|
||||
if (dow.regionMatches(true, 0, "Sunday", 0, len)) return DayOfWeek.SUNDAY;
|
||||
|
||||
switch (dow) {
|
||||
case "Mon": return DayOfWeek.MONDAY;
|
||||
case "Tue": return DayOfWeek.TUESDAY;
|
||||
case "Wed": return DayOfWeek.WEDNESDAY;
|
||||
case "Thu": return DayOfWeek.THURSDAY;
|
||||
case "Fri": return DayOfWeek.FRIDAY;
|
||||
case "Sat": return DayOfWeek.SATURDAY;
|
||||
case "Sun": return DayOfWeek.SUNDAY;
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown day-of-week: " + dow);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \
|
||||
ProcessImpl_md.c_CFLAGS := $(VERSION_CFLAGS), \
|
||||
WARNINGS_AS_ERRORS_xlc := false, \
|
||||
DISABLED_WARNINGS_gcc_ProcessImpl_md.c := unused-result, \
|
||||
DISABLED_WARNINGS_clang_jni_util.c := format-nonliteral, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
|
||||
|
||||
@@ -340,13 +340,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
|
||||
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
|
||||
DISABLED_WARNINGS_gcc_keycode_cache.c := unused-function, \
|
||||
DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_gtk2_interface.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_gtk3_interface.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
|
||||
DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
|
||||
@@ -667,10 +660,7 @@ else
|
||||
endif
|
||||
|
||||
# hb-ft.cc is not presently needed, and requires freetype 2.4.2 or later.
|
||||
# hb-subset and hb-style APIs are not needed, excluded to cut on compilation time.
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += hb-ft.cc hb-subset-cff-common.cc \
|
||||
hb-subset-cff1.cc hb-subset-cff2.cc hb-subset-input.cc hb-subset-plan.cc \
|
||||
hb-subset.cc hb-subset-instancer-solver.cc gsubgpos-context.cc hb-style.cc
|
||||
LIBFONTMANAGER_EXCLUDE_FILES += libharfbuzz/hb-ft.cc
|
||||
|
||||
# list of disabled warnings and the compilers for which it was specifically added.
|
||||
# array-bounds -> GCC 12 on Alpine Linux
|
||||
|
||||
@@ -33,7 +33,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB), \
|
||||
DISABLED_WARNINGS_gcc := undef, \
|
||||
DISABLED_WARNINGS_clang_aix := undef, \
|
||||
DISABLED_WARNINGS_clang := undef, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LIBS := $(LIBDL), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2022, 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
|
||||
@@ -61,7 +61,6 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
DISABLED_WARNINGS_gcc := sign-compare, \
|
||||
DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \
|
||||
DISABLED_WARNINGS_clang_ps_core.c := pointer-arith, \
|
||||
DISABLED_WARNINGS_clang := sign-compare, \
|
||||
DISABLED_WARNINGS_clang_libproc_impl.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_sadis.c := format-nonliteral, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2022, 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
|
||||
@@ -65,8 +65,6 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \
|
||||
INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \
|
||||
TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \
|
||||
OPTIMIZATION := LOW, \
|
||||
DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKEXE)) \
|
||||
$(JPACKAGE_APPLAUNCHER_INCLUDES), \
|
||||
CFLAGS := $(call JpackageWithStaticCrt, $(CFLAGS_JDKEXE)) \
|
||||
@@ -105,8 +103,6 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \
|
||||
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
|
||||
OPTIMIZATION := LOW, \
|
||||
DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \
|
||||
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -44,7 +44,6 @@ endif
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \
|
||||
NAME := management_ext, \
|
||||
OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \
|
||||
DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2022, 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
|
||||
@@ -660,7 +660,7 @@ public class GenerateJfrFiles {
|
||||
out.write("");
|
||||
out.write("union JfrNativeSettings {");
|
||||
out.write(" // Array version.");
|
||||
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS + NUMBER_OF_RESERVED_EVENTS];");
|
||||
out.write(" jfrNativeEventSetting bits[NUMBER_OF_EVENTS];");
|
||||
out.write(" // Then, to make it easy to debug,");
|
||||
out.write(" // add named struct members also.");
|
||||
out.write(" struct {");
|
||||
|
||||
@@ -80,10 +80,6 @@ IMAGES_TARGETS += $(COPY_FH)
|
||||
# Use JTREG_TEST_OPTS for test VM options
|
||||
# Use JTREG_TESTS for jtreg tests parameter
|
||||
#
|
||||
# Most likely you want to select a specific test from test/failure_handler/test
|
||||
# and manually inspect the results. This target does not actually verify
|
||||
# anything about the failure_handler's output or even if it ran at all.
|
||||
#
|
||||
RUN_DIR := $(FH_SUPPORT)/test
|
||||
|
||||
test:
|
||||
|
||||
@@ -858,7 +858,6 @@ ifeq ($(call isTargetOs, linux), true)
|
||||
BUILD_TEST_exeinvoke_exeinvoke.c_OPTIMIZATION := NONE
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libAsyncGetCallTraceTest := -ldl
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libfast-math := -ffast-math
|
||||
else
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c \
|
||||
exeinvoke.c exestack-gap.c exestack-tls.c libAsyncGetCallTraceTest.cpp
|
||||
@@ -868,7 +867,7 @@ BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exesigtest := -ljvm
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c libTestUnloadedClass.cpp
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c libterminatedThread.c libTestJNI.c libCompleteExit.c libMonitorWithDeadObjectTest.c libTestPsig.c libnativeStack.c exeGetCreatedJavaVMs.c
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libatExit := jvm.lib
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exedaemonDestroy := jvm.lib
|
||||
else
|
||||
@@ -1511,10 +1510,9 @@ else
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libCompleteExit += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libMonitorWithDeadObjectTest += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libnativeStack += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libTestUnloadedClass += -lpthread
|
||||
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeGetCreatedJavaVMs := -ljvm -lpthread
|
||||
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c exeGetProcessorInfo.c
|
||||
BUILD_HOTSPOT_JTREG_EXCLUDE += libNativeException.c
|
||||
endif
|
||||
|
||||
ifeq ($(ASAN_ENABLED), true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -53,6 +53,8 @@ BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeJliLaunchTest := \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjli \
|
||||
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli
|
||||
|
||||
TEST_LIB_NATIVE_SRC := $(TOPDIR)/test/lib/native
|
||||
|
||||
# Platform specific setup
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c \
|
||||
@@ -67,14 +69,20 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeNullCallerTest := $(LIBCXX) jvm.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exerevokeall := advapi32.lib
|
||||
BUILD_JDK_JTREG_EXECUTABLES_CFLAGS_exeNullCallerTest := /EHsc
|
||||
|
||||
# java.lang.foreign tests
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
|
||||
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTracePinnedThreads := jvm.lib
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libNewDirectByteBuffer := $(WIN_LIB_JAVA)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libGetXSpace := $(WIN_LIB_JAVA)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libFatalErrorTest := $(WIN_LIB_JAVA)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libLogEventTest := $(WIN_LIB_JAVA)
|
||||
else
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libFatalErrorTest := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libLogEventTest := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libDirectIO := -ljava
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libNewDirectByteBuffer := -ljava
|
||||
@@ -82,10 +90,15 @@ else
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libNativeThread := -pthread
|
||||
|
||||
# java.lang.foreign tests
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncStackWalk := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncStackWalk := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libAsyncInvokers := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libAsyncInvokers := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerUnnamed := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerUnnamed := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLinkerInvokerModule := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLinkerInvokerModule := -pthread
|
||||
BUILD_JDK_JTREG_LIBRARIES_CFLAGS_libLoaderLookupInvoker := -I$(TEST_LIB_NATIVE_SRC)
|
||||
BUILD_JDK_JTREG_LIBRARIES_LDFLAGS_libLoaderLookupInvoker := -pthread
|
||||
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libExplicitAttach := -ljvm
|
||||
@@ -109,14 +122,11 @@ ifeq ($(call isTargetOs, macosx), true)
|
||||
BUILD_JDK_JTREG_EXECUTABLES_LIBS_exeJniInvocationTest := -ljli
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libTestDynamicStore := \
|
||||
-framework Cocoa -framework SystemConfiguration
|
||||
BUILD_JDK_JTREG_LIBRARIES_LIBS_libSharedTexturesTest := \
|
||||
-framework Cocoa -framework Metal
|
||||
else
|
||||
BUILD_JDK_JTREG_EXCLUDE += libTestMainKeyWindow.m
|
||||
BUILD_JDK_JTREG_EXCLUDE += libTestDynamicStore.m
|
||||
BUILD_JDK_JTREG_EXCLUDE += exeJniInvocationTest.c
|
||||
BUILD_JDK_JTREG_EXCLUDE += exeLibraryCache.c
|
||||
BUILD_JDK_JTREG_EXCLUDE += libSharedTexturesTest.m
|
||||
endif
|
||||
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
|
||||
@@ -694,11 +694,6 @@ reg_class no_special_ptr_reg %{
|
||||
return _NO_SPECIAL_PTR_REG_mask;
|
||||
%}
|
||||
|
||||
// Class for all non_special pointer registers (excluding rfp)
|
||||
reg_class no_special_no_rfp_ptr_reg %{
|
||||
return _NO_SPECIAL_NO_RFP_PTR_REG_mask;
|
||||
%}
|
||||
|
||||
// Class for all float registers
|
||||
reg_class float_reg(
|
||||
V0,
|
||||
@@ -1130,7 +1125,6 @@ extern RegMask _PTR_REG_mask;
|
||||
extern RegMask _NO_SPECIAL_REG32_mask;
|
||||
extern RegMask _NO_SPECIAL_REG_mask;
|
||||
extern RegMask _NO_SPECIAL_PTR_REG_mask;
|
||||
extern RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
|
||||
|
||||
class CallStubImpl {
|
||||
|
||||
@@ -1219,7 +1213,6 @@ source %{
|
||||
RegMask _NO_SPECIAL_REG32_mask;
|
||||
RegMask _NO_SPECIAL_REG_mask;
|
||||
RegMask _NO_SPECIAL_PTR_REG_mask;
|
||||
RegMask _NO_SPECIAL_NO_RFP_PTR_REG_mask;
|
||||
|
||||
void reg_mask_init() {
|
||||
// We derive below RegMask(s) from the ones which are auto-generated from
|
||||
@@ -1256,9 +1249,6 @@ source %{
|
||||
_NO_SPECIAL_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
_NO_SPECIAL_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
}
|
||||
|
||||
_NO_SPECIAL_NO_RFP_PTR_REG_mask = _NO_SPECIAL_PTR_REG_mask;
|
||||
_NO_SPECIAL_NO_RFP_PTR_REG_mask.Remove(OptoReg::as_OptoReg(r29->as_VMReg()));
|
||||
}
|
||||
|
||||
// Optimizaton of volatile gets and puts
|
||||
@@ -1731,8 +1721,8 @@ void MachPrologNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
|
||||
st->print("# stack bang size=%d\n\t", framesize);
|
||||
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
st->print("ldr zr, [lr]\n\t");
|
||||
st->print("paciaz\n\t");
|
||||
st->print("ldr zr, [lr]\n\t");
|
||||
st->print("pacia lr, rfp\n\t");
|
||||
}
|
||||
if (framesize < ((1 << 9) + 2 * wordSize)) {
|
||||
st->print("sub sp, sp, #%d\n\t", framesize);
|
||||
@@ -1861,8 +1851,8 @@ void MachEpilogNode::format(PhaseRegAlloc *ra_, outputStream *st) const {
|
||||
st->print("ldp lr, rfp, [sp],#%d\n\t", (2 * wordSize));
|
||||
}
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
st->print("autiaz\n\t");
|
||||
st->print("ldr zr, [lr]\n\t");
|
||||
st->print("autia lr, rfp\n\t");
|
||||
st->print("ldr zr, [lr]\n\t");
|
||||
}
|
||||
|
||||
if (do_polling() && C->is_method_compilation()) {
|
||||
@@ -4895,18 +4885,6 @@ operand iRegPNoSp()
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// This operand is not allowed to use rfp even if
|
||||
// rfp is not used to hold the frame pointer.
|
||||
operand iRegPNoSpNoRfp()
|
||||
%{
|
||||
constraint(ALLOC_IN_RC(no_special_no_rfp_ptr_reg));
|
||||
match(RegP);
|
||||
match(iRegPNoSp);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
interface(REG_INTER);
|
||||
%}
|
||||
|
||||
// Pointer 64 bit Register R0 only
|
||||
operand iRegP_R0()
|
||||
%{
|
||||
@@ -16584,9 +16562,7 @@ instruct CallLeafNoFPDirect(method meth)
|
||||
// Also known as an 'interprocedural jump'.
|
||||
// Target of jump will eventually return to caller.
|
||||
// TailJump below removes the return address.
|
||||
// Don't use rfp for 'jump_target' because a MachEpilogNode has already been
|
||||
// emitted just above the TailCall which has reset rfp to the caller state.
|
||||
instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr)
|
||||
instruct TailCalljmpInd(iRegPNoSp jump_target, inline_cache_RegP method_ptr)
|
||||
%{
|
||||
match(TailCall jump_target method_ptr);
|
||||
|
||||
@@ -16599,7 +16575,7 @@ instruct TailCalljmpInd(iRegPNoSpNoRfp jump_target, inline_cache_RegP method_ptr
|
||||
ins_pipe(pipe_class_call);
|
||||
%}
|
||||
|
||||
instruct TailjmpInd(iRegPNoSpNoRfp jump_target, iRegP_R0 ex_oop)
|
||||
instruct TailjmpInd(iRegPNoSp jump_target, iRegP_R0 ex_oop)
|
||||
%{
|
||||
match(TailJump jump_target ex_oop);
|
||||
|
||||
@@ -17174,32 +17150,6 @@ instruct array_equalsC(iRegP_R1 ary1, iRegP_R2 ary2, iRegI_R0 result,
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct arrays_hashcode(iRegP_R1 ary, iRegI_R2 cnt, iRegI_R0 result, immI basic_type,
|
||||
vRegD_V0 vtmp0, vRegD_V1 vtmp1, vRegD_V2 vtmp2, vRegD_V3 vtmp3,
|
||||
vRegD_V4 vtmp4, vRegD_V5 vtmp5, vRegD_V6 vtmp6, vRegD_V7 vtmp7,
|
||||
vRegD_V12 vtmp8, vRegD_V13 vtmp9, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (VectorizedHashCode (Binary ary cnt) (Binary result basic_type)));
|
||||
effect(TEMP vtmp0, TEMP vtmp1, TEMP vtmp2, TEMP vtmp3, TEMP vtmp4, TEMP vtmp5, TEMP vtmp6,
|
||||
TEMP vtmp7, TEMP vtmp8, TEMP vtmp9, USE_KILL ary, USE_KILL cnt, USE basic_type, KILL cr);
|
||||
|
||||
format %{ "Array HashCode array[] $ary,$cnt,$result,$basic_type -> $result // KILL all" %}
|
||||
ins_encode %{
|
||||
address tpc = __ arrays_hashcode($ary$$Register, $cnt$$Register, $result$$Register,
|
||||
$vtmp3$$FloatRegister, $vtmp2$$FloatRegister,
|
||||
$vtmp1$$FloatRegister, $vtmp0$$FloatRegister,
|
||||
$vtmp4$$FloatRegister, $vtmp5$$FloatRegister,
|
||||
$vtmp6$$FloatRegister, $vtmp7$$FloatRegister,
|
||||
$vtmp8$$FloatRegister, $vtmp9$$FloatRegister,
|
||||
(BasicType)$basic_type$$constant);
|
||||
if (tpc == nullptr) {
|
||||
ciEnv::current()->record_failure("CodeCache is full");
|
||||
return;
|
||||
}
|
||||
%}
|
||||
ins_pipe(pipe_class_memory);
|
||||
%}
|
||||
|
||||
instruct count_positives(iRegP_R1 ary1, iRegI_R2 len, iRegI_R0 result, rFlagsReg cr)
|
||||
%{
|
||||
match(Set result (CountPositives ary1 len));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2024, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, 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
|
||||
@@ -286,11 +286,6 @@ public:
|
||||
f(r->raw_encoding(), lsb + 4, lsb);
|
||||
}
|
||||
|
||||
//<0-15>reg: As `rf(FloatRegister)`, but only the lower 16 FloatRegisters are allowed.
|
||||
void lrf(FloatRegister r, int lsb) {
|
||||
f(r->raw_encoding(), lsb + 3, lsb);
|
||||
}
|
||||
|
||||
void prf(PRegister r, int lsb) {
|
||||
f(r->raw_encoding(), lsb + 3, lsb);
|
||||
}
|
||||
@@ -578,7 +573,7 @@ class Address {
|
||||
if (size == 0) // It's a byte
|
||||
i->f(ext().shift() >= 0, 12);
|
||||
else {
|
||||
guarantee(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
|
||||
assert(ext().shift() <= 0 || ext().shift() == (int)size, "bad shift");
|
||||
i->f(ext().shift() > 0, 12);
|
||||
}
|
||||
i->f(0b10, 11, 10);
|
||||
@@ -768,7 +763,6 @@ public:
|
||||
#define f current_insn.f
|
||||
#define sf current_insn.sf
|
||||
#define rf current_insn.rf
|
||||
#define lrf current_insn.lrf
|
||||
#define srf current_insn.srf
|
||||
#define zrf current_insn.zrf
|
||||
#define prf current_insn.prf
|
||||
@@ -1094,8 +1088,8 @@ public:
|
||||
#undef INSN
|
||||
|
||||
// we only provide mrs and msr for the special purpose system
|
||||
// registers where op1 (instr[20:19]) == 11
|
||||
// n.b msr has L (instr[21]) == 0 mrs has L == 1
|
||||
// registers where op1 (instr[20:19]) == 11 and, (currently) only
|
||||
// use it for FPSR n.b msr has L (instr[21]) == 0 mrs has L == 1
|
||||
|
||||
void msr(int op1, int CRn, int CRm, int op2, Register rt) {
|
||||
starti;
|
||||
@@ -1594,16 +1588,6 @@ public:
|
||||
|
||||
#undef INSN
|
||||
|
||||
// Load/store a register, but with a BasicType parameter. Loaded signed integer values are
|
||||
// extended to 64 bits.
|
||||
void load(Register Rt, const Address &adr, BasicType bt) {
|
||||
int op = (is_signed_subword_type(bt) || bt == T_INT) ? 0b10 : 0b01;
|
||||
ld_st2(Rt, adr, exact_log2(type2aelembytes(bt)), op);
|
||||
}
|
||||
void store(Register Rt, const Address &adr, BasicType bt) {
|
||||
ld_st2(Rt, adr, exact_log2(type2aelembytes(bt)), 0b00);
|
||||
}
|
||||
|
||||
/* SIMD extensions
|
||||
*
|
||||
* We just use FloatRegister in the following. They are exactly the same
|
||||
@@ -2622,7 +2606,6 @@ template<typename R, typename... Rx>
|
||||
INSN(addpv, 0, 0b101111, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
|
||||
INSN(smullv, 0, 0b110000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(umullv, 1, 0b110000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(smlalv, 0, 0b100000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(umlalv, 1, 0b100000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(maxv, 0, 0b011001, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(minv, 0, 0b011011, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
@@ -2895,28 +2878,6 @@ template<typename R, typename... Rx>
|
||||
// FMULX - Vector - Scalar
|
||||
INSN(fmulxvs, 1, 0b1001);
|
||||
|
||||
#undef INSN
|
||||
|
||||
#define INSN(NAME, op1, op2) \
|
||||
void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn, FloatRegister Vm, int index) { \
|
||||
starti; \
|
||||
assert(T == T4H || T == T8H || T == T2S || T == T4S, "invalid arrangement"); \
|
||||
assert(index >= 0 && \
|
||||
((T == T2S && index <= 1) || (T != T2S && index <= 3) || (T == T8H && index <= 7)), \
|
||||
"invalid index"); \
|
||||
assert((T != T4H && T != T8H) || Vm->encoding() < 16, "invalid source SIMD&FP register"); \
|
||||
f(0, 31), f((int)T & 1, 30), f(op1, 29), f(0b01111, 28, 24); \
|
||||
if (T == T4H || T == T8H) { \
|
||||
f(0b01, 23, 22), f(index & 0b11, 21, 20), lrf(Vm, 16), f(index >> 2 & 1, 11); \
|
||||
} else { \
|
||||
f(0b10, 23, 22), f(index & 1, 21), rf(Vm, 16), f(index >> 1, 11); \
|
||||
} \
|
||||
f(op2, 15, 12), f(0, 10), rf(Vn, 5), rf(Vd, 0); \
|
||||
}
|
||||
|
||||
// MUL - Vector - Scalar
|
||||
INSN(mulvs, 0, 0b1000);
|
||||
|
||||
#undef INSN
|
||||
|
||||
// Floating-point Reciprocal Estimate
|
||||
@@ -3080,33 +3041,6 @@ public:
|
||||
umov(Xd, Vn, T, index);
|
||||
}
|
||||
|
||||
protected:
|
||||
void _xaddwv(bool is_unsigned, FloatRegister Vd, FloatRegister Vn, SIMD_Arrangement Ta,
|
||||
FloatRegister Vm, SIMD_Arrangement Tb) {
|
||||
starti;
|
||||
assert((Tb >> 1) + 1 == (Ta >> 1), "Incompatible arrangement");
|
||||
f(0, 31), f((int)Tb & 1, 30), f(is_unsigned ? 1 : 0, 29), f(0b01110, 28, 24);
|
||||
f((int)(Ta >> 1) - 1, 23, 22), f(1, 21), rf(Vm, 16), f(0b000100, 15, 10), rf(Vn, 5), rf(Vd, 0);
|
||||
}
|
||||
|
||||
public:
|
||||
#define INSN(NAME, assertion, is_unsigned) \
|
||||
void NAME(FloatRegister Vd, FloatRegister Vn, SIMD_Arrangement Ta, FloatRegister Vm, \
|
||||
SIMD_Arrangement Tb) { \
|
||||
assert((assertion), "invalid arrangement"); \
|
||||
_xaddwv(is_unsigned, Vd, Vn, Ta, Vm, Tb); \
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
INSN(uaddwv, Tb == T8B || Tb == T4H || Tb == T2S, /*is_unsigned*/true)
|
||||
INSN(uaddwv2, Tb == T16B || Tb == T8H || Tb == T4S, /*is_unsigned*/true)
|
||||
INSN(saddwv, Tb == T8B || Tb == T4H || Tb == T2S, /*is_unsigned*/false)
|
||||
INSN(saddwv2, Tb == T16B || Tb == T8H || Tb == T4S, /*is_unsigned*/false)
|
||||
|
||||
#undef INSN
|
||||
|
||||
|
||||
private:
|
||||
void _pmull(FloatRegister Vd, SIMD_Arrangement Ta, FloatRegister Vn, FloatRegister Vm, SIMD_Arrangement Tb) {
|
||||
starti;
|
||||
|
||||
@@ -385,7 +385,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
|
||||
|
||||
// load issuing PC (the return address for this stub) into r3
|
||||
__ ldr(exception_pc, Address(rfp, 1*BytesPerWord));
|
||||
__ authenticate_return_address(exception_pc);
|
||||
__ authenticate_return_address(exception_pc, rscratch1);
|
||||
|
||||
// make sure that the vm_results are cleared (may be unnecessary)
|
||||
__ str(zr, Address(rthread, JavaThread::vm_result_offset()));
|
||||
@@ -434,7 +434,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
|
||||
__ str(exception_pc, Address(rthread, JavaThread::exception_pc_offset()));
|
||||
|
||||
// patch throwing pc into return address (has bci & oop map)
|
||||
__ protect_return_address(exception_pc);
|
||||
__ protect_return_address(exception_pc, rscratch1);
|
||||
__ str(exception_pc, Address(rfp, 1*BytesPerWord));
|
||||
|
||||
// compute the exception handler.
|
||||
@@ -450,7 +450,7 @@ OopMapSet* Runtime1::generate_handle_exception(StubID id, StubAssembler *sasm) {
|
||||
__ invalidate_registers(false, true, true, true, true, true);
|
||||
|
||||
// patch the return address, this stub will directly return to the exception handler
|
||||
__ protect_return_address(r0);
|
||||
__ protect_return_address(r0, rscratch1);
|
||||
__ str(r0, Address(rfp, 1*BytesPerWord));
|
||||
|
||||
switch (id) {
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "opto/output.hpp"
|
||||
#include "opto/subnode.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
@@ -46,101 +45,6 @@
|
||||
|
||||
typedef void (MacroAssembler::* chr_insn)(Register Rt, const Address &adr);
|
||||
|
||||
// jdk.internal.util.ArraysSupport.vectorizedHashCode
|
||||
address C2_MacroAssembler::arrays_hashcode(Register ary, Register cnt, Register result,
|
||||
FloatRegister vdata0, FloatRegister vdata1,
|
||||
FloatRegister vdata2, FloatRegister vdata3,
|
||||
FloatRegister vmul0, FloatRegister vmul1,
|
||||
FloatRegister vmul2, FloatRegister vmul3,
|
||||
FloatRegister vpow, FloatRegister vpowm,
|
||||
BasicType eltype) {
|
||||
ARRAYS_HASHCODE_REGISTERS;
|
||||
|
||||
Register tmp1 = rscratch1, tmp2 = rscratch2;
|
||||
|
||||
Label TAIL, STUB_SWITCH, STUB_SWITCH_OUT, LOOP, BR_BASE, LARGE, DONE;
|
||||
|
||||
// Vectorization factor. Number of array elements loaded to one SIMD&FP registers by the stubs. We
|
||||
// use 8H load arrangements for chars and shorts and 8B for booleans and bytes. It's possible to
|
||||
// use 4H for chars and shorts instead, but using 8H gives better performance.
|
||||
const size_t vf = eltype == T_BOOLEAN || eltype == T_BYTE ? 8
|
||||
: eltype == T_CHAR || eltype == T_SHORT ? 8
|
||||
: eltype == T_INT ? 4
|
||||
: 0;
|
||||
guarantee(vf, "unsupported eltype");
|
||||
|
||||
// Unroll factor for the scalar loop below. The value is chosen based on performance analysis.
|
||||
const size_t unroll_factor = 4;
|
||||
|
||||
switch (eltype) {
|
||||
case T_BOOLEAN:
|
||||
BLOCK_COMMENT("arrays_hashcode(unsigned byte) {");
|
||||
break;
|
||||
case T_CHAR:
|
||||
BLOCK_COMMENT("arrays_hashcode(char) {");
|
||||
break;
|
||||
case T_BYTE:
|
||||
BLOCK_COMMENT("arrays_hashcode(byte) {");
|
||||
break;
|
||||
case T_SHORT:
|
||||
BLOCK_COMMENT("arrays_hashcode(short) {");
|
||||
break;
|
||||
case T_INT:
|
||||
BLOCK_COMMENT("arrays_hashcode(int) {");
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
// large_arrays_hashcode(T_INT) performs worse than the scalar loop below when the Neon loop
|
||||
// implemented by the stub executes just once. Call the stub only if at least two iterations will
|
||||
// be executed.
|
||||
const size_t large_threshold = eltype == T_INT ? vf * 2 : vf;
|
||||
cmpw(cnt, large_threshold);
|
||||
br(Assembler::HS, LARGE);
|
||||
|
||||
bind(TAIL);
|
||||
|
||||
// The andr performs cnt % uf where uf = unroll_factor. The subtract shifted by 3 offsets past
|
||||
// uf - (cnt % uf) pairs of load + madd insns i.e. it only executes cnt % uf load + madd pairs.
|
||||
// Iteration eats up the remainder, uf elements at a time.
|
||||
assert(is_power_of_2(unroll_factor), "can't use this value to calculate the jump target PC");
|
||||
andr(tmp2, cnt, unroll_factor - 1);
|
||||
adr(tmp1, BR_BASE);
|
||||
sub(tmp1, tmp1, tmp2, ext::sxtw, 3);
|
||||
movw(tmp2, 0x1f);
|
||||
br(tmp1);
|
||||
|
||||
bind(LOOP);
|
||||
for (size_t i = 0; i < unroll_factor; ++i) {
|
||||
load(tmp1, Address(post(ary, type2aelembytes(eltype))), eltype);
|
||||
maddw(result, result, tmp2, tmp1);
|
||||
}
|
||||
bind(BR_BASE);
|
||||
subsw(cnt, cnt, unroll_factor);
|
||||
br(Assembler::HS, LOOP);
|
||||
|
||||
b(DONE);
|
||||
|
||||
bind(LARGE);
|
||||
|
||||
RuntimeAddress stub = RuntimeAddress(StubRoutines::aarch64::large_arrays_hashcode(eltype));
|
||||
assert(stub.target() != nullptr, "array_hashcode stub has not been generated");
|
||||
address tpc = trampoline_call(stub);
|
||||
if (tpc == nullptr) {
|
||||
DEBUG_ONLY(reset_labels(TAIL, BR_BASE));
|
||||
postcond(pc() == badAddress);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bind(DONE);
|
||||
|
||||
BLOCK_COMMENT("} // arrays_hashcode");
|
||||
|
||||
postcond(pc() != badAddress);
|
||||
return pc();
|
||||
}
|
||||
|
||||
void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register tmpReg,
|
||||
Register tmp2Reg, Register tmp3Reg) {
|
||||
Register oop = objectReg;
|
||||
@@ -213,7 +117,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
|
||||
// Try to CAS m->owner from NULL to current thread.
|
||||
add(tmp, disp_hdr, (in_bytes(ObjectMonitor::owner_offset())-markWord::monitor_value));
|
||||
cmpxchg(tmp, zr, rthread, Assembler::xword, /*acquire*/ true,
|
||||
/*release*/ true, /*weak*/ false, tmp3Reg); // Sets flags for result
|
||||
/*release*/ true, /*weak*/ false, rscratch1); // Sets flags for result
|
||||
|
||||
if (LockingMode != LM_LIGHTWEIGHT) {
|
||||
// Store a non-null value into the box to avoid looking like a re-entrant
|
||||
@@ -225,7 +129,7 @@ void C2_MacroAssembler::fast_lock(Register objectReg, Register boxReg, Register
|
||||
}
|
||||
br(Assembler::EQ, cont); // CAS success means locking succeeded
|
||||
|
||||
cmp(tmp3Reg, rthread);
|
||||
cmp(rscratch1, rthread);
|
||||
br(Assembler::NE, cont); // Check for recursive locking
|
||||
|
||||
// Recursive lock case
|
||||
|
||||
@@ -35,13 +35,6 @@
|
||||
enum shift_kind kind = Assembler::LSL, unsigned shift = 0);
|
||||
|
||||
public:
|
||||
// jdk.internal.util.ArraysSupport.vectorizedHashCode
|
||||
address arrays_hashcode(Register ary, Register cnt, Register result, FloatRegister vdata0,
|
||||
FloatRegister vdata1, FloatRegister vdata2, FloatRegister vdata3,
|
||||
FloatRegister vmul0, FloatRegister vmul1, FloatRegister vmul2,
|
||||
FloatRegister vmul3, FloatRegister vpow, FloatRegister vpowm,
|
||||
BasicType eltype);
|
||||
|
||||
// Code used by cmpFastLock and cmpFastUnlock mach instructions in .ad file.
|
||||
// See full description in macroAssembler_aarch64.cpp.
|
||||
void fast_lock(Register object, Register box, Register tmp, Register tmp2, Register tmp3);
|
||||
|
||||
@@ -62,7 +62,7 @@ inline frame FreezeBase::sender(const frame& f) {
|
||||
intptr_t** link_addr = link_address<FKind>(f);
|
||||
|
||||
intptr_t* sender_sp = (intptr_t*)(link_addr + frame::sender_sp_offset); // f.unextended_sp() + (fsize/wordSize); //
|
||||
address sender_pc = ContinuationHelper::return_address_at(sender_sp - 1);
|
||||
address sender_pc = (address) *(sender_sp-1);
|
||||
assert(sender_sp != f.sp(), "must have changed");
|
||||
|
||||
int slot = 0;
|
||||
@@ -217,7 +217,7 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame&
|
||||
intptr_t* heap_sp = hf.unextended_sp();
|
||||
// If caller is interpreted it already made room for the callee arguments
|
||||
int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0;
|
||||
const int fsize = (int)(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap);
|
||||
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap;
|
||||
const int locals = hf.interpreter_frame_method()->max_locals();
|
||||
intptr_t* frame_sp = caller.unextended_sp() - fsize;
|
||||
intptr_t* fp = frame_sp + (hf.fp() - heap_sp);
|
||||
|
||||
@@ -68,17 +68,6 @@ inline void ContinuationHelper::push_pd(const frame& f) {
|
||||
*(intptr_t**)(f.sp() - frame::sender_sp_offset) = f.fp();
|
||||
}
|
||||
|
||||
#define CPU_OVERRIDES_RETURN_ADDRESS_ACCESSORS
|
||||
|
||||
inline address ContinuationHelper::return_address_at(intptr_t* sp) {
|
||||
return pauth_strip_verifiable(*(address*)sp);
|
||||
}
|
||||
|
||||
inline void ContinuationHelper::patch_return_address_at(intptr_t* sp,
|
||||
address pc) {
|
||||
*(address*)sp = pauth_sign_return_address(pc);
|
||||
}
|
||||
|
||||
inline void ContinuationHelper::set_anchor_to_entry_pd(JavaFrameAnchor* anchor, ContinuationEntry* entry) {
|
||||
anchor->set_last_Java_fp(entry->entry_fp());
|
||||
}
|
||||
@@ -91,8 +80,7 @@ inline void ContinuationHelper::set_anchor_pd(JavaFrameAnchor* anchor, intptr_t*
|
||||
|
||||
inline bool ContinuationHelper::Frame::assert_frame_laid_out(frame f) {
|
||||
intptr_t* sp = f.sp();
|
||||
address pc = ContinuationHelper::return_address_at(
|
||||
sp - frame::sender_sp_ret_address_offset());
|
||||
address pc = *(address*)(sp - frame::sender_sp_ret_address_offset());
|
||||
intptr_t* fp = *(intptr_t**)(sp - frame::sender_sp_offset);
|
||||
assert(f.raw_pc() == pc, "f.ra_pc: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.raw_pc()), p2i(pc));
|
||||
assert(f.fp() == fp, "f.fp: " INTPTR_FORMAT " actual: " INTPTR_FORMAT, p2i(f.fp()), p2i(fp));
|
||||
@@ -120,14 +108,13 @@ inline void ContinuationHelper::InterpretedFrame::patch_sender_sp(frame& f, cons
|
||||
}
|
||||
|
||||
inline address ContinuationHelper::Frame::real_pc(const frame& f) {
|
||||
// Always used in assertions. Just strip it.
|
||||
address* pc_addr = &(((address*) f.sp())[-1]);
|
||||
return pauth_strip_pointer(*pc_addr);
|
||||
return *pc_addr;
|
||||
}
|
||||
|
||||
inline void ContinuationHelper::Frame::patch_pc(const frame& f, address pc) {
|
||||
address* pc_addr = &(((address*) f.sp())[-1]);
|
||||
*pc_addr = pauth_sign_return_address(pc);
|
||||
*pc_addr = pc;
|
||||
}
|
||||
|
||||
inline intptr_t* ContinuationHelper::InterpretedFrame::frame_top(const frame& f, InterpreterOopMap* mask) { // inclusive; this will be copied with the frame
|
||||
|
||||
@@ -269,9 +269,6 @@ void DowncallStubGenerator::generate() {
|
||||
Label L_reguard;
|
||||
Label L_after_reguard;
|
||||
if (_needs_transition) {
|
||||
// Restore cpu control state after JNI call
|
||||
__ restore_cpu_control_state_after_jni(rscratch1, tmp1);
|
||||
|
||||
__ mov(tmp1, _thread_in_native_trans);
|
||||
__ strw(tmp1, Address(rthread, JavaThread::thread_state_offset()));
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
sender_sp = (intptr_t*) addr_at(sender_sp_offset);
|
||||
sender_unextended_sp = (intptr_t*) this->fp()[interpreter_frame_sender_sp_offset];
|
||||
saved_fp = (intptr_t*) this->fp()[link_offset];
|
||||
sender_pc = pauth_strip_verifiable((address) this->fp()[return_addr_offset]);
|
||||
sender_pc = pauth_strip_verifiable((address) this->fp()[return_addr_offset], (address)saved_fp);
|
||||
|
||||
} else {
|
||||
// must be some sort of compiled/runtime frame
|
||||
// fp does not have to be safe (although it could be check for c1?)
|
||||
@@ -157,9 +158,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
sender_unextended_sp = sender_sp;
|
||||
// Note: frame::sender_sp_offset is only valid for compiled frame
|
||||
saved_fp = (intptr_t*) *(sender_sp - frame::sender_sp_offset);
|
||||
// Note: PAC authentication may fail in case broken frame is passed in.
|
||||
// Just strip it for now.
|
||||
sender_pc = pauth_strip_pointer((address) *(sender_sp - 1));
|
||||
sender_pc = pauth_strip_verifiable((address) *(sender_sp-1), (address)saved_fp);
|
||||
}
|
||||
|
||||
if (Continuation::is_return_barrier_entry(sender_pc)) {
|
||||
@@ -277,8 +276,9 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
void frame::patch_pc(Thread* thread, address pc) {
|
||||
assert(_cb == CodeCache::find_blob(pc), "unexpected pc");
|
||||
address* pc_addr = &(((address*) sp())[-1]);
|
||||
address signed_pc = pauth_sign_return_address(pc);
|
||||
address pc_old = pauth_strip_verifiable(*pc_addr);
|
||||
address signing_sp = (((address*) sp())[-2]);
|
||||
address signed_pc = pauth_sign_return_address(pc, (address)signing_sp);
|
||||
address pc_old = pauth_strip_verifiable(*pc_addr, (address)signing_sp);
|
||||
|
||||
if (TracePcPatching) {
|
||||
tty->print("patch_pc at address " INTPTR_FORMAT " [" INTPTR_FORMAT " -> " INTPTR_FORMAT "]",
|
||||
@@ -472,9 +472,8 @@ frame frame::sender_for_interpreter_frame(RegisterMap* map) const {
|
||||
}
|
||||
#endif // COMPILER2_OR_JVMCI
|
||||
|
||||
// For ROP protection, Interpreter will have signed the sender_pc,
|
||||
// but there is no requirement to authenticate it here.
|
||||
address sender_pc = pauth_strip_verifiable(sender_pc_maybe_signed());
|
||||
// For ROP protection, Interpreter will have signed the sender_pc, but there is no requirement to authenticate it here.
|
||||
address sender_pc = pauth_strip_verifiable(sender_pc_maybe_signed(), (address)link());
|
||||
|
||||
if (Continuation::is_return_barrier_entry(sender_pc)) {
|
||||
if (map->walk_cont()) { // about to walk into an h-stack
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
// Entry frames
|
||||
// n.b. these values are determined by the layout defined in
|
||||
// stubGenerator for the Java call stub
|
||||
entry_frame_after_call_words = 29,
|
||||
entry_frame_after_call_words = 27,
|
||||
entry_frame_call_wrapper_offset = -8,
|
||||
|
||||
// we don't need a save area
|
||||
|
||||
@@ -152,10 +152,7 @@ inline frame::frame(intptr_t* sp, intptr_t* unextended_sp, intptr_t* fp, address
|
||||
setup(pc);
|
||||
}
|
||||
|
||||
inline frame::frame(intptr_t* sp)
|
||||
: frame(sp, sp,
|
||||
*(intptr_t**)(sp - frame::sender_sp_offset),
|
||||
pauth_strip_verifiable(*(address*)(sp - 1))) {}
|
||||
inline frame::frame(intptr_t* sp) : frame(sp, sp, *(intptr_t**)(sp - frame::sender_sp_offset), *(address*)(sp - 1)) {}
|
||||
|
||||
inline frame::frame(intptr_t* sp, intptr_t* fp) {
|
||||
intptr_t a = intptr_t(sp);
|
||||
@@ -236,13 +233,13 @@ inline intptr_t* frame::real_fp() const {
|
||||
|
||||
inline int frame::frame_size() const {
|
||||
return is_interpreted_frame()
|
||||
? pointer_delta_as_int(sender_sp(), sp())
|
||||
? sender_sp() - sp()
|
||||
: cb()->frame_size();
|
||||
}
|
||||
|
||||
inline int frame::compiled_frame_stack_argsize() const {
|
||||
assert(cb()->is_compiled(), "");
|
||||
return (cb()->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
|
||||
return (cb()->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord;
|
||||
}
|
||||
|
||||
inline void frame::interpreted_frame_oop_map(InterpreterOopMap* mask) const {
|
||||
@@ -419,10 +416,9 @@ inline frame frame::sender_for_compiled_frame(RegisterMap* map) const {
|
||||
: sender_sp();
|
||||
assert(!_sp_is_trusted || l_sender_sp == real_fp(), "");
|
||||
|
||||
// The return_address is always the word on the stack.
|
||||
// For ROP protection, C1/C2 will have signed the sender_pc,
|
||||
// but there is no requirement to authenticate it here.
|
||||
address sender_pc = pauth_strip_verifiable((address) *(l_sender_sp - 1));
|
||||
// the return_address is always the word on the stack
|
||||
// For ROP protection, C1/C2 will have signed the sender_pc, but there is no requirement to authenticate it here.
|
||||
address sender_pc = pauth_strip_verifiable((address) *(l_sender_sp-1), (address) *(l_sender_sp-2));
|
||||
|
||||
intptr_t** saved_fp_addr = (intptr_t**) (l_sender_sp - frame::sender_sp_offset);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
// Default value if probing is not implemented for a certain platform
|
||||
// Max address bit is restricted by implicit assumptions in the code, for instance
|
||||
// the bit layout of ZForwardingEntry or Partial array entry (see ZMarkStackEntry) in mark stack
|
||||
// the bit layout of XForwardingEntry or Partial array entry (see XMarkStackEntry) in mark stack
|
||||
static const size_t DEFAULT_MAX_ADDRESS_BIT = 46;
|
||||
// Minimum value returned, if probing fail
|
||||
static const size_t MINIMUM_MAX_ADDRESS_BIT = 36;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -72,6 +72,4 @@ const bool CCallingConventionRequiresIntsAsLongs = false;
|
||||
|
||||
#define USE_POINTERS_TO_REGISTER_IMPL_ARRAY
|
||||
|
||||
#define USE_TRAMPOLINE_STUB_FIX_OWNER
|
||||
|
||||
#endif // CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP
|
||||
|
||||
@@ -1197,110 +1197,6 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
|
||||
}
|
||||
}
|
||||
|
||||
// Look up the method for a megamorphic invokeinterface call in a single pass over itable:
|
||||
// - check recv_klass (actual object class) is a subtype of resolved_klass from CompiledICHolder
|
||||
// - find a holder_klass (class that implements the method) vtable offset and get the method from vtable by index
|
||||
// The target method is determined by <holder_klass, itable_index>.
|
||||
// The receiver klass is in recv_klass.
|
||||
// On success, the result will be in method_result, and execution falls through.
|
||||
// On failure, execution transfers to the given label.
|
||||
void MacroAssembler::lookup_interface_method_stub(Register recv_klass,
|
||||
Register holder_klass,
|
||||
Register resolved_klass,
|
||||
Register method_result,
|
||||
Register temp_itbl_klass,
|
||||
Register scan_temp,
|
||||
int itable_index,
|
||||
Label& L_no_such_interface) {
|
||||
// 'method_result' is only used as output register at the very end of this method.
|
||||
// Until then we can reuse it as 'holder_offset'.
|
||||
Register holder_offset = method_result;
|
||||
assert_different_registers(resolved_klass, recv_klass, holder_klass, temp_itbl_klass, scan_temp, holder_offset);
|
||||
|
||||
int vtable_start_offset = in_bytes(Klass::vtable_start_offset());
|
||||
int itable_offset_entry_size = itableOffsetEntry::size() * wordSize;
|
||||
int ioffset = in_bytes(itableOffsetEntry::interface_offset());
|
||||
int ooffset = in_bytes(itableOffsetEntry::offset_offset());
|
||||
|
||||
Label L_loop_search_resolved_entry, L_resolved_found, L_holder_found;
|
||||
|
||||
ldrw(scan_temp, Address(recv_klass, Klass::vtable_length_offset()));
|
||||
add(recv_klass, recv_klass, vtable_start_offset + ioffset);
|
||||
// itableOffsetEntry[] itable = recv_klass + Klass::vtable_start_offset() + sizeof(vtableEntry) * recv_klass->_vtable_len;
|
||||
// temp_itbl_klass = itable[0]._interface;
|
||||
int vtblEntrySize = vtableEntry::size_in_bytes();
|
||||
assert(vtblEntrySize == wordSize, "ldr lsl shift amount must be 3");
|
||||
ldr(temp_itbl_klass, Address(recv_klass, scan_temp, Address::lsl(exact_log2(vtblEntrySize))));
|
||||
mov(holder_offset, zr);
|
||||
// scan_temp = &(itable[0]._interface)
|
||||
lea(scan_temp, Address(recv_klass, scan_temp, Address::lsl(exact_log2(vtblEntrySize))));
|
||||
|
||||
// Initial checks:
|
||||
// - if (holder_klass != resolved_klass), go to "scan for resolved"
|
||||
// - if (itable[0] == holder_klass), shortcut to "holder found"
|
||||
// - if (itable[0] == 0), no such interface
|
||||
cmp(resolved_klass, holder_klass);
|
||||
br(Assembler::NE, L_loop_search_resolved_entry);
|
||||
cmp(holder_klass, temp_itbl_klass);
|
||||
br(Assembler::EQ, L_holder_found);
|
||||
cbz(temp_itbl_klass, L_no_such_interface);
|
||||
|
||||
// Loop: Look for holder_klass record in itable
|
||||
// do {
|
||||
// temp_itbl_klass = *(scan_temp += itable_offset_entry_size);
|
||||
// if (temp_itbl_klass == holder_klass) {
|
||||
// goto L_holder_found; // Found!
|
||||
// }
|
||||
// } while (temp_itbl_klass != 0);
|
||||
// goto L_no_such_interface // Not found.
|
||||
Label L_search_holder;
|
||||
bind(L_search_holder);
|
||||
ldr(temp_itbl_klass, Address(pre(scan_temp, itable_offset_entry_size)));
|
||||
cmp(holder_klass, temp_itbl_klass);
|
||||
br(Assembler::EQ, L_holder_found);
|
||||
cbnz(temp_itbl_klass, L_search_holder);
|
||||
|
||||
b(L_no_such_interface);
|
||||
|
||||
// Loop: Look for resolved_class record in itable
|
||||
// while (true) {
|
||||
// temp_itbl_klass = *(scan_temp += itable_offset_entry_size);
|
||||
// if (temp_itbl_klass == 0) {
|
||||
// goto L_no_such_interface;
|
||||
// }
|
||||
// if (temp_itbl_klass == resolved_klass) {
|
||||
// goto L_resolved_found; // Found!
|
||||
// }
|
||||
// if (temp_itbl_klass == holder_klass) {
|
||||
// holder_offset = scan_temp;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
Label L_loop_search_resolved;
|
||||
bind(L_loop_search_resolved);
|
||||
ldr(temp_itbl_klass, Address(pre(scan_temp, itable_offset_entry_size)));
|
||||
bind(L_loop_search_resolved_entry);
|
||||
cbz(temp_itbl_klass, L_no_such_interface);
|
||||
cmp(resolved_klass, temp_itbl_klass);
|
||||
br(Assembler::EQ, L_resolved_found);
|
||||
cmp(holder_klass, temp_itbl_klass);
|
||||
br(Assembler::NE, L_loop_search_resolved);
|
||||
mov(holder_offset, scan_temp);
|
||||
b(L_loop_search_resolved);
|
||||
|
||||
// See if we already have a holder klass. If not, go and scan for it.
|
||||
bind(L_resolved_found);
|
||||
cbz(holder_offset, L_search_holder);
|
||||
mov(scan_temp, holder_offset);
|
||||
|
||||
// Finally, scan_temp contains holder_klass vtable offset
|
||||
bind(L_holder_found);
|
||||
ldrw(method_result, Address(scan_temp, ooffset - ioffset));
|
||||
add(recv_klass, recv_klass, itable_index * wordSize + in_bytes(itableMethodEntry::method_offset())
|
||||
- vtable_start_offset - ioffset); // substract offsets to restore the original value of recv_klass
|
||||
ldr(method_result, Address(recv_klass, method_result, Address::uxtw(0)));
|
||||
}
|
||||
|
||||
// virtual method calling
|
||||
void MacroAssembler::lookup_virtual_method(Register recv_klass,
|
||||
RegisterOrConstant vtable_index,
|
||||
@@ -1508,7 +1404,11 @@ void MacroAssembler::check_klass_subtype_slow_path(Register sub_klass,
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
incrementw(ExternalAddress((address)&SharedRuntime::_partial_subtype_ctr));
|
||||
mov(rscratch2, (address)&SharedRuntime::_partial_subtype_ctr);
|
||||
Address pst_counter_addr(rscratch2);
|
||||
ldr(rscratch1, pst_counter_addr);
|
||||
add(rscratch1, rscratch1, 1);
|
||||
str(rscratch1, pst_counter_addr);
|
||||
#endif //PRODUCT
|
||||
|
||||
// We will consult the secondary-super array.
|
||||
@@ -4435,23 +4335,6 @@ void MacroAssembler::load_klass(Register dst, Register src) {
|
||||
}
|
||||
}
|
||||
|
||||
void MacroAssembler::restore_cpu_control_state_after_jni(Register tmp1, Register tmp2) {
|
||||
if (RestoreMXCSROnJNICalls) {
|
||||
Label OK;
|
||||
get_fpcr(tmp1);
|
||||
mov(tmp2, tmp1);
|
||||
// Set FPCR to the state we need. We do want Round to Nearest. We
|
||||
// don't want non-IEEE rounding modes or floating-point traps.
|
||||
bfi(tmp1, zr, 22, 4); // Clear DN, FZ, and Rmode
|
||||
bfi(tmp1, zr, 8, 5); // Clear exception-control bits (8-12)
|
||||
bfi(tmp1, zr, 0, 2); // Clear AH:FIZ
|
||||
eor(tmp2, tmp1, tmp2);
|
||||
cbz(tmp2, OK); // Only reset FPCR if it's wrong
|
||||
set_fpcr(tmp1);
|
||||
bind(OK);
|
||||
}
|
||||
}
|
||||
|
||||
// ((OopHandle)result).resolve();
|
||||
void MacroAssembler::resolve_oop_handle(Register result, Register tmp1, Register tmp2) {
|
||||
// OopHandle::resolve is an indirection.
|
||||
@@ -6095,43 +5978,51 @@ void MacroAssembler::leave() {
|
||||
// For more details on PAC see pauth_aarch64.hpp.
|
||||
|
||||
// Sign the LR. Use during construction of a stack frame, before storing the LR to memory.
|
||||
// Uses value zero as the modifier.
|
||||
// Uses the FP as the modifier.
|
||||
//
|
||||
void MacroAssembler::protect_return_address() {
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
check_return_address();
|
||||
paciaz();
|
||||
// The standard convention for C code is to use paciasp, which uses SP as the modifier. This
|
||||
// works because in C code, FP and SP match on function entry. In the JDK, SP and FP may not
|
||||
// match, so instead explicitly use the FP.
|
||||
pacia(lr, rfp);
|
||||
}
|
||||
}
|
||||
|
||||
// Sign the return value in the given register. Use before updating the LR in the existing stack
|
||||
// frame for the current function.
|
||||
// Uses value zero as the modifier.
|
||||
// Uses the FP from the start of the function as the modifier - which is stored at the address of
|
||||
// the current FP.
|
||||
//
|
||||
void MacroAssembler::protect_return_address(Register return_reg) {
|
||||
void MacroAssembler::protect_return_address(Register return_reg, Register temp_reg) {
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
assert(PreserveFramePointer, "PreserveFramePointer must be set for ROP protection");
|
||||
check_return_address(return_reg);
|
||||
paciza(return_reg);
|
||||
ldr(temp_reg, Address(rfp));
|
||||
pacia(return_reg, temp_reg);
|
||||
}
|
||||
}
|
||||
|
||||
// Authenticate the LR. Use before function return, after restoring FP and loading LR from memory.
|
||||
// Uses value zero as the modifier.
|
||||
//
|
||||
void MacroAssembler::authenticate_return_address() {
|
||||
void MacroAssembler::authenticate_return_address(Register return_reg) {
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
autiaz();
|
||||
check_return_address();
|
||||
autia(return_reg, rfp);
|
||||
check_return_address(return_reg);
|
||||
}
|
||||
}
|
||||
|
||||
// Authenticate the return value in the given register. Use before updating the LR in the existing
|
||||
// stack frame for the current function.
|
||||
// Uses value zero as the modifier.
|
||||
// Uses the FP from the start of the function as the modifier - which is stored at the address of
|
||||
// the current FP.
|
||||
//
|
||||
void MacroAssembler::authenticate_return_address(Register return_reg) {
|
||||
void MacroAssembler::authenticate_return_address(Register return_reg, Register temp_reg) {
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
autiza(return_reg);
|
||||
assert(PreserveFramePointer, "PreserveFramePointer must be set for ROP protection");
|
||||
ldr(temp_reg, Address(rfp));
|
||||
autia(return_reg, temp_reg);
|
||||
check_return_address(return_reg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,19 +570,6 @@ public:
|
||||
msr(0b011, 0b0100, 0b0100, 0b001, zr);
|
||||
}
|
||||
|
||||
// FPCR : op1 == 011
|
||||
// CRn == 0100
|
||||
// CRm == 0100
|
||||
// op2 == 000
|
||||
|
||||
inline void get_fpcr(Register reg) {
|
||||
mrs(0b11, 0b0100, 0b0100, 0b000, reg);
|
||||
}
|
||||
|
||||
inline void set_fpcr(Register reg) {
|
||||
msr(0b011, 0b0100, 0b0100, 0b000, reg);
|
||||
}
|
||||
|
||||
// DCZID_EL0: op1 == 011
|
||||
// CRn == 0000
|
||||
// CRm == 0000
|
||||
@@ -729,9 +716,9 @@ public:
|
||||
|
||||
// ROP Protection
|
||||
void protect_return_address();
|
||||
void protect_return_address(Register return_reg);
|
||||
void authenticate_return_address();
|
||||
void authenticate_return_address(Register return_reg);
|
||||
void protect_return_address(Register return_reg, Register temp_reg);
|
||||
void authenticate_return_address(Register return_reg = lr);
|
||||
void authenticate_return_address(Register return_reg, Register temp_reg);
|
||||
void strip_return_address();
|
||||
void check_return_address(Register return_reg=lr) PRODUCT_RETURN;
|
||||
|
||||
@@ -955,15 +942,6 @@ public:
|
||||
Label& no_such_interface,
|
||||
bool return_method = true);
|
||||
|
||||
void lookup_interface_method_stub(Register recv_klass,
|
||||
Register holder_klass,
|
||||
Register resolved_klass,
|
||||
Register method_result,
|
||||
Register temp_reg,
|
||||
Register temp_reg2,
|
||||
int itable_index,
|
||||
Label& L_no_such_interface);
|
||||
|
||||
// virtual method calling
|
||||
// n.b. x86 allows RegisterOrConstant for vtable_index
|
||||
void lookup_virtual_method(Register recv_klass,
|
||||
@@ -1046,8 +1024,8 @@ public:
|
||||
#define verify_method_ptr(reg) _verify_method_ptr(reg, "broken method " #reg, __FILE__, __LINE__)
|
||||
#define verify_klass_ptr(reg) _verify_klass_ptr(reg, "broken klass " #reg, __FILE__, __LINE__)
|
||||
|
||||
// Restore cpu control state after JNI call
|
||||
void restore_cpu_control_state_after_jni(Register tmp1, Register tmp2);
|
||||
// only if +VerifyFPU
|
||||
void verify_FPU(int stack_depth, const char* s = "illegal FPU state");
|
||||
|
||||
// prints msg, dumps registers and stops execution
|
||||
void stop(const char* msg);
|
||||
@@ -1398,24 +1376,6 @@ public:
|
||||
address arrays_equals(Register a1, Register a2, Register result, Register cnt1,
|
||||
Register tmp1, Register tmp2, Register tmp3, int elem_size);
|
||||
|
||||
// Ensure that the inline code and the stub use the same registers.
|
||||
#define ARRAYS_HASHCODE_REGISTERS \
|
||||
do { \
|
||||
assert(result == r0 && \
|
||||
ary == r1 && \
|
||||
cnt == r2 && \
|
||||
vdata0 == v3 && \
|
||||
vdata1 == v2 && \
|
||||
vdata2 == v1 && \
|
||||
vdata3 == v0 && \
|
||||
vmul0 == v4 && \
|
||||
vmul1 == v5 && \
|
||||
vmul2 == v6 && \
|
||||
vmul3 == v7 && \
|
||||
vpow == v12 && \
|
||||
vpowm == v13, "registers must match aarch64.ad"); \
|
||||
} while (0)
|
||||
|
||||
void string_equals(Register a1, Register a2, Register result, Register cnt1,
|
||||
int elem_size);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -27,7 +27,6 @@
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "classfile/javaClasses.inline.hpp"
|
||||
#include "classfile/vmClasses.hpp"
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "interpreter/interpreter.hpp"
|
||||
#include "interpreter/interpreterRuntime.hpp"
|
||||
#include "memory/allocation.inline.hpp"
|
||||
@@ -37,7 +36,7 @@
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
|
||||
#define __ Disassembler::hook<MacroAssembler>(__FILE__, __LINE__, _masm)->
|
||||
#define __ _masm->
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) /* nothing */
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "code/codeCache.hpp"
|
||||
#include "code/compiledIC.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
#include "nativeInst_aarch64.hpp"
|
||||
#include "oops/oop.inline.hpp"
|
||||
#include "runtime/handles.hpp"
|
||||
@@ -158,18 +159,13 @@ void NativeGotJump::verify() const {
|
||||
}
|
||||
|
||||
address NativeCall::destination() const {
|
||||
address addr = instruction_address();
|
||||
address destination = addr + displacement();
|
||||
|
||||
// Performance optimization: no need to call find_blob() if it is a self-call
|
||||
if (destination == addr) {
|
||||
return destination;
|
||||
}
|
||||
address addr = (address)this;
|
||||
address destination = instruction_address() + displacement();
|
||||
|
||||
// Do we use a trampoline stub for this call?
|
||||
CodeBlob* cb = CodeCache::find_blob(addr);
|
||||
assert(cb != nullptr && cb->is_nmethod(), "nmethod expected");
|
||||
nmethod *nm = cb->as_nmethod();
|
||||
assert(cb && cb->is_nmethod(), "sanity");
|
||||
nmethod *nm = (nmethod *)cb;
|
||||
if (nm->stub_contains(destination) && is_NativeCallTrampolineStub_at(destination)) {
|
||||
// Yes we do, so get the destination from the trampoline stub.
|
||||
const address trampoline_stub_addr = destination;
|
||||
@@ -184,11 +180,17 @@ address NativeCall::destination() const {
|
||||
// call instruction at all times.
|
||||
//
|
||||
// Used in the runtime linkage of calls; see class CompiledIC.
|
||||
void NativeCall::set_destination_mt_safe(address dest) {
|
||||
assert((CodeCache_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
|
||||
//
|
||||
// Add parameter assert_lock to switch off assertion
|
||||
// during code generation, where no patching lock is needed.
|
||||
void NativeCall::set_destination_mt_safe(address dest, bool assert_lock) {
|
||||
assert(!assert_lock ||
|
||||
(Patching_lock->is_locked() || SafepointSynchronize::is_at_safepoint()) ||
|
||||
CompiledICLocker::is_safe(addr_at(0)),
|
||||
"concurrent code patching");
|
||||
|
||||
ResourceMark rm;
|
||||
int code_size = NativeInstruction::instruction_size;
|
||||
address addr_call = addr_at(0);
|
||||
bool reachable = Assembler::reachable_from_branch_at(addr_call, dest);
|
||||
assert(NativeCall::is_call_at(addr_call), "unexpected code at call site");
|
||||
@@ -212,18 +214,22 @@ void NativeCall::set_destination_mt_safe(address dest) {
|
||||
}
|
||||
|
||||
address NativeCall::get_trampoline() {
|
||||
address call_addr = instruction_address();
|
||||
address call_addr = addr_at(0);
|
||||
|
||||
CodeBlob *code = CodeCache::find_blob(call_addr);
|
||||
assert(code != nullptr && code->is_nmethod(), "nmethod expected");
|
||||
nmethod* nm = code->as_nmethod();
|
||||
assert(code != nullptr, "Could not find the containing code blob");
|
||||
|
||||
address bl_destination = call_addr + displacement();
|
||||
if (nm->stub_contains(bl_destination) &&
|
||||
address bl_destination
|
||||
= MacroAssembler::pd_call_destination(call_addr);
|
||||
if (code->contains(bl_destination) &&
|
||||
is_NativeCallTrampolineStub_at(bl_destination))
|
||||
return bl_destination;
|
||||
|
||||
return trampoline_stub_Relocation::get_trampoline_for(call_addr, nm);
|
||||
if (code->is_nmethod()) {
|
||||
return trampoline_stub_Relocation::get_trampoline_for(call_addr, (nmethod*)code);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Inserts a native call instruction at a given pc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -212,7 +212,6 @@ public:
|
||||
int displacement() const { return (int_at(displacement_offset) << 6) >> 4; }
|
||||
address displacement_address() const { return addr_at(displacement_offset); }
|
||||
address return_address() const { return addr_at(return_address_offset); }
|
||||
address raw_destination() const { return instruction_address() + displacement(); }
|
||||
address destination() const;
|
||||
|
||||
void set_destination(address dest) {
|
||||
@@ -252,7 +251,9 @@ public:
|
||||
//
|
||||
// Used in the runtime linkage of calls; see class CompiledIC.
|
||||
// (Cf. 4506997 and 4479829, where threads witnessed garbage displacements.)
|
||||
void set_destination_mt_safe(address dest);
|
||||
|
||||
// The parameter assert_lock disables the assertion during code generation.
|
||||
void set_destination_mt_safe(address dest, bool assert_lock = true);
|
||||
|
||||
address get_trampoline();
|
||||
#if INCLUDE_JVMCI
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021, 2023, Arm Limited. All rights reserved.
|
||||
* Copyright (c) 2021, 2022, Arm Limited. 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
|
||||
@@ -77,9 +77,9 @@ inline bool pauth_ptr_is_raw(address ptr) {
|
||||
// Strip a return value (same as pauth_strip_pointer). When debug is enabled then authenticate
|
||||
// instead.
|
||||
//
|
||||
inline address pauth_strip_verifiable(address ret_addr) {
|
||||
inline address pauth_strip_verifiable(address ret_addr, address modifier) {
|
||||
if (VM_Version::use_rop_protection()) {
|
||||
DEBUG_ONLY(ret_addr = pauth_authenticate_return_address(ret_addr);)
|
||||
DEBUG_ONLY(ret_addr = pauth_authenticate_return_address(ret_addr, modifier);)
|
||||
NOT_DEBUG(ret_addr = pauth_strip_pointer(ret_addr));
|
||||
}
|
||||
return ret_addr;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2021, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -52,7 +52,7 @@ class Register {
|
||||
|
||||
public:
|
||||
// accessors
|
||||
constexpr int raw_encoding() const { return checked_cast<int>(this - first()); }
|
||||
constexpr int raw_encoding() const { return this - first(); }
|
||||
constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
|
||||
constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
|
||||
|
||||
@@ -165,13 +165,7 @@ class FloatRegister {
|
||||
max_slots_per_register = 4,
|
||||
save_slots_per_register = 2,
|
||||
slots_per_neon_register = 4,
|
||||
extra_save_slots_per_neon_register = slots_per_neon_register - save_slots_per_register,
|
||||
neon_vl = 16,
|
||||
// VLmax: The maximum sve vector length is determined by the hardware
|
||||
// sve_vl_min <= VLmax <= sve_vl_max.
|
||||
sve_vl_min = 16,
|
||||
// Maximum supported vector length across all CPUs
|
||||
sve_vl_max = 256
|
||||
extra_save_slots_per_neon_register = slots_per_neon_register - save_slots_per_register
|
||||
};
|
||||
|
||||
class FloatRegisterImpl: public AbstractRegisterImpl {
|
||||
@@ -181,7 +175,7 @@ class FloatRegister {
|
||||
|
||||
public:
|
||||
// accessors
|
||||
constexpr int raw_encoding() const { return checked_cast<int>(this - first()); }
|
||||
constexpr int raw_encoding() const { return this - first(); }
|
||||
constexpr int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
|
||||
constexpr bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
|
||||
|
||||
@@ -314,7 +308,7 @@ public:
|
||||
|
||||
public:
|
||||
// accessors
|
||||
int raw_encoding() const { return checked_cast<int>(this - first()); }
|
||||
int raw_encoding() const { return this - first(); }
|
||||
int encoding() const { assert(is_valid(), "invalid register"); return raw_encoding(); }
|
||||
bool is_valid() const { return 0 <= raw_encoding() && raw_encoding() < number_of_registers; }
|
||||
bool is_governing() const { return 0 <= raw_encoding() && raw_encoding() < number_of_governing_registers; }
|
||||
|
||||
@@ -60,12 +60,13 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
|
||||
|
||||
address Relocation::pd_call_destination(address orig_addr) {
|
||||
assert(is_call(), "should be a call here");
|
||||
if (orig_addr == nullptr) {
|
||||
if (NativeCall::is_call_at(addr())) {
|
||||
NativeCall* call = nativeCall_at(addr());
|
||||
return call->destination();
|
||||
if (NativeCall::is_call_at(addr())) {
|
||||
address trampoline = nativeCall_at(addr())->get_trampoline();
|
||||
if (trampoline) {
|
||||
return nativeCallTrampolineStub_at(trampoline)->destination();
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if (orig_addr != nullptr) {
|
||||
address new_addr = MacroAssembler::pd_call_destination(orig_addr);
|
||||
// If call is branch to self, don't try to relocate it, just leave it
|
||||
// as branch to self. This happens during code generation if the code
|
||||
@@ -81,26 +82,16 @@ address Relocation::pd_call_destination(address orig_addr) {
|
||||
void Relocation::pd_set_call_destination(address x) {
|
||||
assert(is_call(), "should be a call here");
|
||||
if (NativeCall::is_call_at(addr())) {
|
||||
NativeCall* call = nativeCall_at(addr());
|
||||
call->set_destination(x);
|
||||
} else {
|
||||
MacroAssembler::pd_patch_instruction(addr(), x);
|
||||
address trampoline = nativeCall_at(addr())->get_trampoline();
|
||||
if (trampoline) {
|
||||
nativeCall_at(addr())->set_destination_mt_safe(x, /* assert_lock */false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
MacroAssembler::pd_patch_instruction(addr(), x);
|
||||
assert(pd_call_destination(addr()) == x, "fail in reloc");
|
||||
}
|
||||
|
||||
void trampoline_stub_Relocation::pd_fix_owner_after_move() {
|
||||
NativeCall* call = nativeCall_at(owner());
|
||||
assert(call->raw_destination() == owner(), "destination should be empty");
|
||||
address trampoline = addr();
|
||||
address dest = nativeCallTrampolineStub_at(trampoline)->destination();
|
||||
if (!Assembler::reachable_from_branch_at(owner(), dest)) {
|
||||
dest = trampoline;
|
||||
}
|
||||
call->set_destination(dest);
|
||||
}
|
||||
|
||||
|
||||
address* Relocation::pd_address_in_code() {
|
||||
return (address*)(addr() + 8);
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ static void patch_callers_callsite(MacroAssembler *masm) {
|
||||
|
||||
__ mov(c_rarg0, rmethod);
|
||||
__ mov(c_rarg1, lr);
|
||||
__ authenticate_return_address(c_rarg1);
|
||||
__ authenticate_return_address(c_rarg1, rscratch1);
|
||||
__ lea(rscratch1, RuntimeAddress(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite)));
|
||||
__ blr(rscratch1);
|
||||
|
||||
@@ -1171,7 +1171,6 @@ static void gen_continuation_enter(MacroAssembler* masm,
|
||||
continuation_enter_cleanup(masm);
|
||||
|
||||
__ ldr(c_rarg1, Address(rfp, wordSize)); // return address
|
||||
__ authenticate_return_address(c_rarg1);
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), rthread, c_rarg1);
|
||||
|
||||
// see OptoRuntime::generate_exception_blob: r0 -- exception oop, r3 -- exception pc
|
||||
@@ -1845,9 +1844,6 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
|
||||
intptr_t return_pc = (intptr_t) __ pc();
|
||||
oop_maps->add_gc_map(return_pc - start, map);
|
||||
|
||||
// Verify or restore cpu control state after JNI call
|
||||
__ restore_cpu_control_state_after_jni(rscratch1, rscratch2);
|
||||
|
||||
// Unpack native results.
|
||||
switch (ret_type) {
|
||||
case T_BOOLEAN: __ c2bool(r0); break;
|
||||
@@ -2341,7 +2337,7 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
// load throwing pc from JavaThread and patch it as the return address
|
||||
// of the current frame. Then clear the field in JavaThread
|
||||
__ ldr(r3, Address(rthread, JavaThread::exception_pc_offset()));
|
||||
__ protect_return_address(r3);
|
||||
__ protect_return_address(r3, rscratch1);
|
||||
__ str(r3, Address(rfp, wordSize));
|
||||
__ str(zr, Address(rthread, JavaThread::exception_pc_offset()));
|
||||
|
||||
@@ -2447,7 +2443,9 @@ void SharedRuntime::generate_deopt_blob() {
|
||||
__ ldrw(r2, Address(r5, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset()));
|
||||
__ sub(r2, r2, 2 * wordSize);
|
||||
__ add(sp, sp, r2);
|
||||
__ ldp(rfp, zr, __ post(sp, 2 * wordSize));
|
||||
__ ldp(rfp, lr, __ post(sp, 2 * wordSize));
|
||||
__ authenticate_return_address();
|
||||
// LR should now be the return address to the caller (3)
|
||||
|
||||
#ifdef ASSERT
|
||||
// Compilers generate code that bang the stack by as much as the
|
||||
@@ -2662,7 +2660,9 @@ void SharedRuntime::generate_uncommon_trap_blob() {
|
||||
size_of_deoptimized_frame_offset()));
|
||||
__ sub(r2, r2, 2 * wordSize);
|
||||
__ add(sp, sp, r2);
|
||||
__ ldp(rfp, zr, __ post(sp, 2 * wordSize));
|
||||
__ ldp(rfp, lr, __ post(sp, 2 * wordSize));
|
||||
__ authenticate_return_address();
|
||||
// LR should now be the return address to the caller (3) frame
|
||||
|
||||
#ifdef ASSERT
|
||||
// Compilers generate code that bang the stack by as much as the
|
||||
@@ -2808,7 +2808,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
|
||||
// it later to determine if someone changed the return address for
|
||||
// us!
|
||||
__ ldr(r20, Address(rthread, JavaThread::saved_exception_pc_offset()));
|
||||
__ protect_return_address(r20);
|
||||
__ protect_return_address(r20, rscratch1);
|
||||
__ str(r20, Address(rfp, wordSize));
|
||||
}
|
||||
|
||||
@@ -2849,7 +2849,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
|
||||
__ ldr(rscratch1, Address(rfp, wordSize));
|
||||
__ cmp(r20, rscratch1);
|
||||
__ br(Assembler::NE, no_adjust);
|
||||
__ authenticate_return_address(r20);
|
||||
__ authenticate_return_address(r20, rscratch1);
|
||||
|
||||
#ifdef ASSERT
|
||||
// Verify the correct encoding of the poll we're about to skip.
|
||||
@@ -2864,7 +2864,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_t
|
||||
#endif
|
||||
// Adjust return pc forward to step over the safepoint poll instruction
|
||||
__ add(r20, r20, NativeInstruction::instruction_size);
|
||||
__ protect_return_address(r20);
|
||||
__ protect_return_address(r20, rscratch1);
|
||||
__ str(r20, Address(rfp, wordSize));
|
||||
}
|
||||
|
||||
|
||||
@@ -30,15 +30,8 @@
|
||||
|
||||
// Java frames don't have callee saved registers (except for rfp), so we can use a smaller RegisterMap
|
||||
class SmallRegisterMap {
|
||||
constexpr SmallRegisterMap() = default;
|
||||
~SmallRegisterMap() = default;
|
||||
NONCOPYABLE(SmallRegisterMap);
|
||||
|
||||
public:
|
||||
static const SmallRegisterMap* instance() {
|
||||
static constexpr SmallRegisterMap the_instance{};
|
||||
return &the_instance;
|
||||
}
|
||||
static constexpr SmallRegisterMap* instance = nullptr;
|
||||
private:
|
||||
static void assert_is_rfp(VMReg r) NOT_DEBUG_RETURN
|
||||
DEBUG_ONLY({ assert (r == rfp->as_VMReg() || r == rfp->as_VMReg()->next(), "Reg: %s", r->name()); })
|
||||
@@ -55,6 +48,17 @@ public:
|
||||
return map;
|
||||
}
|
||||
|
||||
SmallRegisterMap() {}
|
||||
|
||||
SmallRegisterMap(const RegisterMap* map) {
|
||||
#ifdef ASSERT
|
||||
for(int i = 0; i < RegisterMap::reg_count; i++) {
|
||||
VMReg r = VMRegImpl::as_VMReg(i);
|
||||
if (map->location(r, (intptr_t*)nullptr) != nullptr) assert_is_rfp(r);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
inline address location(VMReg reg, intptr_t* sp) const {
|
||||
assert_is_rfp(reg);
|
||||
return (address)(sp - frame::sender_sp_offset);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2019, 2022, 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,7 +26,6 @@
|
||||
#define CPU_AARCH64_STACKCHUNKFRAMESTREAM_AARCH64_INLINE_HPP
|
||||
|
||||
#include "interpreter/oopMapCache.hpp"
|
||||
#include "pauth_aarch64.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/registerMap.hpp"
|
||||
|
||||
@@ -35,7 +34,7 @@ template <ChunkFrames frame_kind>
|
||||
inline bool StackChunkFrameStream<frame_kind>::is_in_frame(void* p0) const {
|
||||
assert(!is_done(), "");
|
||||
intptr_t* p = (intptr_t*)p0;
|
||||
int argsize = is_compiled() ? (_cb->as_nmethod()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0;
|
||||
int argsize = is_compiled() ? (_cb->as_compiled_method()->method()->num_stack_arg_slots() * VMRegImpl::stack_slot_size) >> LogBytesPerWord : 0;
|
||||
int frame_size = _cb->frame_size() + argsize;
|
||||
return p == sp() - frame::sender_sp_offset || ((p - unextended_sp()) >= 0 && (p - unextended_sp()) < frame_size);
|
||||
}
|
||||
@@ -53,8 +52,7 @@ inline frame StackChunkFrameStream<frame_kind>::to_frame() const {
|
||||
template <ChunkFrames frame_kind>
|
||||
inline address StackChunkFrameStream<frame_kind>::get_pc() const {
|
||||
assert(!is_done(), "");
|
||||
// Just strip it for frames on the heap.
|
||||
return pauth_strip_pointer(*(address*)(_sp - 1));
|
||||
return *(address*)(_sp - 1);
|
||||
}
|
||||
|
||||
template <ChunkFrames frame_kind>
|
||||
@@ -116,8 +114,8 @@ inline int StackChunkFrameStream<frame_kind>::interpreter_frame_num_oops() const
|
||||
f.interpreted_frame_oop_map(&mask);
|
||||
return mask.num_oops()
|
||||
+ 1 // for the mirror oop
|
||||
+ pointer_delta_as_int((intptr_t*)f.interpreter_frame_monitor_begin(),
|
||||
(intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
|
||||
+ ((intptr_t*)f.interpreter_frame_monitor_begin()
|
||||
- (intptr_t*)f.interpreter_frame_monitor_end())/BasicObjectLock::size();
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -51,9 +51,7 @@
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/intpow.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
@@ -86,7 +84,10 @@ class StubGenerator: public StubCodeGenerator {
|
||||
#define inc_counter_np(counter) ((void)0)
|
||||
#else
|
||||
void inc_counter_np_(int& counter) {
|
||||
__ incrementw(ExternalAddress((address)&counter));
|
||||
__ lea(rscratch2, ExternalAddress((address)&counter));
|
||||
__ ldrw(rscratch1, Address(rscratch2));
|
||||
__ addw(rscratch1, rscratch1, 1);
|
||||
__ strw(rscratch1, Address(rscratch2));
|
||||
}
|
||||
#define inc_counter_np(counter) \
|
||||
BLOCK_COMMENT("inc_counter " #counter); \
|
||||
@@ -138,8 +139,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// [ return_from_Java ] <--- sp
|
||||
// [ argument word n ]
|
||||
// ...
|
||||
// -29 [ argument word 1 ]
|
||||
// -28 [ saved Floating-point Control Register ]
|
||||
// -27 [ argument word 1 ]
|
||||
// -26 [ saved v15 ] <--- sp_after_call
|
||||
// -25 [ saved v14 ]
|
||||
// -24 [ saved v13 ]
|
||||
@@ -171,9 +171,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
// Call stub stack layout word offsets from fp
|
||||
enum call_stub_layout {
|
||||
sp_after_call_off = -28,
|
||||
sp_after_call_off = -26,
|
||||
|
||||
fpcr_off = sp_after_call_off,
|
||||
d15_off = -26,
|
||||
d13_off = -24,
|
||||
d11_off = -22,
|
||||
@@ -203,9 +202,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubCodeMark mark(this, "StubRoutines", "call_stub");
|
||||
address start = __ pc();
|
||||
|
||||
const Address sp_after_call (rfp, sp_after_call_off * wordSize);
|
||||
const Address sp_after_call(rfp, sp_after_call_off * wordSize);
|
||||
|
||||
const Address fpcr_save (rfp, fpcr_off * wordSize);
|
||||
const Address call_wrapper (rfp, call_wrapper_off * wordSize);
|
||||
const Address result (rfp, result_off * wordSize);
|
||||
const Address result_type (rfp, result_type_off * wordSize);
|
||||
@@ -254,14 +252,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ stpd(v13, v12, d13_save);
|
||||
__ stpd(v15, v14, d15_save);
|
||||
|
||||
__ get_fpcr(rscratch1);
|
||||
__ str(rscratch1, fpcr_save);
|
||||
// Set FPCR to the state we need. We do want Round to Nearest. We
|
||||
// don't want non-IEEE rounding modes or floating-point traps.
|
||||
__ bfi(rscratch1, zr, 22, 4); // Clear DN, FZ, and Rmode
|
||||
__ bfi(rscratch1, zr, 8, 5); // Clear exception-control bits (8-12)
|
||||
__ set_fpcr(rscratch1);
|
||||
|
||||
// install Java thread in global register now we have saved
|
||||
// whatever value it held
|
||||
__ mov(rthread, c_rarg7);
|
||||
@@ -375,10 +365,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
__ ldp(r22, r21, r22_save);
|
||||
__ ldp(r20, r19, r20_save);
|
||||
|
||||
// restore fpcr
|
||||
__ ldr(rscratch1, fpcr_save);
|
||||
__ set_fpcr(rscratch1);
|
||||
|
||||
__ ldp(c_rarg0, c_rarg1, call_wrapper);
|
||||
__ ldrw(c_rarg2, result_type);
|
||||
__ ldr(c_rarg3, method);
|
||||
@@ -5312,307 +5298,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
return entry;
|
||||
}
|
||||
|
||||
// result = r0 - return value. Contains initial hashcode value on entry.
|
||||
// ary = r1 - array address
|
||||
// cnt = r2 - elements count
|
||||
// Clobbers: v0-v13, rscratch1, rscratch2
|
||||
address generate_large_arrays_hashcode(BasicType eltype) {
|
||||
const Register result = r0, ary = r1, cnt = r2;
|
||||
const FloatRegister vdata0 = v3, vdata1 = v2, vdata2 = v1, vdata3 = v0;
|
||||
const FloatRegister vmul0 = v4, vmul1 = v5, vmul2 = v6, vmul3 = v7;
|
||||
const FloatRegister vpow = v12; // powers of 31: <31^3, ..., 31^0>
|
||||
const FloatRegister vpowm = v13;
|
||||
|
||||
ARRAYS_HASHCODE_REGISTERS;
|
||||
|
||||
Label SMALL_LOOP, LARGE_LOOP_PREHEADER, LARGE_LOOP, TAIL, TAIL_SHORTCUT, BR_BASE;
|
||||
|
||||
unsigned int vf; // vectorization factor
|
||||
bool multiply_by_halves;
|
||||
Assembler::SIMD_Arrangement load_arrangement;
|
||||
switch (eltype) {
|
||||
case T_BOOLEAN:
|
||||
case T_BYTE:
|
||||
load_arrangement = Assembler::T8B;
|
||||
multiply_by_halves = true;
|
||||
vf = 8;
|
||||
break;
|
||||
case T_CHAR:
|
||||
case T_SHORT:
|
||||
load_arrangement = Assembler::T8H;
|
||||
multiply_by_halves = true;
|
||||
vf = 8;
|
||||
break;
|
||||
case T_INT:
|
||||
load_arrangement = Assembler::T4S;
|
||||
multiply_by_halves = false;
|
||||
vf = 4;
|
||||
break;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
// Unroll factor
|
||||
const unsigned uf = 4;
|
||||
|
||||
// Effective vectorization factor
|
||||
const unsigned evf = vf * uf;
|
||||
|
||||
__ align(CodeEntryAlignment);
|
||||
|
||||
const char *mark_name = "";
|
||||
switch (eltype) {
|
||||
case T_BOOLEAN:
|
||||
mark_name = "_large_arrays_hashcode_boolean";
|
||||
break;
|
||||
case T_BYTE:
|
||||
mark_name = "_large_arrays_hashcode_byte";
|
||||
break;
|
||||
case T_CHAR:
|
||||
mark_name = "_large_arrays_hashcode_char";
|
||||
break;
|
||||
case T_SHORT:
|
||||
mark_name = "_large_arrays_hashcode_short";
|
||||
break;
|
||||
case T_INT:
|
||||
mark_name = "_large_arrays_hashcode_int";
|
||||
break;
|
||||
default:
|
||||
mark_name = "_large_arrays_hashcode_incorrect_type";
|
||||
__ should_not_reach_here();
|
||||
};
|
||||
|
||||
StubCodeMark mark(this, "StubRoutines", mark_name);
|
||||
|
||||
address entry = __ pc();
|
||||
__ enter();
|
||||
|
||||
// Put 0-3'th powers of 31 into a single SIMD register together. The register will be used in
|
||||
// the SMALL and LARGE LOOPS' epilogues. The initialization is hoisted here and the register's
|
||||
// value shouldn't change throughout both loops.
|
||||
__ movw(rscratch1, intpow(31U, 3));
|
||||
__ mov(vpow, Assembler::S, 0, rscratch1);
|
||||
__ movw(rscratch1, intpow(31U, 2));
|
||||
__ mov(vpow, Assembler::S, 1, rscratch1);
|
||||
__ movw(rscratch1, intpow(31U, 1));
|
||||
__ mov(vpow, Assembler::S, 2, rscratch1);
|
||||
__ movw(rscratch1, intpow(31U, 0));
|
||||
__ mov(vpow, Assembler::S, 3, rscratch1);
|
||||
|
||||
__ mov(vmul0, Assembler::T16B, 0);
|
||||
__ mov(vmul0, Assembler::S, 3, result);
|
||||
|
||||
__ andr(rscratch2, cnt, (uf - 1) * vf);
|
||||
__ cbz(rscratch2, LARGE_LOOP_PREHEADER);
|
||||
|
||||
__ movw(rscratch1, intpow(31U, multiply_by_halves ? vf / 2 : vf));
|
||||
__ mov(vpowm, Assembler::S, 0, rscratch1);
|
||||
|
||||
// SMALL LOOP
|
||||
__ bind(SMALL_LOOP);
|
||||
|
||||
__ ld1(vdata0, load_arrangement, Address(__ post(ary, vf * type2aelembytes(eltype))));
|
||||
__ mulvs(vmul0, Assembler::T4S, vmul0, vpowm, 0);
|
||||
__ subsw(rscratch2, rscratch2, vf);
|
||||
|
||||
if (load_arrangement == Assembler::T8B) {
|
||||
// Extend 8B to 8H to be able to use vector multiply
|
||||
// instructions
|
||||
assert(load_arrangement == Assembler::T8B, "expected to extend 8B to 8H");
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ sxtl(vdata0, Assembler::T8H, vdata0, load_arrangement);
|
||||
} else {
|
||||
__ uxtl(vdata0, Assembler::T8H, vdata0, load_arrangement);
|
||||
}
|
||||
}
|
||||
|
||||
switch (load_arrangement) {
|
||||
case Assembler::T4S:
|
||||
__ addv(vmul0, load_arrangement, vmul0, vdata0);
|
||||
break;
|
||||
case Assembler::T8B:
|
||||
case Assembler::T8H:
|
||||
assert(is_subword_type(eltype), "subword type expected");
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ saddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
|
||||
} else {
|
||||
__ uaddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
__ should_not_reach_here();
|
||||
}
|
||||
|
||||
// Process the upper half of a vector
|
||||
if (load_arrangement == Assembler::T8B || load_arrangement == Assembler::T8H) {
|
||||
__ mulvs(vmul0, Assembler::T4S, vmul0, vpowm, 0);
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ saddwv2(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T8H);
|
||||
} else {
|
||||
__ uaddwv2(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T8H);
|
||||
}
|
||||
}
|
||||
|
||||
__ br(Assembler::HI, SMALL_LOOP);
|
||||
|
||||
// SMALL LOOP'S EPILOQUE
|
||||
__ lsr(rscratch2, cnt, exact_log2(evf));
|
||||
__ cbnz(rscratch2, LARGE_LOOP_PREHEADER);
|
||||
|
||||
__ mulv(vmul0, Assembler::T4S, vmul0, vpow);
|
||||
__ addv(vmul0, Assembler::T4S, vmul0);
|
||||
__ umov(result, vmul0, Assembler::S, 0);
|
||||
|
||||
// TAIL
|
||||
__ bind(TAIL);
|
||||
|
||||
// The andr performs cnt % vf. The subtract shifted by 3 offsets past vf - 1 - (cnt % vf) pairs
|
||||
// of load + madd insns i.e. it only executes cnt % vf load + madd pairs.
|
||||
assert(is_power_of_2(vf), "can't use this value to calculate the jump target PC");
|
||||
__ andr(rscratch2, cnt, vf - 1);
|
||||
__ bind(TAIL_SHORTCUT);
|
||||
__ adr(rscratch1, BR_BASE);
|
||||
__ sub(rscratch1, rscratch1, rscratch2, ext::uxtw, 3);
|
||||
__ movw(rscratch2, 0x1f);
|
||||
__ br(rscratch1);
|
||||
|
||||
for (size_t i = 0; i < vf - 1; ++i) {
|
||||
__ load(rscratch1, Address(__ post(ary, type2aelembytes(eltype))),
|
||||
eltype);
|
||||
__ maddw(result, result, rscratch2, rscratch1);
|
||||
}
|
||||
__ bind(BR_BASE);
|
||||
|
||||
__ leave();
|
||||
__ ret(lr);
|
||||
|
||||
// LARGE LOOP
|
||||
__ bind(LARGE_LOOP_PREHEADER);
|
||||
|
||||
__ lsr(rscratch2, cnt, exact_log2(evf));
|
||||
|
||||
if (multiply_by_halves) {
|
||||
// 31^4 - multiplier between lower and upper parts of a register
|
||||
__ movw(rscratch1, intpow(31U, vf / 2));
|
||||
__ mov(vpowm, Assembler::S, 1, rscratch1);
|
||||
// 31^28 - remainder of the iteraion multiplier, 28 = 32 - 4
|
||||
__ movw(rscratch1, intpow(31U, evf - vf / 2));
|
||||
__ mov(vpowm, Assembler::S, 0, rscratch1);
|
||||
} else {
|
||||
// 31^16
|
||||
__ movw(rscratch1, intpow(31U, evf));
|
||||
__ mov(vpowm, Assembler::S, 0, rscratch1);
|
||||
}
|
||||
|
||||
__ mov(vmul3, Assembler::T16B, 0);
|
||||
__ mov(vmul2, Assembler::T16B, 0);
|
||||
__ mov(vmul1, Assembler::T16B, 0);
|
||||
|
||||
__ bind(LARGE_LOOP);
|
||||
|
||||
__ mulvs(vmul3, Assembler::T4S, vmul3, vpowm, 0);
|
||||
__ mulvs(vmul2, Assembler::T4S, vmul2, vpowm, 0);
|
||||
__ mulvs(vmul1, Assembler::T4S, vmul1, vpowm, 0);
|
||||
__ mulvs(vmul0, Assembler::T4S, vmul0, vpowm, 0);
|
||||
|
||||
__ ld1(vdata3, vdata2, vdata1, vdata0, load_arrangement,
|
||||
Address(__ post(ary, evf * type2aelembytes(eltype))));
|
||||
|
||||
if (load_arrangement == Assembler::T8B) {
|
||||
// Extend 8B to 8H to be able to use vector multiply
|
||||
// instructions
|
||||
assert(load_arrangement == Assembler::T8B, "expected to extend 8B to 8H");
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ sxtl(vdata3, Assembler::T8H, vdata3, load_arrangement);
|
||||
__ sxtl(vdata2, Assembler::T8H, vdata2, load_arrangement);
|
||||
__ sxtl(vdata1, Assembler::T8H, vdata1, load_arrangement);
|
||||
__ sxtl(vdata0, Assembler::T8H, vdata0, load_arrangement);
|
||||
} else {
|
||||
__ uxtl(vdata3, Assembler::T8H, vdata3, load_arrangement);
|
||||
__ uxtl(vdata2, Assembler::T8H, vdata2, load_arrangement);
|
||||
__ uxtl(vdata1, Assembler::T8H, vdata1, load_arrangement);
|
||||
__ uxtl(vdata0, Assembler::T8H, vdata0, load_arrangement);
|
||||
}
|
||||
}
|
||||
|
||||
switch (load_arrangement) {
|
||||
case Assembler::T4S:
|
||||
__ addv(vmul3, load_arrangement, vmul3, vdata3);
|
||||
__ addv(vmul2, load_arrangement, vmul2, vdata2);
|
||||
__ addv(vmul1, load_arrangement, vmul1, vdata1);
|
||||
__ addv(vmul0, load_arrangement, vmul0, vdata0);
|
||||
break;
|
||||
case Assembler::T8B:
|
||||
case Assembler::T8H:
|
||||
assert(is_subword_type(eltype), "subword type expected");
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ saddwv(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T4H);
|
||||
__ saddwv(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T4H);
|
||||
__ saddwv(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T4H);
|
||||
__ saddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
|
||||
} else {
|
||||
__ uaddwv(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T4H);
|
||||
__ uaddwv(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T4H);
|
||||
__ uaddwv(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T4H);
|
||||
__ uaddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
__ should_not_reach_here();
|
||||
}
|
||||
|
||||
// Process the upper half of a vector
|
||||
if (load_arrangement == Assembler::T8B || load_arrangement == Assembler::T8H) {
|
||||
__ mulvs(vmul3, Assembler::T4S, vmul3, vpowm, 1);
|
||||
__ mulvs(vmul2, Assembler::T4S, vmul2, vpowm, 1);
|
||||
__ mulvs(vmul1, Assembler::T4S, vmul1, vpowm, 1);
|
||||
__ mulvs(vmul0, Assembler::T4S, vmul0, vpowm, 1);
|
||||
if (is_signed_subword_type(eltype)) {
|
||||
__ saddwv2(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T8H);
|
||||
__ saddwv2(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T8H);
|
||||
__ saddwv2(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T8H);
|
||||
__ saddwv2(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T8H);
|
||||
} else {
|
||||
__ uaddwv2(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T8H);
|
||||
__ uaddwv2(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T8H);
|
||||
__ uaddwv2(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T8H);
|
||||
__ uaddwv2(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T8H);
|
||||
}
|
||||
}
|
||||
|
||||
__ subsw(rscratch2, rscratch2, 1);
|
||||
__ br(Assembler::HI, LARGE_LOOP);
|
||||
|
||||
__ mulv(vmul3, Assembler::T4S, vmul3, vpow);
|
||||
__ addv(vmul3, Assembler::T4S, vmul3);
|
||||
__ umov(result, vmul3, Assembler::S, 0);
|
||||
|
||||
__ mov(rscratch2, intpow(31U, vf));
|
||||
|
||||
__ mulv(vmul2, Assembler::T4S, vmul2, vpow);
|
||||
__ addv(vmul2, Assembler::T4S, vmul2);
|
||||
__ umov(rscratch1, vmul2, Assembler::S, 0);
|
||||
__ maddw(result, result, rscratch2, rscratch1);
|
||||
|
||||
__ mulv(vmul1, Assembler::T4S, vmul1, vpow);
|
||||
__ addv(vmul1, Assembler::T4S, vmul1);
|
||||
__ umov(rscratch1, vmul1, Assembler::S, 0);
|
||||
__ maddw(result, result, rscratch2, rscratch1);
|
||||
|
||||
__ mulv(vmul0, Assembler::T4S, vmul0, vpow);
|
||||
__ addv(vmul0, Assembler::T4S, vmul0);
|
||||
__ umov(rscratch1, vmul0, Assembler::S, 0);
|
||||
__ maddw(result, result, rscratch2, rscratch1);
|
||||
|
||||
__ andr(rscratch2, cnt, vf - 1);
|
||||
__ cbnz(rscratch2, TAIL_SHORTCUT);
|
||||
|
||||
__ leave();
|
||||
__ ret(lr);
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
address generate_dsin_dcos(bool isCos) {
|
||||
__ align(CodeEntryAlignment);
|
||||
StubCodeMark mark(this, "StubRoutines", isCos ? "libmDcos" : "libmDsin");
|
||||
@@ -7323,10 +7008,8 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
if (return_barrier_exception) {
|
||||
__ ldr(c_rarg1, Address(rfp, wordSize)); // return address
|
||||
__ authenticate_return_address(c_rarg1);
|
||||
__ verify_oop(r0);
|
||||
// save return value containing the exception oop in callee-saved R19
|
||||
__ mov(r19, r0);
|
||||
__ mov(r19, r0); // save return value contaning the exception oop in callee-saved R19
|
||||
|
||||
__ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::exception_handler_for_return_address), rthread, c_rarg1);
|
||||
|
||||
@@ -7336,7 +7019,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
// see OptoRuntime::generate_exception_blob: r0 -- exception oop, r3 -- exception pc
|
||||
|
||||
__ mov(r1, r0); // the exception handler
|
||||
__ mov(r0, r19); // restore return value containing the exception oop
|
||||
__ mov(r0, r19); // restore return value contaning the exception oop
|
||||
__ verify_oop(r0);
|
||||
|
||||
__ leave();
|
||||
@@ -8706,13 +8389,6 @@ class StubGenerator: public StubCodeGenerator {
|
||||
StubRoutines::aarch64::_large_array_equals = generate_large_array_equals();
|
||||
}
|
||||
|
||||
// arrays_hascode stub for large arrays.
|
||||
StubRoutines::aarch64::_large_arrays_hashcode_boolean = generate_large_arrays_hashcode(T_BOOLEAN);
|
||||
StubRoutines::aarch64::_large_arrays_hashcode_byte = generate_large_arrays_hashcode(T_BYTE);
|
||||
StubRoutines::aarch64::_large_arrays_hashcode_char = generate_large_arrays_hashcode(T_CHAR);
|
||||
StubRoutines::aarch64::_large_arrays_hashcode_int = generate_large_arrays_hashcode(T_INT);
|
||||
StubRoutines::aarch64::_large_arrays_hashcode_short = generate_large_arrays_hashcode(T_SHORT);
|
||||
|
||||
// byte_array_inflate stub for large arrays.
|
||||
StubRoutines::aarch64::_large_byte_array_inflate = generate_large_byte_array_inflate();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -48,11 +48,6 @@ address StubRoutines::aarch64::_zero_blocks = nullptr;
|
||||
address StubRoutines::aarch64::_count_positives = nullptr;
|
||||
address StubRoutines::aarch64::_count_positives_long = nullptr;
|
||||
address StubRoutines::aarch64::_large_array_equals = nullptr;
|
||||
address StubRoutines::aarch64::_large_arrays_hashcode_boolean = nullptr;
|
||||
address StubRoutines::aarch64::_large_arrays_hashcode_byte = nullptr;
|
||||
address StubRoutines::aarch64::_large_arrays_hashcode_char = nullptr;
|
||||
address StubRoutines::aarch64::_large_arrays_hashcode_int = nullptr;
|
||||
address StubRoutines::aarch64::_large_arrays_hashcode_short = nullptr;
|
||||
address StubRoutines::aarch64::_compare_long_string_LL = nullptr;
|
||||
address StubRoutines::aarch64::_compare_long_string_UU = nullptr;
|
||||
address StubRoutines::aarch64::_compare_long_string_LU = nullptr;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@@ -62,11 +62,6 @@ class aarch64 {
|
||||
static address _zero_blocks;
|
||||
|
||||
static address _large_array_equals;
|
||||
static address _large_arrays_hashcode_boolean;
|
||||
static address _large_arrays_hashcode_byte;
|
||||
static address _large_arrays_hashcode_char;
|
||||
static address _large_arrays_hashcode_int;
|
||||
static address _large_arrays_hashcode_short;
|
||||
static address _compare_long_string_LL;
|
||||
static address _compare_long_string_LU;
|
||||
static address _compare_long_string_UL;
|
||||
@@ -152,25 +147,6 @@ class aarch64 {
|
||||
return _large_array_equals;
|
||||
}
|
||||
|
||||
static address large_arrays_hashcode(BasicType eltype) {
|
||||
switch (eltype) {
|
||||
case T_BOOLEAN:
|
||||
return _large_arrays_hashcode_boolean;
|
||||
case T_BYTE:
|
||||
return _large_arrays_hashcode_byte;
|
||||
case T_CHAR:
|
||||
return _large_arrays_hashcode_char;
|
||||
case T_SHORT:
|
||||
return _large_arrays_hashcode_short;
|
||||
case T_INT:
|
||||
return _large_arrays_hashcode_int;
|
||||
default:
|
||||
ShouldNotReachHere();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static address compare_long_string_LL() {
|
||||
return _compare_long_string_LL;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "classfile/javaClasses.hpp"
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "compiler/compiler_globals.hpp"
|
||||
#include "gc/shared/barrierSetAssembler.hpp"
|
||||
#include "interpreter/bytecodeHistogram.hpp"
|
||||
@@ -64,7 +63,7 @@
|
||||
// Max size with JVMTI
|
||||
int TemplateInterpreter::InterpreterCodeSize = 200 * 1024;
|
||||
|
||||
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
|
||||
#define __ _masm->
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -1367,9 +1366,6 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
|
||||
__ get_method(rmethod);
|
||||
// result potentially in r0 or v0
|
||||
|
||||
// Restore cpu control state after JNI call
|
||||
__ restore_cpu_control_state_after_jni(rscratch1, rscratch2);
|
||||
|
||||
// make room for the pushes we're about to do
|
||||
__ sub(rscratch1, esp, 4 * wordSize);
|
||||
__ andr(sp, rscratch1, -16);
|
||||
@@ -1827,7 +1823,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
|
||||
Label caller_not_deoptimized;
|
||||
__ ldr(c_rarg1, Address(rfp, frame::return_addr_offset * wordSize));
|
||||
// This is a return address, so requires authenticating for PAC.
|
||||
__ authenticate_return_address(c_rarg1);
|
||||
__ authenticate_return_address(c_rarg1, rscratch1);
|
||||
__ super_call_VM_leaf(CAST_FROM_FN_PTR(address,
|
||||
InterpreterRuntime::interpreter_contains), c_rarg1);
|
||||
__ cbnz(r0, caller_not_deoptimized);
|
||||
@@ -1993,21 +1989,13 @@ void TemplateInterpreterGenerator::set_vtos_entry_points(Template* t,
|
||||
address& vep) {
|
||||
assert(t->is_valid() && t->tos_in() == vtos, "illegal template");
|
||||
Label L;
|
||||
aep = __ pc(); // atos entry point
|
||||
__ push_ptr();
|
||||
__ b(L);
|
||||
fep = __ pc(); // ftos entry point
|
||||
__ push_f();
|
||||
__ b(L);
|
||||
dep = __ pc(); // dtos entry point
|
||||
__ push_d();
|
||||
__ b(L);
|
||||
lep = __ pc(); // ltos entry point
|
||||
__ push_l();
|
||||
__ b(L);
|
||||
bep = cep = sep = iep = __ pc(); // [bcsi]tos entry point
|
||||
__ push_i();
|
||||
vep = __ pc(); // vtos entry point
|
||||
aep = __ pc(); __ push_ptr(); __ b(L);
|
||||
fep = __ pc(); __ push_f(); __ b(L);
|
||||
dep = __ pc(); __ push_d(); __ b(L);
|
||||
lep = __ pc(); __ push_l(); __ b(L);
|
||||
bep = cep = sep =
|
||||
iep = __ pc(); __ push_i();
|
||||
vep = __ pc();
|
||||
__ bind(L);
|
||||
generate_and_dispatch(t);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.inline.hpp"
|
||||
#include "compiler/disassembler.hpp"
|
||||
#include "compiler/compilerDefinitions.inline.hpp"
|
||||
#include "gc/shared/barrierSetAssembler.hpp"
|
||||
#include "gc/shared/collectedHeap.hpp"
|
||||
@@ -47,7 +46,7 @@
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#define __ Disassembler::hook<InterpreterMacroAssembler>(__FILE__, __LINE__, _masm)->
|
||||
#define __ _masm->
|
||||
|
||||
// Address computation: local variables
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "pauth_aarch64.hpp"
|
||||
#include "register_aarch64.hpp"
|
||||
#include "runtime/arguments.hpp"
|
||||
#include "runtime/globals_extension.hpp"
|
||||
#include "runtime/java.hpp"
|
||||
@@ -214,9 +213,10 @@ void VM_Version::initialize() {
|
||||
}
|
||||
}
|
||||
|
||||
// Neoverse N1, N2, V1, V2
|
||||
if (_cpu == CPU_ARM && (model_is(0xd0c) || model_is(0xd49) ||
|
||||
model_is(0xd40) || model_is(0xd4f))) {
|
||||
// Neoverse N1, N2 and V1
|
||||
if (_cpu == CPU_ARM && ((_model == 0xd0c || _model2 == 0xd0c)
|
||||
|| (_model == 0xd49 || _model2 == 0xd49)
|
||||
|| (_model == 0xd40 || _model2 == 0xd40))) {
|
||||
if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
|
||||
FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
|
||||
}
|
||||
@@ -441,19 +441,7 @@ void VM_Version::initialize() {
|
||||
}
|
||||
|
||||
if (UseSVE > 0) {
|
||||
int vl = get_current_sve_vector_length();
|
||||
if (vl < 0) {
|
||||
warning("Unable to get SVE vector length on this system. "
|
||||
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.");
|
||||
FLAG_SET_DEFAULT(UseSVE, 0);
|
||||
} else if ((vl == 0) || ((vl % FloatRegister::sve_vl_min) != 0) || !is_power_of_2(vl)) {
|
||||
warning("Detected SVE vector length (%d) should be a power of two and a multiple of %d. "
|
||||
"Disabling SVE. Specify -XX:UseSVE=0 to shun this warning.",
|
||||
vl, FloatRegister::sve_vl_min);
|
||||
FLAG_SET_DEFAULT(UseSVE, 0);
|
||||
} else {
|
||||
_initial_sve_vector_length = vl;
|
||||
}
|
||||
_initial_sve_vector_length = get_current_sve_vector_length();
|
||||
}
|
||||
|
||||
// This machine allows unaligned memory accesses
|
||||
@@ -476,12 +464,16 @@ void VM_Version::initialize() {
|
||||
strcmp(UseBranchProtection, "pac-ret") == 0) {
|
||||
_rop_protection = false;
|
||||
// Enable ROP-protection if
|
||||
// 1) this code has been built with branch-protection and
|
||||
// 2) the CPU/OS supports it
|
||||
// 1) this code has been built with branch-protection,
|
||||
// 2) the CPU/OS supports it, and
|
||||
// 3) incompatible VMContinuations isn't enabled.
|
||||
#ifdef __ARM_FEATURE_PAC_DEFAULT
|
||||
if (!VM_Version::supports_paca()) {
|
||||
// Disable PAC to prevent illegal instruction crashes.
|
||||
warning("ROP-protection specified, but not supported on this CPU. Disabling ROP-protection.");
|
||||
} else if (VMContinuations) {
|
||||
// Not currently compatible with continuation freeze/thaw.
|
||||
warning("ROP-protection is incompatible with VMContinuations. Disabling ROP-protection.");
|
||||
} else {
|
||||
_rop_protection = true;
|
||||
}
|
||||
@@ -496,6 +488,12 @@ void VM_Version::initialize() {
|
||||
// Determine the mask of address bits used for PAC. Clear bit 55 of
|
||||
// the input to make it look like a user address.
|
||||
_pac_mask = (uintptr_t)pauth_strip_pointer((address)~(UINT64_C(1) << 55));
|
||||
|
||||
// The frame pointer must be preserved for ROP protection.
|
||||
if (FLAG_IS_DEFAULT(PreserveFramePointer) == false && PreserveFramePointer == false ) {
|
||||
vm_exit_during_initialization(err_msg("PreserveFramePointer cannot be disabled for ROP-protection"));
|
||||
}
|
||||
PreserveFramePointer = true;
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
@@ -579,10 +577,6 @@ void VM_Version::initialize() {
|
||||
if (FLAG_IS_DEFAULT(UsePoly1305Intrinsics)) {
|
||||
FLAG_SET_DEFAULT(UsePoly1305Intrinsics, true);
|
||||
}
|
||||
|
||||
if (FLAG_IS_DEFAULT(UseVectorizedHashCodeIntrinsic)) {
|
||||
FLAG_SET_DEFAULT(UseVectorizedHashCodeIntrinsic, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
_spin_wait = get_spin_wait_desc();
|
||||
|
||||
@@ -152,10 +152,6 @@ enum Ampere_CPU_Model {
|
||||
static int cpu_variant() { return _variant; }
|
||||
static int cpu_revision() { return _revision; }
|
||||
|
||||
static bool model_is(int cpu_model) {
|
||||
return _model == cpu_model || _model2 == cpu_model;
|
||||
}
|
||||
|
||||
static bool is_zva_enabled() { return 0 <= _zva_length; }
|
||||
static int zva_length() {
|
||||
assert(is_zva_enabled(), "ZVA not available");
|
||||
|
||||
@@ -175,7 +175,7 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
|
||||
// so all registers except arguments are free at this point.
|
||||
const Register recv_klass_reg = r10;
|
||||
const Register holder_klass_reg = r16; // declaring interface klass (DECC)
|
||||
const Register resolved_klass_reg = r17; // resolved interface klass (REFC)
|
||||
const Register resolved_klass_reg = rmethod; // resolved interface klass (REFC)
|
||||
const Register temp_reg = r11;
|
||||
const Register temp_reg2 = r15;
|
||||
const Register icholder_reg = rscratch2;
|
||||
@@ -192,13 +192,28 @@ VtableStub* VtableStubs::create_itable_stub(int itable_index) {
|
||||
__ load_klass(recv_klass_reg, j_rarg0);
|
||||
|
||||
// Receiver subtype check against REFC.
|
||||
__ lookup_interface_method(// inputs: rec. class, interface
|
||||
recv_klass_reg, resolved_klass_reg, noreg,
|
||||
// outputs: scan temp. reg1, scan temp. reg2
|
||||
temp_reg2, temp_reg,
|
||||
L_no_such_interface,
|
||||
/*return_method=*/false);
|
||||
|
||||
const ptrdiff_t typecheckSize = __ pc() - start_pc;
|
||||
start_pc = __ pc();
|
||||
|
||||
// Get selected method from declaring class and itable index
|
||||
__ lookup_interface_method_stub(recv_klass_reg, holder_klass_reg, resolved_klass_reg, rmethod,
|
||||
temp_reg, temp_reg2, itable_index, L_no_such_interface);
|
||||
__ lookup_interface_method(// inputs: rec. class, interface, itable index
|
||||
recv_klass_reg, holder_klass_reg, itable_index,
|
||||
// outputs: method, scan temp. reg
|
||||
rmethod, temp_reg,
|
||||
L_no_such_interface);
|
||||
|
||||
const ptrdiff_t lookupSize = __ pc() - start_pc;
|
||||
|
||||
// Reduce "estimate" such that "padding" does not drop below 8.
|
||||
const ptrdiff_t estimate = 144;
|
||||
const ptrdiff_t codesize = __ pc() - start_pc;
|
||||
const ptrdiff_t estimate = 124;
|
||||
const ptrdiff_t codesize = typecheckSize + lookupSize;
|
||||
slop_delta = (int)(estimate - codesize);
|
||||
slop_bytes += slop_delta;
|
||||
assert(slop_delta >= 0, "itable #%d: Code size estimate (%d) for lookup_interface_method too small, required: %d", itable_index, (int)estimate, (int)codesize);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user